statsmodels.tsa.forecasting.stl.STLForecastResults.get_prediction¶
-
STLForecastResults.
get_prediction
(start: Optional[Union[int, str, datetime.datetime, pandas._libs.tslibs.timestamps.Timestamp, numpy.datetime64]] = None, end: Optional[Union[int, str, datetime.datetime, pandas._libs.tslibs.timestamps.Timestamp, numpy.datetime64]] = None, dynamic: Union[bool, int, str, datetime.datetime, pandas._libs.tslibs.timestamps.Timestamp, numpy.datetime64] = False, **kwargs: Dict[str, Any])[source]¶ In-sample prediction and out-of-sample forecasting
- Parameters
- 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.
- dynamicbool,
int
,str
,or
datetime
,optional
Integer offset relative to start at which to begin dynamic prediction. Can also be an absolute date string to parse or a datetime type (these are not interpreted as offsets). 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
Additional arguments may required for forecasting beyond the end of the sample. These arguments are passed into the time series model results’
get_prediction
method.
- start
- Returns
PredictionResults
PredictionResults instance containing in-sample predictions, out-of-sample forecasts, and prediction intervals.