stefan-jansen / machine-learning-for-trading

Code for Machine Learning for Algorithmic Trading, 2nd edition.
https://ml4trading.io
12.57k stars 4.03k forks source link

01_pandas_datareader_demo.ipynb from chapter 2 #285

Closed sgjohnson1981 closed 1 year ago

sgjohnson1981 commented 1 year ago

Describe the bug A brief description of the bug and in which notebook/script it lives. In the notebook located at this issue's title, pandas.datareader for yahoo finance is broken. Changing FB (which no longer exists as a ticker) to META didn't make any difference. On both occasions, the following error is thrown: string indices must be integers I noticed FB is also fetched under the Quandl section, but I didn't complete the entire notebook since I noticed it seems nothing gets saved to disk to be used in later exercises.

To Reproduce

Changed the code as below. Seems to work fine. start = datetime(2014, 1, 1) end = datetime(2017, 5, 24)

yahoo= yf.download('META', start=start, end=end) yahoo.info()

NicoNicoNico123 commented 1 year ago

I checked the module I think yahoo getting to paid model:

https://github.com/pydata/pandas-datareader/issues/962

stefan-jansen commented 1 year ago

Please create an issue in the pandas-datareader repo if this problem persists.