Module · 5 lessons

AR, MA, ARMA, ARIMA

Build the classical forecasting model family from the ground up — autoregression, moving averages, their combination, and the integration step that turns ARMA into ARIMA — then fit and forecast with statsmodels.

At a glance

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

Welcome to AR, MA, ARMA, ARIMA, the fifth module of the course. Everything so far has been preparation: you made Cyclepath stationary (Module 3) and read its ACF/PACF to shortlist candidate orders (Module 4). Now you build the actual models those orders describe — the classical forecasting family that has powered production systems for decades, and the direct ancestor of the seasonal models in Module 6.

You’ll start with the autoregressive (AR) model — today as a weighted sum of its own recent past — and fit one, recovering a known coefficient from synthetic data. You’ll build the moving-average (MA) model — today as a weighted sum of recent random shocks — and see how its forecasting behavior differs sharply from AR’s. You’ll combine them into ARMA, then add the integration step — the “I” in ARIMA — which is just the differencing from Module 3 folded into the model, letting it handle trending data directly. You’ll fit and forecast with statsmodels, reading a real model summary and producing forecasts with honest confidence intervals. The capstone fits an ARIMA to Cyclepath and confronts an important, honest result: a non-seasonal model, however well-tuned, can’t cleanly beat the seasonal-naive baseline — which is exactly the motivation for SARIMA.

Every coefficient, forecast, and error metric in this module is computed for real with statsmodels.tsa.arima.model.ARIMA — on synthetic processes with known structure, and on the seeded Cyclepath series from every prior module. Start with Lesson 1 on the autoregressive model.

Lessons in this module

Achievement

Complete all 5 lessons to finish the AR, MA, ARMA, ARIMA module.

Start module