- Auto Forecast: Automatic forecasting tools that search for the best parameters and select the best possible model. Useful for large collections of univariate time series. Includes: AutoARIMA, AutoETS, AutoTheta, AutoCES, AutoMFLES, AutoTBATS.
- ARIMA Family: AutoRegressive Integrated Moving Average models for capturing autocorrelations in time series data.
- Exponential Smoothing: Uses weighted averages of past observations where weights decrease exponentially into the past. Suitable for data with clear trend and/or seasonality.
- Baseline Models: Classical models for establishing baselines: HistoricAverage, Naive, RandomWalkWithDrift, SeasonalNaive, WindowAverage, SeasonalWindowAverage.
- Sparse or Intermittent: Models suited for series with very few non-zero observations: ADIDA, CrostonClassic, CrostonOptimized, CrostonSBA, IMAPA, TSB.
- Multiple Seasonalities: Models suited for signals with more than one clear seasonality. Useful for low-frequency data like electricity and logs: MSTL, MFLES, TBATS.
- Theta Models: Fit two theta lines to a deseasonalized time series using different techniques: Theta, OptimizedTheta, DynamicTheta, DynamicOptimizedTheta.
- ARCH/GARCH Family: Models for time series exhibiting non-constant volatility over time. Commonly used in finance.
- Machine Learning: Wrapper for scikit-learn models to be used with StatsForecast.
Automatic Forecasting
AutoARIMA
AutoARIMA
_TS
AutoARIMA model.
Automatically selects the best ARIMA (AutoRegressive Integrated Moving Average)
model using an information criterion. Default is Akaike Information Criterion (AICc).
Parameters:
AutoARIMA.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
AutoARIMA.predict
Returns:
AutoARIMA.predict_in_sample
Returns:
AutoARIMA.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
AutoETS
AutoETS
_TS
Automatic Error, Trend, Seasonal Model.
Automatically selects the best ETS (Error, Trend, Seasonality)
model using an information criterion. Default is Akaike Information Criterion (AICc), while particular models are estimated using maximum likelihood.
The state-space equations can be determined based on their multiplicative, additive,
optimized or ommited components. The model string parameter defines the ETS equations:
E in [], T in [], and S in [].
For example when model=‘ANN’ (additive error, no trend, and no seasonality), ETS will
explore only a simple exponential smoothing.
If the component is selected as ‘Z’, it operates as a placeholder to ask the AutoETS model
to figure out the best parameter.
Parameters:
AutoETS.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
AutoETS.predict
Returns:
AutoETS.predict_in_sample
Returns:
AutoETS.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
AutoCES
AutoCES
_TS
Complex Exponential Smoothing model.
Automatically selects the best Complex Exponential Smoothing
model using an information criterion. Default is Akaike Information Criterion (AICc), while particular
models are estimated using maximum likelihood.
The state-space equations can be determined based on their simple, parial,
optimized or ommited components. The model string parameter defines the
kind of CES model: for simple CES (withous seasonality), for simple seasonality (lagged CES),
for partial seasonality (without complex part), for full seasonality (lagged CES
with real and complex seasonal parts).
If the component is selected as ‘Z’, it operates as a placeholder to ask the AutoCES model
to figure out the best parameter.
Parameters:
AutoCES.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
AutoCES.predict
Returns:
AutoCES.predict_in_sample
Returns:
AutoCES.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
AutoTheta
AutoTheta
_TS
AutoTheta model.
Automatically selects the best Theta (Standard Theta Model (‘STM’),
Optimized Theta Model (‘OTM’), Dynamic Standard Theta Model (‘DSTM’),
Dynamic Optimized Theta Model (‘DOTM’)) model using mse.
Parameters:
AutoTheta.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
AutoTheta.predict
Returns:
AutoTheta.predict_in_sample
Returns:
AutoTheta.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
AutoMFLES
AutoMFLES
_TS
AutoMFLES
Parameters:
AutoMFLES.fit
Returns:
AutoMFLES.predict
Returns:
AutoMFLES.predict_in_sample
Returns:
AutoMFLES.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
AutoTBATS
AutoTBATS
_TS
AutoTBATS model.
Automatically selects the best TBATS model from all feasible combinations of the parameters use_boxcox, use_trend, use_damped_trend, and use_arma_errors.
Selection is made using the AIC.
Default value for use_arma_errors is True since this enables the evaluation of models with and without ARMA errors.
Parameters:
AutoTBATS.fit
y.
Parameters:
Returns:
AutoTBATS.predict
Returns:
AutoTBATS.predict_in_sample
Returns:
AutoTBATS.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
ARIMA Family
ARIMA
ARIMA
_TS
ARIMA model.
AutoRegressive Integrated Moving Average model.
Parameters:
ARIMA.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
ARIMA.predict
Returns:
ARIMA.predict_in_sample
Returns:
ARIMA.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
AutoRegressive
AutoRegressive
ARIMA
Simple Autoregressive model.
Parameters:
AutoRegressive.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
AutoRegressive.predict
Returns:
AutoRegressive.predict_in_sample
Returns:
AutoRegressive.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
Exponential Smoothing
SimpleExponentialSmoothing
SimpleExponentialSmoothing
_TS
SimpleExponentialSmoothing model.
Uses a weighted average of all past observations where the weights decrease exponentially into the past.
Suitable for data with no clear trend or seasonality.
Assuming there are observations, the one-step forecast is given by:
The rate at which the weights decrease is called the smoothing parameter. When , SES is equal to the naive method.
Parameters:
SimpleExponentialSmoothing.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
SimpleExponentialSmoothing.predict
Returns:
SimpleExponentialSmoothing.predict_in_sample
SimpleExponentialSmoothing.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
SimpleExponentialSmoothingOptimized
SimpleExponentialSmoothingOptimized
_TS
SimpleExponentialSmoothing model.
Uses a weighted average of all past observations where the weights decrease exponentially into the past.
Suitable for data with no clear trend or seasonality.
Assuming there are observations, the one-step forecast is given by:
The smoothing parameter is optimized by square error minimization.
Parameters:
SimpleExponentialSmoothingOptimized.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
SimpleExponentialSmoothingOptimized.predict
Returns:
SimpleExponentialSmoothingOptimized.predict_in_sample
SimpleExponentialSmoothingOptimized.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
SeasonalExponentialSmoothing
SeasonalExponentialSmoothing
_TS
SeasonalExponentialSmoothing model.
Uses a weighted average of all past observations where the weights decrease exponentially into the past.
Suitable for data with no clear trend or seasonality.
Assuming there are observations and season , the one-step forecast is given by:
Parameters:
SeasonalExponentialSmoothing.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
SeasonalExponentialSmoothing.predict
Returns:
SeasonalExponentialSmoothing.predict_in_sample
SeasonalExponentialSmoothing.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
SeasonalExponentialSmoothingOptimized
SeasonalExponentialSmoothingOptimized
_TS
SeasonalExponentialSmoothingOptimized model.
Uses a weighted average of all past observations where the weights decrease exponentially into the past.
Suitable for data with no clear trend or seasonality.
Assuming there are observations and season , the one-step forecast is given by:
The smoothing parameter is optimized by square error minimization.
Parameters:
SeasonalExponentialSmoothingOptimized.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
SeasonalExponentialSmoothingOptimized.predict
Returns:
SeasonalExponentialSmoothingOptimized.predict_in_sample
SeasonalExponentialSmoothingOptimized.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
Holt
Holt
AutoETS
Holt’s method.
Also known as double exponential smoothing, Holt’s method is an extension of exponential smoothing for series with a trend.
This implementation returns the corresponding ETS model with additive (A) or multiplicative (M) errors (so either ‘AAN’ or ‘MAN’).
Parameters:
HoltWinters
HoltWinters
AutoETS
Holt-Winters’ method.
Also known as triple exponential smoothing, Holt-Winters’ method is an extension of exponential smoothing for series that contain both trend and seasonality.
This implementation returns the corresponding ETS model with additive (A) or multiplicative (M) errors (so either ‘AAA’ or ‘MAM’).
Parameters:
Baseline Models
HistoricAverage
HistoricAverage
_TS
HistoricAverage model.
Also known as mean method. Uses a simple average of all past observations.
Assuming there are observations, the one-step forecast is given by:
Parameters:
HistoricAverage.fit
y.
Parameters:
Returns:
r
HistoricAverage.predict
Returns:
HistoricAverage.predict_in_sample
Returns:
HistoricAverage.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
Naive
Naive
_TS
Naive model.
All forecasts have the value of the last observation:
for all
Parameters:
Naive.fit
y.
Parameters:
Returns:
Naive.predict
Returns:
Naive.predict_in_sample
Returns:
Naive.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
RandomWalkWithDrift
RandomWalkWithDrift
_TS
RandomWalkWithDrift model.
A variation of the naive method allows the forecasts to change over time.
The amout of change, called drift, is the average change seen in the historical data.
From the previous equation, we can see that this is equivalent to extrapolating a line between
the first and the last observation.
Parameters:
RandomWalkWithDrift.fit
y.
Parameters:
Returns:
r
RandomWalkWithDrift.predict
Returns:
RandomWalkWithDrift.predict_in_sample
Returns:
RandomWalkWithDrift.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
SeasonalNaive
SeasonalNaive
_TS
Seasonal naive model.
A method similar to the naive, but uses the last known observation of the same period (e.g. the same month of the previous year) in order to capture seasonal variations.
Parameters:
SeasonalNaive.fit
y.
Parameters:
Returns:
r
SeasonalNaive.predict
Returns:
SeasonalNaive.predict_in_sample
Returns:
r
SeasonalNaive.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
WindowAverage
WindowAverage
_TS
WindowAverage model.
Uses the average of the last observations, with the length of the window.
Wider windows will capture global trends, while narrow windows will reveal local trends.
The length of the window selected should take into account the importance of past
observations and how fast the series changes.
Parameters:
r
WindowAverage.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
WindowAverage.predict
Returns:
WindowAverage.predict_in_sample
Returns:
WindowAverage.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
SeasonalWindowAverage
SeasonalWindowAverage
_TS
SeasonalWindowAverage model.
An average of the last observations of the same period, with the length of the window.
Parameters:
r
SeasonalWindowAverage.fit
y
and optionally exogenous variables (numpy array) X.
Parameters:
Returns:
SeasonalWindowAverage.predict
Returns:
SeasonalWindowAverage.predict_in_sample
Returns:
SeasonalWindowAverage.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
Sparse or Intermittent Models
ADIDA
ADIDA
_TS
ADIDA model.
Aggregate-Dissagregate Intermittent Demand Approach: Uses temporal aggregation to reduce the
number of zero observations. Once the data has been agregated, it uses the optimized SES to
generate the forecasts at the new level. It then breaks down the forecast to the original
level using equal weights.
ADIDA specializes on sparse or intermittent series are series with very few non-zero observations.
They are notoriously hard to forecast, and so, different methods have been developed
especifically for them.
Parameters:
ADIDA.fit
y.
Parameters:
Returns:
ADIDA.predict
Returns:
ADIDA.predict_in_sample
Returns:
ADIDA.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
CrostonClassic
CrostonClassic
_TS
CrostonClassic model.
A method to forecast time series that exhibit intermittent demand.
It decomposes the original time series into a non-zero demand size and
inter-demand intervals . Then the forecast is given by:
where and are forecasted using SES. The smoothing parameter
of both components is set equal to 0.1
Parameters:
CrostonClassic.fit
y.
Parameters:
Returns:
CrostonClassic.predict
Returns:
CrostonClassic.predict_in_sample
Returns:
CrostonClassic.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
CrostonOptimized
CrostonOptimized
_TS
CrostonOptimized model.
A method to forecast time series that exhibit intermittent demand.
It decomposes the original time series into a non-zero demand size and
inter-demand intervals . Then the forecast is given by:
A variation of the classic Croston’s method where the smooting paramater is optimally
selected from the range . Both the non-zero demand and the inter-demand
intervals are smoothed separately, so their smoothing parameters can be different.
Parameters:
CrostonOptimized.fit
y.
Parameters:
Returns:
CrostonOptimized.predict
Returns:
CrostonOptimized.predict_in_sample
Returns:
CrostonOptimized.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
CrostonSBA
CrostonSBA
_TS
CrostonSBA model.
A method to forecast time series that exhibit intermittent demand.
It decomposes the original time series into a non-zero demand size and
inter-demand intervals . Then the forecast is given by:
A variation of the classic Croston’s method that uses a debiasing factor, so that the
forecast is given by:
Parameters:
CrostonSBA.fit
y.
Parameters:
Returns:
CrostonSBA.predict
Returns:
CrostonSBA.predict_in_sample
Returns:
CrostonSBA.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
IMAPA
IMAPA
_TS
IMAPA model.
Intermittent Multiple Aggregation Prediction Algorithm: Similar to ADIDA, but instead of
using a single aggregation level, it considers multiple in order to capture different
dynamics of the data. Uses the optimized SES to generate the forecasts at the new levels
and then combines them using a simple average.
Parameters:
IMAPA.fit
y.
Parameters:
Returns:
IMAPA.predict
Returns:
IMAPA.predict_in_sample
Returns:
IMAPA.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
TSB
TSB
_TS
TSB model.
Teunter-Syntetos-Babai: A modification of Croston’s method that replaces the inter-demand
intervals with the demand probability , which is defined as follows.
Hence, the forecast is given by
Both and are forecasted using SES. The smooting paramaters of each may differ,
like in the optimized Croston’s method.
Parameters:
TSB.fit
y.
Parameters:
Returns:
TSB.predict
Returns:
TSB.predict_in_sample
Returns:
TSB.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
Multiple Seasonalities
MSTL
MSTL
_TS
MSTL model.
The MSTL (Multiple Seasonal-Trend decomposition using LOESS) decomposes the time series
in multiple seasonalities using LOESS. Then forecasts the trend using
a custom non-seaonal model and each seasonality using a SeasonalNaive model.
Parameters:
MSTL.fit
y.
Parameters:
Returns:
MSTL.predict
Returns:
MSTL.predict_in_sample
Returns:
MSTL.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
MFLES
MFLES
_TS
MFLES model.
A method to forecast time series based on Gradient Boosted Time Series Decomposition
which treats traditional decomposition as the base estimator in the boosting
process. Unlike normal gradient boosting, slight learning rates are applied at the
component level (trend/seasonality/exogenous).
The method derives its name from some of the underlying estimators that can
enter into the boosting procedure, specifically: a simple Median, Fourier
functions for seasonality, a simple/piecewise Linear trend, and Exponential
Smoothing.
Parameters:
MFLES.fit
Returns:
MFLES.predict
Returns:
MFLES.predict_in_sample
Returns:
MFLES.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
TBATS
TBATS
AutoTBATS
Trigonometric Box-Cox transform, ARMA errors, Trend and Seasonal components (TBATS) model.
TBATS is an innovations state space model framework used for forecasting time series with multiple seasonalities. It uses a Box-Cox tranformation, ARMA errors, and a trigonometric representation of the seasonal patterns based on Fourier series.
The name TBATS is an acronym for the key features of the model: Trigonometric, Box-Cox transform, ARMA errors, Trend, and Seasonal components.
Parameters:
Theta Family
Theta
Theta
AutoTheta
Standard Theta Method.
Parameters:
OptimizedTheta
OptimizedTheta
AutoTheta
Optimized Theta Method.
Parameters:
DynamicTheta
DynamicTheta
AutoTheta
Dynamic Standard Theta Method.
Parameters:
DynamicOptimizedTheta
DynamicOptimizedTheta
AutoTheta
Dynamic Optimized Theta Method.
Parameters:
ARCH/GARCH Family
GARCH
GARCH
_TS
Generalized Autoregressive Conditional Heteroskedasticity (GARCH) model.
A method for modeling time series that exhibit non-constant volatility over time.
The GARCH model assumes that at time , is given by:
with
Here is a sequence of iid random variables with zero mean and unit variance.
The coefficients , , , and , must satisfy the following conditions:
- and for all and .
- . Here it is assumed that for and for .
GARCH.fit
y.
Parameters:
Returns:
GARCH.predict
Returns:
GARCH.predict_in_sample
Returns:
GARCH.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
ARCH
ARCH
GARCH
Autoregressive Conditional Heteroskedasticity (ARCH) model.
A particular case of the GARCH(p,q) model where .
It assumes that at time , is given by:
with
Here is a sequence of iid random variables with zero mean and unit variance.
The coefficients and , must be nonnegative and .
Parameters:
Machine Learning
SklearnModel
SklearnModel
_TS
scikit-learn model wrapper
Parameters:
SklearnModel.fit
Returns:
SklearnModel.predict
Returns:
SklearnModel.predict_in_sample
Returns:
SklearnModel.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
Fallback Models
These models are used as fallbacks when other models fail during forecasting.ConstantModel
ConstantModel
_TS
Constant Model.
Returns Constant values.
Parameters:
ConstantModel.fit
y.
Parameters:
Returns:
ConstantModel.predict
Returns:
ConstantModel.predict_in_sample
Returns:
ConstantModel.forecast
fit_predict without storing information.
It assumes you know the forecast horizon in advance.
Parameters:
Returns:
ZeroModel
ZeroModel
ConstantModel
Returns Zero forecasts.
Returns Zero values.
Parameters:
NaNModel
NaNModel
ConstantModel
NaN Model.
Returns NaN values.
Parameters:
Usage Examples
Basic Model Usage
Using Multiple Models
Model with Prediction Intervals
Sparse/Intermittent Data
Multiple Seasonalities
ARCH/GARCH for Volatility
Using Scikit-learn Models
Model Selection Tips
- For automatic selection: Start with
AutoARIMAorAutoETS - For baseline comparison: Use
Naive,SeasonalNaive, orHistoricAverage - For seasonal data: Use models with
season_lengthparameter - For sparse data: Use Croston family or ADIDA
- For multiple seasonalities: Use MSTL or TBATS
- For volatile data: Use GARCH or ARCH
- For ensemble approaches: Combine multiple models and compare performance

