Lesson 4.2: Cointegration and Error Correction Models (VECM)

Finding stable, long-run equilibrium relationships between non-stationary series.

Part 1: The 'Drunk and Her Dog' Analogy

The Core Idea

Imagine a drunk person (a random walk) and their dog (another random walk). Both paths are non-stationary. But they are connected by a leash. They can't wander infinitely far apart. The **distance between them** is stationary and mean-reverting.

This is cointegration. It's a stable, long-run relationship between two or more non-stationary variables.

Part 2: Cointegration and The VECM

Definition of Cointegration

Two I(1)I(1) series, YtY_t and XtX_t, are cointegrated if a linear combination of them, Zt=YtβXtZ_t = Y_t - \beta X_t, is stationary (I(0)I(0)). The vector [1,β][1, -\beta] is the cointegrating vector.

The Vector Error Correction Model (VECM)

A VECM combines short-run dynamics (like a VAR in differences) with long-run equilibrium. It models the *change* in a variable based on lagged changes AND the "error correction term" from the previous period (the lagged cointegrating relationship).

Δy1,t=γ1(y2,t1βy1,t1)+lags(Δyt1)+ϵ1,t\Delta y_{1,t} = \gamma_1 (y_{2,t-1} - \beta y_{1,t-1}) + \text{lags}(\Delta y_{t-1}) + \epsilon_{1,t}

The coefficient γ1\gamma_1 is the "speed of adjustment," telling us how quickly the variable corrects back towards the long-run equilibrium.

Part 3: Testing and Application

We test for cointegration using the **Engle-Granger** or **Johansen** tests. If found, it's the theoretical foundation for **pairs trading**, a market-neutral strategy that bets on the convergence of the spread between two cointegrated assets.

What's Next? State Space Models

The VAR/VECM framework models observed variables. But what if the true "state" of the system (like the "true" inflation rate) is unobservable and we only have noisy measurements?

In the next lesson, we'll explore **State Space Models and the Kalman Filter**, a powerful framework for estimating such hidden states.