statsmodels.tsa.arima_model.ARIMA.predict

method

ARIMA.predict(params, start=None, end=None, exog=None, typ='linear', dynamic=False)[source]

ARIMA model in-sample and out-of-sample prediction

Parameters
paramsarray-like

The fitted parameters of the model.

startint, str, or datetime

Zero-indexed observation number at which to start forecasting, ie., the first forecast is start. Can also be a date string to parse or a datetime type.

endint, str, or datetime

Zero-indexed observation number at which to end forecasting, ie., the first forecast is start. Can also be a date string to parse or a datetime type. However, if the dates index does not have a fixed frequency, end must be an integer index if you want out of sample prediction.

exogarray-like, optional

If the model is an ARMAX and out-of-sample forecasting is requested, exog must be given. Note that you’ll need to pass k_ar additional lags for any exogenous variables. E.g., if you fit an ARMAX(2, q) model and want to predict 5 steps, you need 7 observations to do this.

dynamicbool, optional

The dynamic keyword affects in-sample prediction. If dynamic is False, then the in-sample lagged values are used for prediction. If dynamic is True, then in-sample forecasts are used in place of lagged dependent variables. The first forecasted value is start.

typstr {‘linear’, ‘levels’}
  • ‘linear’ : Linear prediction in terms of the differenced endogenous variables.

  • ‘levels’ : Predict the levels of the original endogenous variables.

Returns
predictarray

The predicted values.

Notes

Use the results predict method instead.