SARIMAX, when the cycle and a holiday calendar both matter
Add seasonal differencing for cycles, add an exogenous regressor for known drivers, then cross-validate the order. SARIMAX takes you a long way. The verdict will also tell you when it stops being enough, and what the practitioner reaches for next.
SARIMAX$(p,d,q)(P,D,Q)_m$ with $X$
Pick a series, pick an order
Six scenarios, including one with an exogenous regressor that you can switch on or off to see what X buys you.
| Candidate | 50% train σ | 67% train σ | 83% train σ | Mean σ |
|---|
Pick a series and a model order to see the verdict.
Five things worth knowing
Click to reveal the limits of the toolkit.
How do I pick D for seasonal differencing?
Look at the seasonal sub-series, the values at lags m, 2m, 3m, etc. If they drift, D=1 is needed. Almost no real series needs D > 1. Pair it with d for the trend, so the typical order is d=1, D=1, m matching the dominant period. Hyndman calls this the airline model when p, q, P, Q are all small.
What does an exogenous regressor add?
X is a covariate the forecaster knows in advance, like a price, a promotion flag, a temperature forecast, or a calendar holiday indicator. Its coefficient is fitted jointly with the SARIMA part, so the residuals are what is left after both the seasonal structure and the known driver. X must be known at the time you make the forecast, otherwise the model is unusable in production.
Why rolling-origin cross-validation, not random k-fold?
Time series have order. Random folds let the model peek at the future when training, which inflates apparent accuracy. Rolling-origin keeps the train set strictly before the test set, so the validation mimics how the model will actually be used. Always validate forecasts the way you will deploy them.
What if there are multiple seasonalities?
Daily call-centre data has weekly and yearly cycles together. SARIMAX handles only one. Practitioners reach for TBATS, MSTL with ARIMA on the deseasonalised remainder, Prophet (which has built-in additive multi-seasonal terms), or NeuralProphet for non-linear additions. The verdict on this page will say so when the scenario calls for it.
When does SARIMAX really stop being enough?
When the relationship between X and y is non-linear, when there are interactions between calendar effects, or when the residuals show clusters of variance the homoscedastic assumption cannot absorb. The honest answer is then a tree-based regressor (LightGBM, XGBoost) with engineered features, a neural network like NeuralProphet, or a structural state-space model that lets you put domain knowledge in. The bridge to chapter five, if you ever write it, would be exactly this.