Closed schustan235 closed 3 years ago
I get the same "KeyError: 'adjclose'" when running get_data on a list of S&P500 tickers. I think I narrowed the issue to a specific ticker "BF.B" (Brown-Foreman). Could the issue be the special characters?
Script runs fine on AAPL.
si.get_data("AAPL", start_date="01/01/2020", end_date="01/03/2020", interval="1d")
Same script results in "KeyError: 'adjclose'" for BF.B
si.get_data("BF.B", start_date="01/01/2020", end_date="01/03/2020", interval="1d")
The BF.B issue is because the ticker should be BF-B. This will be corrected in the next release (hopefully in the next two weeks). I just tried "^QMI" and did not have an issue. I'll investigate this further.
Seems to be an issue with line 89 in stock_info in the get_data function. Result is "KeyError: 'adjclose'" which implies that adjclose is not a feature of that dataset. I tried removing the 'adjclose' element, but a new issue appeared: "KeyError: 'timestamp'" within the temp_time line.