Open jamlamberti opened 8 years ago
Another weird YF issue:
import yahoo_finance as yf
share = yf.Share('asdf') # some symbol
print len(share.get_historical('2015-01-01', '2016-01-01'))
If the symbol isn't valid, the expected result is []
. However it rarely returns the contents of Yahoo's 404 page as a string.
Need to do some type of decoding in the cache wrapper or some strange things might start happing.
If I want to look up the historical data for S&P 500, I search for
^GSPC
. This returnsThe Symbol entry does not match the original query if we do not decode. This seems to fix it: