Module 1 · Chapter 6 · Lesson 3

Ornstein-Uhlenbeck Process and Its Half-Life Parameter

5 min readHalf-Life of Mean Reversion
The Black Book of Day Trading Strategies
Free Book

The Black Book of Day Trading Strategies

1,000 complete strategies · 31 chapters · Full trade plans

Understanding the Ornstein-Uhlenbeck Process

The Ornstein-Uhlenbeck (OU) process models mean-reverting behavior. It describes a variable pulling back towards its long-term average. This process is a continuous-time stochastic process. It applies widely in quantitative finance. It models interest rates, commodity prices, and spread relationships.

We define the OU process with this stochastic differential equation:

$dX_t = \theta(\mu - X_t)dt + \sigma dW_t$

$X_t$ is the process value at time $t$. $\mu$ represents the long-term mean, the level the process reverts to. $\theta$ is the speed of reversion, a positive parameter. A larger $\theta$ means faster reversion. $\sigma$ is the volatility parameter, representing random shock amplitude. $dW_t$ is a Wiener process, modeling random noise.

Consider a pair trade involving Coca-Cola (KO) and PepsiCo (PEP). We define the spread $S_t = \text{log}(\text{KO}_t) - \text{log}(\text{PEP}_t)$. We hypothesize this spread follows an OU process. If the spread deviates from its historical average, we expect it to revert.

Calculating the Half-Life

The half-life of a mean-reverting process measures the time for a deviation from the mean to decay by 50%. It quantifies reversion speed more intuitively than $\theta$. A shorter half-life indicates stronger mean reversion.

For an OU process, the half-life ($H$) relates directly to the speed of reversion ($\theta$):

$H = \frac{\ln(2)}{\theta}$

To calculate the half-life, we first estimate $\theta$. We estimate $\theta$ using ordino least squares (OLS) regression.

Use the discrete approximation of the OU process. We observe the process at discrete time intervals, $\Delta t$. The change in $X_t$ over $\Delta t$ is $\Delta X_t = X_{t+\Delta t} - X_t$.

The discrete form becomes:

$\Delta X_t = \alpha + \beta X_t + \epsilon_t$

Here, $\beta = -\theta \Delta t$ and $\alpha = \theta \mu \Delta t$. $\epsilon_t$ is the error term.

We estimate $\beta$ by regressing $\Delta X_t$ on $X_t$. Then, we calculate $\theta = -\frac{\beta}{\Delta t}$.

Example: Consider the log price spread between KO and PEP from January 1, 2020, to December 31, 2022. Let $S_t = \text{log}(\text{KO}_t) - \text{log}(\text{PEP}t)$. We calculate daily changes in the spread: $\Delta S_t = S{t+1} - S_t$. We perform an OLS regression: $\Delta S_t = \alpha + \beta S_t + \epsilon_t$. Assume the regression yields $\beta = -0.05$. Our $\Delta t$ is 1 day. Then, $\theta = -(-0.05)/1 = 0.05$.

Now, we calculate the half-life: $H = \frac{\ln(2)}{0.05} \approx \frac{0.693}{0.05} = 13.86$ days.

This means if the KO-PEP spread deviates from its mean, it takes approximately 14 days for half of that deviation to disappear.

Practical Implications for Trading

Traders use the half-life to determine holding periods and manage risk. A shorter half-life suggests a strategy of frequent, smaller trades. A longer half-life implies longer holding periods.

Entry and Exit Signals: A mean-reverting strategy typically involves trading deviations from the mean.

  1. Define the Mean: Estimate the long-term mean ($\mu$) of the spread. This is often the intercept $\alpha$ divided by $\theta$.
  2. Define Deviation Thresholds: Use standard deviations ($\sigma_{residuals}$) of the spread from its mean. For example, enter a trade when the spread is 2 standard deviations away from the mean.
  3. Position Sizing: The half-life influences how quickly capital becomes available. A short half-life allows faster capital turnover.
  4. Stop-Loss and Take-Profit: Mean reversion expects prices to return. Unexpected events can break the relationship. A stop-loss limits potential losses if mean reversion fails. The half-life helps set realistic take-profit targets based on expected reversion speed.

Example Strategy: Consider the KO-PEP spread with a half-life of 14 days.

  • Mean: Assume the estimated mean spread is 0.02.
  • Standard Deviation: Assume the spread's standard deviation is 0.015.
  • Entry: If the spread rises to 0.02 + 2 * 0.015 = 0.05, short KO and long PEP.
  • Exit: Close the position when the spread returns to the mean (0.02) or crosses a stop-loss (e.g., 3 standard deviations, 0.02 + 3 * 0.015 = 0.065).

The 14-day half-life suggests we expect the spread to revert significantly within a few weeks. If the position has not reverted after, say, 2-3 half-lives (28-42 days), the mean-reverting assumption might fail. This provides a time-based stop-loss or re-evaluation point.

Volatility and Half-Life: The $\sigma$ parameter in the OU process represents noise. A high $\sigma$ means more erratic movements around the mean. Even with a short half-life, high volatility can make entries and exits difficult. Traders must balance reversion speed with noise level. A volatile but fast-reverting asset can still be difficult to trade profitably due to wide swings.

A professional trader integrates the half-life into a comprehensive strategy. It informs trade duration, capital allocation, and risk control.