How to extract Symbols and their Exchanges
Author: deepbuyer
Creation Date: 1/6/2009 1:41 AM
profile picture

deepbuyer

#1
Is there a way to get the exchanges (NYSE, Nasdaq, OTC) where a given symbol is traded at?

or could somebody post a recent list of NYSE stocks? I went to NYSE and all I could find was an alphabetical list which would be a pain to download.

Many Thanks!
profile picture

Eugene

#2
There is always a way.

1) If there is some sort of web service that does just that, then it's real easy: you could poll it from inside your Strategy.
2) An alphabetical list is suitable too. I would download it once (from the Strategy code), check for file modification time (periodically), load the data as an array into Wealth-Lab's global memory (GOP).

Sounds like a reasonable idea for Community.Components. Now we need to find a couple of reliable sources of this information.
profile picture

deepbuyer

#3
profile picture

Eugene

#4
Thanks. The NASDAQ link isn't helpful but the other one could probably be.

But first I would like to clear one thing: which version of Wealth-Lab .NET are you using? I couldn't find you on the Developer customer list and you haven't taken a free trial. However, your geographic location (as suggested by the IP address) isn't something that one would expect from a Wealth-Lab Pro user. Sorry for inconvenience, if any.
profile picture

deepbuyer

#5
i occasionally use Pro trial. i have not decided whether to go with Pro or Developer (i think i could use either version because i don't reside in US 100% time)
profile picture

Eugene

#6
Sorry I wasn't aware that Wealth-Lab Pro allows taking 3 to 4 month trials. ;)
profile picture

deepbuyer

#7
different machines
profile picture

Cone

#8
This should work well for the Nasdaq 100 list -
http://www.nasdaq.com/asp/index_component.asp?symbol=IXNDX
profile picture

Eugene

#9
OK the easiest way to get it done is by querying Yahoo for the exchange and parsing the result:

http://download.finance.yahoo.com/d/quotes.csv?s=symbol name here&f=x

It eliminates the need to deal with numerous bulky symbol lists, would really take nothing but a couple lines of code. I'll be setting up a KB article and/or Community.Components entry.

CODE:
Please log in to see this code.


In addition, for those who use Yahoo! data it will report international exchanges like XETRA as well.
profile picture

Eugene

#10
profile picture

Cone

#11
We had an old reference in the FAQ for that feature at nasdaq.com on the WL4 site ;)
profile picture

Eugene

#12
:)

Well, reinventing the wheel is sometimes the right thing, when the result is the radial tire. ;) So, let our radial tire be a new C.Components class for downloading the complete classification, caching it, and extracting the universe of stocks in an easy to paste format (e.g. to create a new DataSet of all U.S. stocks manually).
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).