这里有点新,但试图使用statsmodel ARMA预测工具.我从雅虎导入了一些股票数据并得到ARMA给我适合的参数.但是,当我使用预测代码时,我收到的是一个错误列表,我似乎无法弄清楚.不太确定我在这里做错了什么:
import pandas
import statsmodels.tsa.api as tsa
from pandas.io.data import DataReader
start = pandas.datetime(2013,1,1)
end = pandas.datetime.today()
data = DataReader('GOOG','yahoo')
arma =tsa.ARMA(data['Close'],order =(2,2))
results= arma.fit()
results.predict(start=start,end=end)
错误是:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
C:\Windows\system32\404 #elif 'mle' not in method or dynamic: # should be on a date
405 start = _validate(start,k_ar,k_diff,self.data.dates,--> 406 method)
407 start = super(ARMA,self)._get_predict_start(start)