пʼятниця, 15 квітня 2011 р.

WTSAO about stocks trading 7

I noticed that there are certain industries that are on the uptrend no matter what the overall market is doing. I run daily scans for new stocks and its a pain to find out the industry for that company.

So I went to NASDAQ to get the stock list from AMEX, NYSE, and NASDAQ. Their files contain the industry information for their stocks. StrategyDesk contains a notes column that you can store your own information.

After some digging I found that StrategyDesk stores notes information in a notes.xml file in the StrategyDesk root folder. I studied the schema and wrote some macros to create the tags the notes.xml file like. I then dumped all the information for the exchanges into an Access database table with field names that matched the notes.xml schema. I then dumped the data using the XML feature to create an XML file that was very close to the notes.xml schema.

A few seach and replaces and I now have a notes.xml file that contains the industry for almost every stock in the three exchanges. A few stocks didn't have an industry name so they will so up as "n/a".

Now when you run your screens, the notes column will pop up the industry for that particular stock. You can then group them by industry to gauge what people are interested in. This is also helpful when your managing portfolios with a large number of stocks. You can group your stocks to see which industries are doing well and which ones are no longer trending.

Attached is a notes.txt that I renamed for the attachment. Its really a notes.zip file.

1. Download file and unzip
2. Backup your current notes.xml file in the StrategyDesk root folder in case you want to back out these changes.
3. Drop the new notes.xml file in the root folder.

Now when you type in a stock or dump a list of stocks, the industry names will appear next to them when you show the notes column. A few will have "n/a" because the original file from NASDAQ didn't have that info. You can updates the notes manually for those stocks. The updated information will be added to the notes file.

(I updated the file to use the industry names from the AAII database which has more listing. This file should cover 9800+ stocks. This file is 50% larger than the previous, same zip format renamed as .txt)

After using it for a while, I noticed that sometimes StrategyDesk has problems reading the notes.xml file if the notes column gets changed manually. I'll get a parse error sometimes. It could be a buffer over run error. If I don't change the notes.xml file, everything is fine. Just keep a backup copy of the file somewhere to replace the notes.xml if it gets corrupted.

Немає коментарів:

Дописати коментар