statsmodels.tsa.statespace.mlemodel.MLEResults.get_forecast#

MLEResults.get_forecast(steps=1, signal_only=False, **kwargs)[source]#

Out-of-sample forecasts and prediction intervals

Parameters:
stepsint, str, or datetime, optional

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. Default is 1.

signal_onlybool, optional

Whether to compute forecasts of only the “signal” component of the observation equation. Default is False. For example, the observation equation of a time-invariant model is \(y_t = d + Z \alpha_t + \varepsilon_t\), and the “signal” component is then \(Z \alpha_t\). If this argument is set to True, then forecasts of the “signal” \(Z \alpha_t\) will be returned. Otherwise, the default is for forecasts of \(y_t\) to be returned.

**kwargs

Additional arguments may required for forecasting beyond the end of the sample. See FilterResults.predict for more details.

Returns:
forecastsPredictionResults

PredictionResults instance containing out-of-sample forecasts and results including confidence intervals.

See also

forecast

Out-of-sample forecasts.

predict

In-sample predictions and out-of-sample forecasts.

get_prediction

In-sample predictions / out-of-sample forecasts and results including confidence intervals.

Notes

Changed in version 0.16.0: A NumPy integer, a 0-d integer array or a float with an integral value, such as 3.0, is the number of steps, as an int is. Before, it was used as the index of the last forecast, which raised or gave the wrong number of forecasts. A bool is not a number of steps: True was one step.