I am using statsmodels.tsa.statespace.sarimax to make prediction. Here is my code
pprint(list(rolmean_df.index)[0])
>> datetime.date(2015, 5, 19)
mod = sm.tsa.statespace.SARIMAX(rolmean_df['IC_10_diff'], trend='n', order=(2,1,2))
results = mod.fit()
s = results.get_prediction(start = pd.to_datetime('2016-01-01').date(), dynamic= False)
>> ValueError: Start must be in dates. Got 2016-01-01 | 2016-01-01 00:00:00
I am not sure whether my "start" format is wrong or something else does not work.
datetime
for start not adate
tryresults.get_prediction(start = pd.to_datetime('2016-01-01'), dynamic= False)
– Namtar