Skip to main content
StatsForecast offers a wide variety of statistical forecasting models grouped into the following categories:
  • 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

Bases: _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
Fit the AutoARIMA model. Fit an AutoARIMA to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
AutoARIMA.predict
Predict with fitted AutoArima. Parameters: Returns:
AutoARIMA.predict_in_sample
Access fitted AutoArima insample predictions. Parameters: Returns:
AutoARIMA.forecast
Memory Efficient AutoARIMA predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

AutoETS

AutoETS

Bases: _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 MM multiplicative, AA additive, ZZ optimized or NN ommited components. The model string parameter defines the ETS equations: E in [M,A,ZM, A, Z], T in [N,A,M,ZN, A, M, Z], and S in [N,A,M,ZN, A, M, Z]. 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
Fit the Exponential Smoothing model. Fit an Exponential Smoothing model to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
AutoETS.predict
Predict with fitted Exponential Smoothing. Parameters: Returns:
AutoETS.predict_in_sample
Access fitted Exponential Smoothing insample predictions. Parameters: Returns:
AutoETS.forecast
Memory Efficient Exponential Smoothing predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

AutoCES

AutoCES

Bases: _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 SS simple, PP parial, ZZ optimized or NN ommited components. The model string parameter defines the kind of CES model: NN for simple CES (withous seasonality), SS for simple seasonality (lagged CES), PP for partial seasonality (without complex part), FF 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
Fit the Complex Exponential Smoothing model. Fit the Complex Exponential Smoothing model to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
AutoCES.predict
Predict with fitted Exponential Smoothing. Parameters: Returns:
AutoCES.predict_in_sample
Access fitted Exponential Smoothing insample predictions. Parameters: Returns:
AutoCES.forecast
Memory Efficient Complex Exponential Smoothing predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

AutoTheta

AutoTheta

Bases: _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
Fit the AutoTheta model. Fit an AutoTheta model to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
AutoTheta.predict
Predict with fitted AutoTheta. Parameters: Returns:
AutoTheta.predict_in_sample
Access fitted AutoTheta insample predictions. Parameters: Returns:
AutoTheta.forecast
Memory Efficient AutoTheta predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

AutoMFLES

AutoMFLES

Bases: _TS AutoMFLES Parameters:
AutoMFLES.fit
Fit the model Parameters: Returns:
AutoMFLES.predict
Predict with fitted AutoMFLES. Parameters: Returns:
AutoMFLES.predict_in_sample
Access fitted AutoMFLES insample predictions. Parameters: Returns:
AutoMFLES.forecast
Memory Efficient AutoMFLES predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

AutoTBATS

AutoTBATS

Bases: _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
Fit TBATS model. Fit TBATS model to a time series (numpy array) y. Parameters: Returns:
AutoTBATS.predict
Predict with fitted TBATS model. Parameters: Returns:
AutoTBATS.predict_in_sample
Access fitted TBATS model predictions. Parameters: Returns:
AutoTBATS.forecast
Memory Efficient TBATS model. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

ARIMA Family

ARIMA

ARIMA

Bases: _TS ARIMA model. AutoRegressive Integrated Moving Average model. Parameters:
ARIMA.fit
Fit the model to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
ARIMA.predict
Predict with fitted model. Parameters: Returns:
ARIMA.predict_in_sample
Access fitted insample predictions. Parameters: Returns:
ARIMA.forecast
Memory efficient predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

AutoRegressive

AutoRegressive

Bases: ARIMA Simple Autoregressive model. Parameters:
AutoRegressive.fit
Fit the model to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
AutoRegressive.predict
Predict with fitted model. Parameters: Returns:
AutoRegressive.predict_in_sample
Access fitted insample predictions. Parameters: Returns:
AutoRegressive.forecast
Memory efficient predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

Exponential Smoothing

SimpleExponentialSmoothing

SimpleExponentialSmoothing

