PacktPublishing / Learn-Algorithmic-Trading

Learn Algorithmic Trading, Published by Packt
MIT License
802 stars 302 forks source link

TypeError: string indices must be integers #17

Open raghunathbhandari opened 1 year ago

raghunathbhandari commented 1 year ago

Great Book Thank you for Author, Lot of best wishes !

I am getting an error on the 4th line of the first chapter, any idea ?

from pandas_datareader import data start_date = '2014-01-01' end_date = '2018-01-01' goog_data = data.DataReader('GOOG', 'yahoo', start_date, end_date)

ERROR:

data = j["context"]["dispatcher"]["stores"]["HistoricalPriceStore"] TypeError: string indices must be integers

mankic commented 1 year ago

Currently, the pandas-datareader library has an error receiving Yahoo data, which is not yet solved.

Try using the yfinance library.

mobley-trent commented 7 months ago

You can also use 'stooq' instead of 'yahoo' as the data provider @raghunathbhandari