Skip to content Skip to sidebar Skip to footer

Where And How To Get The Equity Historical Data (at Least Covers 2008)?

I can use the following code to get historical data from Google Finance. But the oldest is from 2016-09-20. This is too short for back testing. I need historical data which covers

Solution 1:

Use fix-yahoo-finance and then use yahoo rather than Google as your source. It looks like Google has been locking down a lot of its data lately.

First you'll need to pip-install fix-yahoo-finance.

Then:

from pandas_datareader import data
import fix_yahoo_finance

aapl = data.get_data_yahoo('AAPL', start='2000-01-01')

print(aapl.head())
               Open     High      Low    Close  Adj Close     Volume
Date2000-01-033.745544.017863.631703.997773.596621339492002000-01-043.866073.950893.613843.660713.293381280944002000-01-053.705363.948663.678573.714293.341581945804002000-01-063.790183.821433.392863.392863.052401919932002000-01-073.446433.607143.410713.553573.19699115183600

Post a Comment for "Where And How To Get The Equity Historical Data (at Least Covers 2008)?"