Bases: _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 tt observations, the one-step forecast is given by: hatyt+1=alphayt+(1alpha)hatyt1\\hat{y}_{t+1} = \\alpha y_t + (1-\\alpha) \\hat{y}_{t-1} The rate 0leqalphaleq10 \\leq \\alpha \\leq 1 at which the weights decrease is called the smoothing parameter. When alpha=1\\alpha = 1, SES is equal to the naive method. Parameters:
SimpleExponentialSmoothing.fit
Fit the SimpleExponentialSmoothing model. Fit an SimpleExponentialSmoothing to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
SimpleExponentialSmoothing.predict
Predict with fitted SimpleExponentialSmoothing. Parameters: Returns:
SimpleExponentialSmoothing.predict_in_sample
Access fitted SimpleExponentialSmoothing insample predictions. Returns:
SimpleExponentialSmoothing.forecast
Memory Efficient SimpleExponentialSmoothing predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

SimpleExponentialSmoothingOptimized

SimpleExponentialSmoothingOptimized

Bases: _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 tt observations, the one-step forecast is given by: hatyt+1=alphayt+(1alpha)hatyt1\\hat{y}_{t+1} = \\alpha y_t + (1-\\alpha) \\hat{y}_{t-1} The smoothing parameter alpha\*\\alpha^\* is optimized by square error minimization. Parameters:
SimpleExponentialSmoothingOptimized.fit
Fit the SimpleExponentialSmoothingOptimized model. Fit an SimpleExponentialSmoothingOptimized to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
SimpleExponentialSmoothingOptimized.predict
Predict with fitted SimpleExponentialSmoothingOptimized. Parameters: Returns:
SimpleExponentialSmoothingOptimized.predict_in_sample
Access fitted SimpleExponentialSmoothingOptimized insample predictions. Returns:
SimpleExponentialSmoothingOptimized.forecast
Memory Efficient SimpleExponentialSmoothingOptimized predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

SeasonalExponentialSmoothing

SeasonalExponentialSmoothing

Bases: _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 tt observations and season ss, the one-step forecast is given by: hatyt+1,s=alphayt+(1alpha)hatyt1,s\\hat{y}_{t+1,s} = \\alpha y_t + (1-\\alpha) \\hat{y}_{t-1,s} Parameters:
SeasonalExponentialSmoothing.fit
Fit the SeasonalExponentialSmoothing model. Fit an SeasonalExponentialSmoothing to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
SeasonalExponentialSmoothing.predict
Predict with fitted SeasonalExponentialSmoothing. Parameters: Returns:
SeasonalExponentialSmoothing.predict_in_sample
Access fitted SeasonalExponentialSmoothing insample predictions. Returns:
SeasonalExponentialSmoothing.forecast
Memory Efficient SeasonalExponentialSmoothing predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

SeasonalExponentialSmoothingOptimized

SeasonalExponentialSmoothingOptimized

Bases: _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 tt observations and season ss, the one-step forecast is given by: hatyt+1,s=alphayt+(1alpha)hatyt1,s\\hat{y}_{t+1,s} = \\alpha y_t + (1-\\alpha) \\hat{y}_{t-1,s} The smoothing parameter alpha\*\\alpha^\* is optimized by square error minimization. Parameters:
SeasonalExponentialSmoothingOptimized.fit
Fit the SeasonalExponentialSmoothingOptimized model. Fit an SeasonalExponentialSmoothingOptimized to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
SeasonalExponentialSmoothingOptimized.predict
Predict with fitted SeasonalExponentialSmoothingOptimized. Parameters: Returns:
SeasonalExponentialSmoothingOptimized.predict_in_sample
Access fitted SeasonalExponentialSmoothingOptimized insample predictions. Returns:
SeasonalExponentialSmoothingOptimized.forecast
Memory Efficient SeasonalExponentialSmoothingOptimized predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

Holt

Holt

Bases: 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

Bases: 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

Bases: _TS HistoricAverage model. Also known as mean method. Uses a simple average of all past observations. Assuming there are tt observations, the one-step forecast is given by: y^t+1=1tj=1tyj\hat{y}_{t+1} = \frac{1}{t} \sum_{j=1}^t y_j Parameters:
HistoricAverage.fit
Fit the HistoricAverage model. Fit an HistoricAverage to a time series (numpy array) y. Parameters: Returns: r
HistoricAverage.predict
Predict with fitted HistoricAverage. Parameters: Returns:
HistoricAverage.predict_in_sample
Access fitted HistoricAverage insample predictions. Parameters: Returns:
HistoricAverage.forecast
Memory Efficient HistoricAverage predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

