ARIMA PREDICT没有预测(但适用于Hindcast)

时间:2018-06-14 23:22:27

标签: python statsmodels forecasting predict arima

使用ARIMA时,我可以如下所示隐藏过去的数据,但在我尝试预测未来值的那一刻,它不起作用。

是的,我使用concat在表格中添加了新行:

df['forecast'] = results.predict(start = 50, end = 251)
df[['close', 'forecast']].plot(figsize = (12,8)) 

enter image description here]

但是,当我将end = 251更改为end= 252时,它不会产生任何预测值,而我的所有hind-cast值都会消失吗?

任何解决方案?

1 个答案:

答案 0 :(得分:0)

您可能想使用预测而不是预测:

df['forecast'] = results.forecast(steps=7)

这里有一个很好的教程:https://machinelearningmastery.com/make-sample-forecasts-arima-python/

相关问题