google金融的数据源不可用,请求被当成爬虫处理了
其他数据源:
quandl
import pandas_datareader.data as web
symbol = 'AAPL.US'
df = web.DataReader(symbol, 'quandl', '2016-01-04', '2016-01-08')
df.head()
Morningstar
import pandas_datareader.data as web
from datetime import datetime
start = datetime(2015, 2, 9)
end = datetime(2017, 5, 24)
f = web.DataReader('F', 'morningstar', start, end)
f.head()
IEX
import pandas_datareader.data as web
from datetime import datetime
start = datetime(2015, 2, 9)
end = datetime(2017, 5, 24)
f = web.DataReader('F', 'iex', start, end)
f.head()
Robinhood
import pandas_datareader.data as web
from datetime import datetime
start = datetime(2015, 2, 9)
end = datetime(2017, 5, 24)
f = web.DataReader('F', 'robinhood')
f.head()
Stooq Index Data
import pandas_datareader.data as web
f = web.DataReader('^DJI', 'stooq')
f[:10]
MOEX Data
import pandas_datareader.data as web
f = web.DataReader('USD000UTSTOM', 'moex', start='2017-07-01', end='2017-07-31')
f.head()