Naive

Naive

Bases: _TS Naive model. All forecasts have the value of the last observation: haty_t+1=yt\\hat{y}\_{t+1} = y_t for all tt Parameters:
Naive.fit
Fit the Naive model. Fit an Naive to a time series (numpy.array) y. Parameters: Returns:
Naive.predict
Predict with fitted Naive. Parameters: Returns:
Naive.predict_in_sample
Access fitted Naive insample predictions. Parameters: Returns:
Naive.forecast
Memory Efficient Naive predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

RandomWalkWithDrift

RandomWalkWithDrift

Bases: _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. y^t+1=yt+1t1j=1t(yjyj1)=yt+yty1t1\hat{y}_{t+1} = y_t+\frac{1}{t-1}\sum_{j=1}^t (y_j-y_{j-1}) = y_t+ \frac{y_t-y_1}{t-1} 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
Fit the RandomWalkWithDrift model. Fit an RandomWalkWithDrift to a time series (numpy array) y. Parameters: Returns: r
RandomWalkWithDrift.predict
Predict with fitted RandomWalkWithDrift. Parameters: Returns:
RandomWalkWithDrift.predict_in_sample
Access fitted RandomWalkWithDrift insample predictions. Parameters: Returns:
RandomWalkWithDrift.forecast
Memory Efficient RandomWalkWithDrift predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

SeasonalNaive

SeasonalNaive

Bases: _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
Fit the SeasonalNaive model. Fit an SeasonalNaive to a time series (numpy array) y. Parameters: Returns: r
SeasonalNaive.predict
Predict with fitted Naive. Parameters: Returns:
SeasonalNaive.predict_in_sample
Access fitted SeasonalNaive insample predictions. Parameters: Returns: r
SeasonalNaive.forecast
Memory Efficient SeasonalNaive predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

WindowAverage

WindowAverage

Bases: _TS WindowAverage model. Uses the average of the last kk observations, with kk 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
Fit the WindowAverage model. Fit an WindowAverage to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
WindowAverage.predict
Predict with fitted WindowAverage. Parameters: Returns:
WindowAverage.predict_in_sample
Access fitted WindowAverage insample predictions. Parameters: Returns:
WindowAverage.forecast
Memory Efficient WindowAverage predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

SeasonalWindowAverage

SeasonalWindowAverage

Bases: _TS SeasonalWindowAverage model. An average of the last kk observations of the same period, with kk the length of the window. Parameters: r
SeasonalWindowAverage.fit
Fit the SeasonalWindowAverage model. Fit an SeasonalWindowAverage to a time series (numpy array) y and optionally exogenous variables (numpy array) X. Parameters: Returns:
SeasonalWindowAverage.predict
Predict with fitted SeasonalWindowAverage. Parameters: Returns:
SeasonalWindowAverage.predict_in_sample
Access fitted SeasonalWindowAverage insample predictions. Parameters: Returns:
SeasonalWindowAverage.forecast
Memory Efficient SeasonalWindowAverage predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

Sparse or Intermittent Models

ADIDA

ADIDA

Bases: _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
Fit the ADIDA model. Fit an ADIDA to a time series (numpy array) y. Parameters: Returns:
ADIDA.predict
Predict with fitted ADIDA. Parameters: Returns:
ADIDA.predict_in_sample
Access fitted ADIDA insample predictions. Parameters: Returns:
ADIDA.forecast
Memory Efficient ADIDA predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

CrostonClassic

CrostonClassic

Bases: _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 ztz_t and inter-demand intervals ptp_t. Then the forecast is given by: y^t=z^tp^t\hat{y}_t = \frac{\hat{z}_t}{\hat{p}_t} where hatz_t\\hat{z}\_t and hatp_t\\hat{p}\_t are forecasted using SES. The smoothing parameter of both components is set equal to 0.1 Parameters:
CrostonClassic.fit
Fit the CrostonClassic model. Fit an CrostonClassic to a time series (numpy array) y. Parameters: Returns:
CrostonClassic.predict
Predict with fitted CrostonClassic. Parameters: Returns:
CrostonClassic.predict_in_sample
Access fitted CrostonClassic insample predictions. Parameters: Returns:
CrostonClassic.forecast
Memory Efficient CrostonClassic predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

