statsmodels.tsa.ar_model.AutoRegResults.forecast

AutoRegResults.forecast(steps=1, exog=None)[source]

Out-of-sample forecasts

Parameters
steps{int, str, datetime}, default 1

If an integer, the number of steps to forecast from the end of the sample. Can also be a date string to parse or a datetime type. However, if the dates index does not have a fixed frequency, steps must be an integer.

exog{ndarray, Series}

A replacement exogenous array. Must have the same shape as the exogenous data array used when the model was created.

Returns
array_like

Array of out of in-sample predictions and / or out-of-sample forecasts.

See also

AutoRegResults.predict

In- and out-of-sample predictions