statsmodels.tsa.statespace.kalman_smoother.SmootherResults.predict¶

SmootherResults.
predict
(start=None, end=None, dynamic=None, **kwargs)¶ Insample and outofsample prediction for state space models generally
Parameters:  start (int, optional) – Zeroindexed observation number at which to start forecasting, i.e., the first forecast will be at start.
 end (int, optional) – Zeroindexed observation number at which to end forecasting, i.e., the last forecast will be at end.
 dynamic (int, optional) – Offset relative to start at which to begin dynamic prediction. Prior to this observation, true endogenous values will be used for prediction; starting with this observation and continuing through the end of prediction, forecasted endogenous values will be used instead.
 **kwargs – If the prediction range is outside of the sample range, any of the state space representation matrices that are timevarying must have updated values provided for the outofsample range. For example, of obs_intercept is a timevarying component and the prediction range extends 10 periods beyond the end of the sample, a (k_endog x 10) matrix must be provided with the new intercept values.
Returns: results – A PredictionResults object.
Return type: Notes
All prediction is performed by applying the deterministic part of the measurement equation using the predicted state variables.
Outofsample prediction first applies the Kalman filter to missing data for the number of periods desired to obtain the predicted states.