CrostonOptimized

CrostonOptimized

Bases: _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 ztz_t and inter-demand intervals ptp_t. Then the forecast is given by: y^t=z^tp^t\hat{y}_t = \frac{\hat{z}_t}{\hat{p}_t} A variation of the classic Croston’s method where the smooting paramater is optimally selected from the range [0.1,0.3][0.1,0.3]. Both the non-zero demand ztz_t and the inter-demand intervals ptp_t are smoothed separately, so their smoothing parameters can be different. Parameters:
CrostonOptimized.fit
Fit the CrostonOptimized model. Fit an CrostonOptimized to a time series (numpy array) y. Parameters: Returns:
CrostonOptimized.predict
Predict with fitted CrostonOptimized. Parameters: Returns:
CrostonOptimized.predict_in_sample
Access fitted CrostonOptimized insample predictions. Parameters: Returns:
CrostonOptimized.forecast
Memory Efficient CrostonOptimized predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

CrostonSBA

CrostonSBA

Bases: _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 ztz_t and inter-demand intervals ptp_t. Then the forecast is given by: y^t=z^tp^t\hat{y}_t = \frac{\hat{z}_t}{\hat{p}_t} A variation of the classic Croston’s method that uses a debiasing factor, so that the forecast is given by: y^t=0.95z^tp^t\hat{y}_t = 0.95 \frac{\hat{z}_t}{\hat{p}_t} Parameters:
CrostonSBA.fit
Fit the CrostonSBA model. Fit an CrostonSBA to a time series (numpy array) y. Parameters: Returns:
CrostonSBA.predict
Predict with fitted CrostonSBA. Parameters: Returns:
CrostonSBA.predict_in_sample
Access fitted CrostonSBA insample predictions. Parameters: Returns:
CrostonSBA.forecast
Memory Efficient CrostonSBA predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

IMAPA

IMAPA

Bases: _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
Fit the IMAPA model. Fit an IMAPA to a time series (numpy array) y. Parameters: Returns:
IMAPA.predict
Predict with fitted IMAPA. Parameters: Returns:
IMAPA.predict_in_sample
Access fitted IMAPA insample predictions. Parameters: Returns:
IMAPA.forecast
Memory Efficient IMAPA predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

TSB

TSB

