Python ARIMA exogenous variable out of sample

while fiting fit2 you already mentionned exog variables, so no need to repeat it:

exogx = np.array(range(1,5)) # I think you will need 4 exegeneous variables to perform an ARIMAX(0,0,0) since you want out of sample forecast with 4 steps ahead
fit2 = sm.tsa.ARIMA(df, (0,0,0),exog = exogx).fit()
# if you want to do an out-of-sample-forecast use fit2.forecast(steps) instead
#I would do this
pred = fit2.forecast(steps = 4)
fcst_index = pd.date_range(start = df.shift(1,'10T').index[-1]  , periods = 4, freq = '10T')
fcst_serie = pd.Series(data = pred1[0], index = fcst_index)
print fcst_serie

Hope that it will help! This is a great post.I have never tried exogeneous variables on ARIMA before but papers are saying it's not really relevant whatever the field you are using it (will search for the papers if needed or you can google it)


This is probably better posted on the github issue tracker. I filed a ticket though.

It's best to file a ticket there, if not I might forget it. Quite busy these days.

There was a bug in the logic for the special case of k_ar == 0. Should be fixed. Let me know if you can/cannot give that patch a spin. If not, I can do some more rigorous testing and merge it.

Statsmodels on top of spark? I'm intrigued.