- Introduced by
- Box & Jenkins (ARIMA framework); SARIMAX extension with exogenous regressors
- Year
- 2015
- Type
- Seasonal time-series regression model
What does it do?
SARIMAX extends the seasonal ARIMA (Box-Jenkins) model by adding exogenous explanatory variables, so it can capture the effect of holidays, economic indicators, or policy variables on a time series.
It combines non-seasonal and seasonal autoregressive and moving-average dynamics with external regressors, and is estimated by maximum likelihood in state-space form.
The intuition behind the method
Plain seasonal ARIMA learns a series purely from its own past values and its repeating seasonal pattern. SARIMAX lets you also feed in outside drivers you know about — a promotion calendar, a temperature index, an interest rate — so the model can attribute part of the movement to those known causes and the rest to its own autoregressive and seasonal memory. The result is a forecast that reacts both to the series' history and to the external conditions you supply.
History
The seasonal ARIMA framework belongs to the Box-Jenkins tradition, presented in Box, Jenkins, Reinsel and Ljung's Time Series Analysis. Hyndman and Athanasopoulos's Forecasting: Principles and Practice covers ARIMA with external regressors from an applied forecasting perspective. SARIMAX is the standard name for the seasonal ARIMA model extended with exogenous regressors.
When to use it
Use SARIMAX for a single continuous time series that shows seasonality and is also driven by known external variables you can supply for the forecast horizon. It needs a reasonably long history that covers several full seasonal cycles; about 48 observations is a rough rule of thumb, and the length actually required depends on the seasonal period and the number of parameters. The key assumptions are that the response can be made stationary through differencing, that the regressors are stationary (or have been differenced) and known in advance for the forecast periods, and that the residuals are free of autocorrelation. It is less suitable when the future values of the external drivers are unknown, when the series is too short to pin down the seasonal pattern, or when relationships are strongly non-linear.
Limitations and considerations
- Requires the future values of the exogenous regressors to be known over the forecast horizon, which is often not the case.
- Needs a series long enough to cover several seasonal cycles and to identify the seasonal structure reliably; about 48 observations is only a rough guide.
- The response must be made stationary by differencing, non-stationary predictors need attention, and residuals must be checked for autocorrelation; violations undermine the forecasts.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Captures the effect of external drivers such as holidays, economic indicators, or policy variables on top of the series' own seasonal and autoregressive dynamics.
- Handles both seasonal and non-seasonal dependence within one Box-Jenkins framework.
- Estimates the regression coefficients and the ARMA terms jointly in a single likelihood, so the exogenous effects are estimated alongside the dynamics rather than in a separate pre-filtering step.
Applications
- Demand and sales forecasting where holidays or promotion calendars are known in advance.
- Economic and macro-financial forecasting using indicators or policy variables as external drivers.
- Operational forecasting (energy load, traffic, footfall) where weather or calendar variables explain part of the variation.
How it works
How it works
The response is differenced, (1−B)^d(1−B^s)^D y_t, and the exogenous regressors X_t enter the model alongside it; the differencing operators are not applied to the regressors automatically. The autoregressive polynomials φ and Φ and the moving-average polynomials θ and Θ describe short-run dependence at the regular lag and dependence at the seasonal lag s. Because the regression term sits on the differenced response, β is the expected effect of a one-unit change in X_t on the differenced response, conditional on its lagged values. If a predictor is non-stationary, difference it explicitly before fitting; this changes the practical interpretation of β.
Formula
\Phi(B^{s})\,\phi(B)\,(1-B)^{d}(1-B^{s})^{D}\,y_t = X_t\beta + \Theta(B^{s})\,\theta(B)\,\varepsilon_tThe regression coefficients β and the AR and MA coefficients are estimated jointly by maximising the log-likelihood log L(θ | y, X) in one step, not by pre-removing the regression effect and then fitting ARIMA. The likelihood is evaluated through a Kalman filter on the state-space form. The innovations are typically assumed Gaussian, and some implementations allow a Student t distribution. The exogenous covariates are treated as fixed during estimation and inference. Forecasts apply the fitted dynamics to future values of X_t, so the regressors must be supplied for the whole forecast horizon.
Formula
\hat{\theta} = \arg\max_{\theta}\; \log L(\theta \mid y, X)Common pitfalls
- Forecasting without genuine future values for the exogenous regressors and substituting guesses, which leaks error into the forecast.
- Reading β as a plain regression slope on the raw level of the series. When the response is differenced, β is the expected effect of a one-unit change in X_t on the differenced response, conditional on lagged values; differencing a predictor changes this interpretation again.
- Leaving a non-stationary predictor undifferenced. A significance test on β can then give a false negative, so check each regressor for stationarity and difference it if needed.
- Skipping the residual autocorrelation check, so the model is accepted while it still has unmodelled structure.
- Over-differencing or under-differencing the series, leaving it non-stationary or introducing artificial dependence.
- Fitting seasonal terms on a series too short to support the chosen seasonal period.
Frequently asked questions
How is SARIMAX different from plain SARIMA?
SARIMA models a series only from its own past and seasonal pattern. SARIMAX adds exogenous regressors (the X term), so it can also account for the effect of known external variables such as holidays, economic indicators, or policy changes.
Why do I need future values of the exogenous variables?
Because the model attributes part of the series' movement to those external drivers, it cannot forecast forward without knowing their future values. You must supply the exogenous regressors over the whole forecast horizon, which is why they should be quantities that are known or independently forecastable in advance.
How long does my series need to be?
There is no exact cut-off. About 48 observations is a rough rule of thumb, but the series should cover several full seasonal cycles, and the number needed grows with the seasonal period and the number of parameters. Short series make the seasonal AR and MA terms hard to estimate.
What should I check after fitting?
Confirm the differenced response and the regressors are stationary and that the residuals show no remaining autocorrelation. Autocorrelated residuals mean the model has missed structure and the forecasts and intervals will be unreliable.
Related methods
Sources
Hyndman, R. J. & Athanasopoulos, G. (2021). Forecasting: Principles and Practice (3rd ed.). OTexts.
Open publication referenceBox, G. E. P., Jenkins, G. M., Reinsel, G. C. & Ljung, G. M. (2015). Time Series Analysis: Forecasting and Control (5th ed.). Wiley.
ISBN: 978-1118675021