Bases: _TS TSB model. Teunter-Syntetos-Babai: A modification of Croston’s method that replaces the inter-demand intervals with the demand probability dtd_t, which is defined as follows. dt={1if demand occurs at time t0otherwise.d_t = \begin{cases} 1 & \text{if demand occurs at time t} \\ 0 & \text{otherwise.} \end{cases} Hence, the forecast is given by y^t=d^tzt^\hat{y}_t= \hat{d}_t\hat{z_t} Both dtd_t and ztz_t are forecasted using SES. The smooting paramaters of each may differ, like in the optimized Croston’s method. Parameters:
TSB.fit
Fit the TSB model. Fit an TSB to a time series (numpy array) y. Parameters: Returns:
TSB.predict
Predict with fitted TSB. Parameters: Returns:
TSB.predict_in_sample
Access fitted TSB insample predictions. Parameters: Returns:
TSB.forecast
Memory Efficient TSB predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

Multiple Seasonalities

MSTL

MSTL

Bases: _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
Fit the MSTL model. Fit MSTL to a time series (numpy array) y. Parameters: Returns:
MSTL.predict
Predict with fitted MSTL. Parameters: Returns:
MSTL.predict_in_sample
Access fitted MSTL insample predictions. Parameters: Returns:
MSTL.forecast
Memory Efficient MSTL predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

MFLES

MFLES

Bases: _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
Fit the model Parameters: Returns:
MFLES.predict
Predict with fitted MFLES. Parameters: Returns:
MFLES.predict_in_sample
Access fitted SklearnModel insample predictions. Parameters: Returns:
MFLES.forecast
Memory Efficient MFLES predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

TBATS

TBATS

Bases: 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

Bases: AutoTheta Standard Theta Method. Parameters:

OptimizedTheta

OptimizedTheta

Bases: AutoTheta Optimized Theta Method. Parameters:

DynamicTheta

DynamicTheta

Bases: AutoTheta Dynamic Standard Theta Method. Parameters:

DynamicOptimizedTheta

DynamicOptimizedTheta

Bases: AutoTheta Dynamic Optimized Theta Method. Parameters:

ARCH/GARCH Family

GARCH

GARCH

Bases: _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 tt, yty_t is given by: yt=vtσty_t = v_t \sigma_t with σt2=w+i=1paiyti2+j=1qbjσtj2.\sigma_t^2 = w + \sum_{i=1}^p a_i y_{t-i}^2 + \sum_{j=1}^q b_j \sigma_{t-j}^2. Here vtv_t is a sequence of iid random variables with zero mean and unit variance. The coefficients ww, aia_i, i=1,...,pi=1,...,p, and bjb_j, j=1,...,qj=1,...,q must satisfy the following conditions:
  1. w>0w > 0 and ai,bjgeq0a_i, b_j \\geq 0 for all ii and jj.
  2. sum_k=1max(p,q)ak+bk<1\\sum\_{k=1}^{max(p,q)} a_k + b_k < 1. Here it is assumed that ai=0a_i=0 for i>pi>p and bj=0b_j=0 for j>qj>q.
The ARCH model is a particular case of the GARCH model when q=0q=0. Parameters:
GARCH.fit
Fit GARCH model. Fit GARCH model to a time series (numpy array) y. Parameters: Returns:
GARCH.predict
Predict with fitted GARCH model. Parameters: Returns:
GARCH.predict_in_sample
Access fitted GARCH model predictions. Parameters: Returns:
GARCH.forecast
Memory Efficient GARCH model. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

ARCH

ARCH

Bases: GARCH Autoregressive Conditional Heteroskedasticity (ARCH) model. A particular case of the GARCH(p,q) model where q=0q=0. It assumes that at time tt, yty_t is given by: yt=ϵtσty_t = \epsilon_t \sigma_t with σt2=w0+i=1paiyti2\sigma_t^2 = w0 + \sum_{i=1}^p a_i y_{t-i}^2 Here epsilont\\epsilon_t is a sequence of iid random variables with zero mean and unit variance. The coefficients ww and aia_i, i=1,...,pi=1,...,p must be nonnegative and sum_k=1pak<1\\sum\_{k=1}^p a_k < 1. Parameters:

Machine Learning

SklearnModel

SklearnModel

Bases: _TS scikit-learn model wrapper Parameters:
SklearnModel.fit
Fit the model. Parameters: Returns:
SklearnModel.predict
Predict with fitted SklearnModel. Parameters: Returns:
SklearnModel.predict_in_sample
Access fitted SklearnModel insample predictions. Parameters: Returns:
SklearnModel.forecast
Memory Efficient SklearnModel predictions. This method avoids memory burden due from object storage. It is analogous to 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

Bases: _TS Constant Model. Returns Constant values. Parameters:
ConstantModel.fit
Fit the Constant model. Fit an Constant Model to a time series (numpy.array) y. Parameters: Returns:
ConstantModel.predict
Predict with fitted ConstantModel. Parameters: Returns:
ConstantModel.predict_in_sample
Access fitted Constant Model insample predictions. Parameters: Returns:
ConstantModel.forecast
Memory Efficient Constant Model predictions. This method avoids memory burden due from object storage. It is analogous to fit_predict without storing information. It assumes you know the forecast horizon in advance. Parameters: Returns:

ZeroModel

ZeroModel

Bases: ConstantModel Returns Zero forecasts. Returns Zero values. Parameters:

NaNModel

NaNModel

Bases: 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 AutoARIMA or AutoETS
  • For baseline comparison: Use Naive, SeasonalNaive, or HistoricAverage
  • For seasonal data: Use models with season_length parameter
  • 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

References

For detailed information on the statistical models and algorithms, please refer to the source code and the original academic papers referenced in the docstrings.