Time Series Analysis: Classical Methods#
๐ Decomposing Time, Forecasting the Future
A comprehensive tour of classical time series methods applied to benchmark datasets
Project Overview#
Time series data โ sequences of observations indexed by time โ appear throughout science, economics, and industry. This project provides a rigorous yet accessible walkthrough of the classical toolkit: from the humble exponential smoother through to full ARIMA-family models and a brief introduction to state-space representations. Each method is motivated theoretically, implemented in Python, and applied to canonical benchmark datasets so that behaviour is immediately interpretable.
Datasets used include:
Air Passengers (Box & Jenkins, 1976): monthly international airline passenger counts 1949โ1960 โ the drosophila of time series, exhibiting clear trend, multiplicative seasonality, and increasing variance
Monthly Milk Production (Cryer, 1986): monthly pounds of milk per cow 1962โ1975 โ additive seasonality with linear trend
Sunspot Numbers (WDC-SILSO): annual sunspot counts from 1700 โ stationary-ish with quasi-periodic ~11-year solar cycle; classic AR/ARMA showcase
Mauna Loa COโ (Keeling, NOAA): monthly atmospheric COโ 1958โpresent โ strong trend plus annual seasonality; good for Fourier decomposition
UK Retail Sales (ONS): monthly index values โ real-world irregularity, trading-day effects, and the challenges of official statistics
Project Structure#
This analysis is organised into eight interconnected notebooks:
๐ 1. Introduction & Data Loading
Loading datasets, visualising raw series, ACF/PACF, classical and STL decomposition
๐ 2. Simple Exponential Smoothing
Level smoothing, ฮฑ optimisation, ARIMA(0,1,1) equivalence
๐ก๏ธ 3. Holt-Winters Smoothing
Trend and seasonal extensions, ETS framework, AIC model selection
๐ 5. ARMA & ARIMA
Stationarity testing, Box-Jenkins methodology, AR/MA identification
โ๏ธ 6. SARIMA
Seasonal differencing, airline model, auto-ARIMA, production seasonal adjustment
Key Questions#
๐ How does the choice of smoothing parameter ฮฑ affect forecast responsiveness vs stability?
๐ What does the autocorrelation structure of a residual series tell us about model adequacy?
๐ When does seasonal differencing outperform explicit Fourier seasonality?
๐ How do ARIMA and structural state-space models relate mathematically, and do they diverge in practice?
๐ Which classical method produces the best out-of-sample forecasts on benchmark data?
Datasets#
Dataset |
Frequency |
Length |
Key Features |
|---|---|---|---|
Air Passengers |
Monthly |
144 obs (1949โ1960) |
Multiplicative trend+season, growing variance |
Milk Production |
Monthly |
168 obs (1962โ1975) |
Additive trend+season |
Sunspots |
Annual |
300+ obs (1700โpresent) |
Quasi-periodic, near-stationarity |
Mauna Loa COโ |
Monthly |
700+ obs (1958โpresent) |
Strong nonlinear trend, annual seasonality |
UK Retail Sales |
Monthly |
~300 obs |
Real-world noise, calendar effects |
Technical Approach#
Classical additive/multiplicative decomposition, STL
ADF, KPSS, variance-ratio tests
statsmodels, pmdarima auto-ARIMA
scipy.signal, manual DFT, Fourier regressors
Time-series cross-validation, rolling windows
Expected Outcomes#
Ready to explore?