我正在尝试使用Morningstar API调整股票数据的收盘价,但我只能得到收盘价而非收盘价。有人可以帮我找出原因吗?
import pandas as pd
import numpy as np
from datetime import datetime
import pandas_datareader.data as web
import matplotlib.pyplot as plt
import matplotlib.dates as dates
import statsmodels.api as sm
from pandas.core import datetools
start = datetime(2015, 2, 9)
end = datetime(2017, 5, 24)
short_window = 40
long_window = 100
def get(stocks, startdate, enddate):
def data(ticker):
return ( web.DataReader(ticker,'morningstar', start, end))
datas = map (data, stocks)
return(web.DataReader(datas, stocks, ['Ticker', 'Date']))
stocks = ['AAPL', 'MSFT', 'IBM', 'GOOG']
all_data = web.DataReader(stocks, 'morningstar', start, end)
print(all_data)