SARIMA for recurring seasonal demand
In this article (5 sections)
SARIMA extends ARIMA with seasonal autoregressive, differencing and moving-average terms at a declared period. For monthly data with annual recurrence, the period is 12. A seasonal AR term can relate a month to the same point in the previous annual cycle while the nonseasonal terms model shorter dependence.
The extra structure should earn its place in a controlled future-date comparison. Adding every available term creates a large search, fragile estimates and a result that is hard to explain.
Hold everything else constant
The verified lab compares two models fitted on the same 96 training months. Both use nonseasonal order (1,1,0) and a linear trend. The only change is a seasonal AR(1) at period 12.
| Model | Seasonal order | Validation RMSE | Training AIC |
|---|---|---|---|
| Nonseasonal | (0,0,0,0) | 11.53 | 632.52 |
| Seasonal | (1,0,0,12) | 6.62 | 560.63 |
The seasonal candidate wins on the declared validation score and AIC for this authored series.
from timeseries_cases import sarima_case
result = sarima_case()
assert len(result["candidates"]) == 2
assert result["selected"] == "seasonal"
print(round(result["candidates"][1]["validation_rmse"], 2))This prints 6.62. The comparison supports the seasonal term for this fixture; it does not prove that (1,0,0,12) is the best seasonal order in all monthly data.
Define what “seasonal” means
Regular peaks in a plot can come from calendar recurrence, planned campaigns, trading-day composition or a changing mix of products. SARIMA models correlation at a lag; it does not identify the cause. A movable festival may need an explicit calendar variable. A promotion known in advance may be a future covariate. Stockouts can censor the observed target and create misleading seasonal troughs.
Use a complete time index. A lag of 12 rows means 12 months only when no months are missing. Aggregate duplicates and define partial-period handling before fitting. Decide whether the target is demand, orders or capacity-limited sales.
Diagnose beyond the winning score
Inspect residual autocorrelation, convergence, parameter stability and errors by horizon. Backtest across several origins because a single validation window may favor a transient pattern. Compare against seasonal naïve: a seasonal statistical model that cannot improve on last year’s month needs a clear operational reason to survive.
The final test in this fixture begins with an authored structural break. The seasonal validation win cannot promise performance after that shift. This separation illustrates why model selection evidence and stress behavior belong in the same report.
The Data Science course connects seasonal models to data contracts, diagnostics and deployment handovers rather than stopping at a successful .fit() call.
Exercise
Predeclare seasonal AR and seasonal differencing alternatives. Compare them through rolling origins, include seasonal naïve, and chart errors by calendar month. Explain whether each seasonal term represents persistence, differencing or an external event.
Continue learning
This article is part of the Forecasting and time-series analysis sequence. Use the neighbouring tasks when you need the prerequisite or the next application.
- Review the prerequisite or neighbouring task in ARIMA order selection without tuning on the future.
- Continue with Exponential smoothing with interpretable components.
References: statsmodels time-series API and Forecasting: Principles and Practice on seasonal ARIMA.
Pankit Kumar has 10 years in Data Science & AI, building and shipping production systems in regulated pharma and clinical environments. He is a freelance trainer at Boston Institute of Analytics, AnalytixLabs and Scaler, and has taught this material to thousands of working professionals.
This article is part of our Data Science programme — 6 months. From data foundations to machine learning, deep learning and deployment.
Explore Data Science