Lesson 02
A stationary series has constant mean, variance, and autocovariance structure over time. Most statistical forecasting models require stationarity. Prices are not stationary; returns usually are.
A time series xt is weakly stationary if three conditions hold simultaneously: the mean E[xt] = μ is constant and does not depend on t; the variance Var(xt) = σ² is finite and constant; and the covariance Cov(xt, xt+k) depends only on the lag k, not on when in time you are measuring it.
A price series violates all three: the mean drifts upward, the variance grows proportionally with time, and the autocorrelation structure shifts as volatility regimes change. Log returns, by contrast, satisfy all three conditions well enough for practical modelling.
The Augmented Dickey-Fuller (ADF) test is the standard hypothesis test for stationarity. It checks H0: the series has a unit root (non-stationary) against H1: the series is stationary. A p-value below 0.05 lets you reject the null and conclude the series is stationary.
The test works by regressing the differenced series on its lagged level and additional lagged differences. The coefficient on the lagged level is the key parameter: if it is significantly negative, the series mean-reverts, i.e., is stationary.
First differencing Δxt = xt − xt-1 removes linear trends from a series. Each application of the difference operator reduces the degree of integration by one. For a price series that follows a random walk (I(1) process), one round of differencing produces a stationary series. Log-differencing — taking Δ log(Pt) = log(Pt/Pt-1) — combines logging and differencing into a single step that produces log returns.
| Series | Mean drifts? | Variance grows? | Stationary? |
|---|---|---|---|
| Price | ✓ Yes | ✓ Yes | ✗ No |
| Δ Price | ✗ No | ~ Roughly | ~ Usually |
| Log Return | ✗ No | ✗ Roughly constant | ✓ Yes |
A series is said to be integrated of order d, written I(d), if it requires d differences to become stationary. A random walk is I(1): one difference suffices. The letter I in ARIMA(p,d,q) records this: ARIMA models the d-times-differenced version of the original series using an ARMA(p,q) model.
For financial prices, d = 1 is almost universally sufficient. The log-price series is I(1), so log returns (first difference of log prices) are I(0) — stationary. There is almost never a need to use d = 2 on financial return data.