Module · 5 lessons

Seasonality: SARIMA

Extend ARIMA with seasonal terms — a second (P, D, Q) applied at the seasonal lag — to model the yearly structure that non-seasonal ARIMA couldn't, and finally beat the seasonal-naive baseline on Cyclepath.

At a glance

Level
Intermediate
Lessons
5 lessons
Time to complete
1 week
Cost
Free forever · no sign-up

Welcome to Seasonality: SARIMA, the sixth module of the course. Module 5 reached an honest wall: a non-seasonal ARIMA, no matter how carefully tuned, couldn’t cleanly beat the simple seasonal-naive baseline on Cyclepath — the best stable model managed 16% MAPE against the baseline’s 5.9%, because ARIMA has no term whose job is to capture “this July resembles last July.” SARIMA fixes exactly that gap, and this module is where the whole course pays off.

You’ll start by extending ARIMA to SARIMA — adding a second set of orders (P, D, Q)[s] that operate at the seasonal lag, alongside the familiar non-seasonal (p, d, q). You’ll build the seasonal AR and MA terms and see how a seasonal-AR coefficient relates this period to the same period a full cycle ago. You’ll fit a SARIMA to Cyclepath with statsmodels, reading the summary and forecasting. You’ll run proper diagnostics — the Ljung-Box residual test that Module 4’s preview model failed — to confirm the model is actually adequate, not just numerically better. The capstone forecasts Cyclepath’s held-out year and, for the first time in the course, beats the seasonal-naive baseline decisively: a 1.06% MAPE, more than five times better than the 5.9% bar.

Every coefficient, forecast, and diagnostic in this module is computed for real with statsmodels.tsa.statespace.sarimax.SARIMAX on the seeded Cyclepath series. Start with Lesson 1 on extending ARIMA to SARIMA.

Lessons in this module

Achievement

Complete all 5 lessons to finish the Seasonality: SARIMA module.

Start module