Introduction: From Microsecond Execution to Statistical Convergence

In Lesson 2, we examined high-frequency trading strategies, co-location infrastructure, limit order book modeling via Hawkes processes, and the Avellaneda-Stoikov inventory framework. While HFT strategies operate on microsecond time horizons capturing order book imbalances, institutional quantitative desks also deploy medium-frequency strategies that operate across minutes, hours, or days.

Among the most enduring and widely deployed institutional strategies is Statistical Arbitrage (StatArb). Unlike classical arbitrage—which exploits risk-free price discrepancies of identical assets across different venues—statistical arbitrage exploits temporary statistical mispricings across baskets of related assets, betting on eventual mean reversion. This lesson deconstructs cointegration theory, the Engle-Granger two-step method, the Johansen cointegration test, Ornstein-Uhlenbeck mean-reversion modeling, and dynamic pairs trading execution.

Part 1: Foundations of Mean Reversion and Cointegration

Financial asset prices are generally non-stationary time series (often modeled as random walks). However, linear combinations of certain asset prices exhibit stationary mean-reverting properties.

1. Stationarity and the Augmented Dickey-Fuller (ADF) Test

  • Stationarity: A time series is stationary if its mean, variance, and autocovariance remain constant over time. Most raw asset price series $P_t$ are non-stationary.

  • The ADF Test: Quantitative researchers test whether a price series or spread contains a unit root. The regression model tests:

    Delta(P_t) = alpha + beta * P_(t-1) + Sum(gamma_i * Delta(P_(t-i))) + epsilon_t

    If the test statistic allows us to reject the null hypothesis of a unit root, the series is stationary.

2. Cointegration vs. Correlation

Correlation measures whether two assets move in the same direction over a specific window, but correlation can break down during market stress. Cointegration goes a step further: it proves that a linear combination of two or more non-stationary price series shares a stationary stochastic drift, meaning their price spread is mean-reverting.

  • If Asset A and Asset B are cointegrated, there exists a hedge ratio (alpha) such that the spread:

    Spread_t = P_(A,t) – alpha * P_(B,t)

    fluctuates around a constant long-term mean.

Part 2: Testing and Estimating Cointegration Vectors

To construct robust pairs trading and statistical arbitrage portfolios, quants employ rigorous econometric testing procedures.

1. The Engle-Granger Two-Step Method

The Engle-Granger method tests cointegration for a pair of assets:

  1. Step 1: Run an Ordinary Least Squares (OLS) regression of Asset A prices on Asset B prices to determine the hedge ratio:

    P_(A,t) = mu + beta * P_(B,t) + epsilon_t

  2. Step 2: Extract the residual series (residuals representing the spread) and apply the Augmented Dickey-Fuller test to check if the residuals are stationary. If stationary, the assets are cointegrated.

2. The Johansen Test for Multi-Asset Baskets

When expanding from pairs trading to multi-asset portfolios (e.g., matching a basket of 10 banking stocks), the Engle-Granger method is insufficient because it assumes a single cointegrating relationship. The Johansen Test utilizes vector autoregression (VAR) matrix formulations to test for multiple cointegrating vectors simultaneously across high-dimensional asset universes.

Part 3: Ornstein-Uhlenbeck Processes and Mean-Reversion Speed

Once a cointegrated spread is established, quantitative models treat the spread as a continuous-time stochastic process governed by mean reversion.

1. The Ornstein-Uhlenbeck (OU) Differential Equation

The Ornstein-Uhlenbeck process is a stochastic differential equation that models a mean-reverting velocity:

dX_t = theta * (mu – X_t) * dt + sigma * dW_t

where:

  • X_t = The spread value at time t

  • mu = The long-term equilibrium mean

  • theta = The speed of mean reversion (rate at which the spread returns to mu)

  • sigma = The instantaneous volatility of the spread

  • dW_t = Standard Brownian motion (Wiener process)

2. Estimating OU Parameters via Discretization

To implement the OU model programmatically, researchers discretize the continuous equation into an autoregressive AR(1) format:

X_t = a + b * X_(t-1) + epsilon_t

From the estimated AR(1) coefficients ($a$ and $b$), the continuous-time parameters are recovered:

  • theta = -ln(b) / Delta_t

  • mu = a / (1 – b)

    The expected half-life of mean reversion—the time required for the spread to cover half the distance back to its mean—is calculated as:

    Half-Life = ln(2) / theta

    Trades are structured such that entry thresholds trigger when the spread deviates by a specified number of standard deviations (e.g., 2.0 standard deviations), with exit triggers at the mean ($mu$).

Part 4: Practical Implementation and Risk Management in StatArb

Executing statistical arbitrage strategies in live production environments requires strict risk controls to prevent catastrophic drawdowns.

1. Structural Breakdowns and Regime Shifts

The primary risk in pairs trading is structural cointegration breakdown—where the economic relationship underlying two companies permanently severs (e.g., due to an unexpected merger, accounting fraud, or fundamental business model divergence). If a model assumes mean reversion on a permanently broken spread, it accumulates massive unrealized losses (“catching a falling knife”).

  • Stop-Loss and Maximum Holding Time: Quantitative desks enforce strict hard stop-losses if the spread exceeds 4.0 standard deviations or if the trade exceeds twice the calculated half-life duration.

2. Transaction Costs and Capital Allocation

StatArb strategies execute frequent rebalancing trades. If the bid-ask spread or exchange commissions exceed the expected mean-reversion profit spread, the strategy becomes unprofitable. Backtests must explicitly incorporate realistic transaction cost penalties and borrowing fees for short positions.

Summary

Statistical arbitrage, pairs trading, and mean-reversion models provide a robust medium-frequency quantitative framework.

  • Cointegration vs. Correlation: Identifies stationary, mean-reverting pricing spreads across non-stationary asset price series.

  • Engle-Granger & Johansen Tests: Provide econometric frameworks for estimating hedge ratios and cointegrating vectors across pairs and multi-asset baskets.

  • Ornstein-Uhlenbeck Processes: Model spread dynamics, reversion speed, and half-life duration to optimize trade entry and exit timing.

  • Risk Management Controls: Mitigate structural cointegration breakdowns and transaction cost erosion to ensure sustainable portfolio alpha generation.