statsmodels.tsa.regime_switching.markov_regression.MarkovRegression.predict

MarkovRegression.predict(params, start=None, end=None, probabilities=None, conditional=False)

In-sample prediction and out-of-sample forecasting

Parameters:

params : array

Parameters at which to form predictions

start : int, str, or datetime, optional

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

end : int, str, or datetime, optional

Zero-indexed observation number at which to end forecasting, i.e., the last forecast is end. 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. Default is the last observation in the sample.

probabilities : string or array_like, optional

Specifies the weighting probabilities used in constructing the prediction as a weighted average. If a string, can be ‘predicted’, ‘filtered’, or ‘smoothed’. Otherwise can be an array of probabilities to use. Default is smoothed.

conditional: boolean or int, optional

Whether or not to return predictions conditional on current or past regimes. If False, returns a single vector of weighted predictions. If True or 1, returns predictions conditional on the current regime. For larger integers, returns predictions conditional on the current regime and some number of past regimes.

Returns:

predict : array

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