Closed so87 closed 1 year ago
nq = yf.Ticker('^IXIC') nq_data = nq.history(period='3mo')
@galashour thank you! Is the NYSE index the same? I thought it was odd this wasn't documented because i would assume people would want to get the nasdaq/sp500/dow/etc
didn't check the below with yahoo finance, but should work similar to the one above for nasdaq:
NYSE yahoo ticker seems to be '^NYA' or maybe '^XAX' SP500 yahoo ticker seems to be '^SPX' DOW index yahoo ticker seems to be '^DJI'
by the way, if you just want to track the trends, you can use the ETFs (e.g, SPY, DIA, etc.).
that works thank you!
What are you trying to do?
what did you already try:
What did I expect to happen?
I don't want data on the symbols inside those exchanges. I want the index data. I expected this to work like any other ticker(see google links above). I searched through questions and documentation but i couldn't find anything on trying to get just the big composite indexes.