predict(params, start=None, end=None, probabilities=None, conditional=False)¶
In-sample prediction and out-of-sample forecasting
Parameters at which to form predictions
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.
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.
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.
- conditionalbool or
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.
Array of out of in-sample predictions and / or out-of-sample forecasts.