使用python进行时间序列ARIMA预测

时间:2019-12-30 05:16:25

标签: python forecasting arima

我正在尝试预测原油价格,并且将日期作为观察指标而不是DateTime

model=SARIMAX(df_crudeoil,order=(3,1,3))
cruderesult= model.fit()
print(result.summary())
crude_forecast=cruderesult.get_forecast(steps=30)
mean_crude=crude_forecast.predicted_mean
print(mean_crude)

结果

9229    54.452931
9230    54.476802
9231    54.503399
9232    54.502871
9233    54.463245
9234    54.477102
9235    54.499619
9236    54.498198
9237    54.470114
9238    54.478136
9239    54.496355
9240    54.494998
9241    54.474783
9242    54.479367
9243    54.493714
9244    54.492724

在查看或将索引转换为日期时间而不是观察号时,我需要帮助,因此它应该看起来像

2020-01-02   54.452931
2020-01-03   54.476802
2020-01-04   54.503399

0 个答案:

没有答案
相关问题