Technosight Investment Insights
Statistical Equilibrium

Mean Reversion Strategy: Mathematical Formulation & Implementation

Exploiting short-term price overreactions through rolling Z-Scores, Ornstein-Uhlenbeck half-life, and dynamic volatility bands.

Target Audience: Systematic Traders & Quantitative Equity Researchers

Key Takeaways for Investors & Traders

Statistical Foundation

Models price behavior through standardized rolling Z-Scores and the Ornstein-Uhlenbeck mean-reverting stochastic process.

Multi-Condition Triggers

Combines Bollinger dynamic bands with RSI boundary filters to isolate genuine statistical extremes from emerging trends.

Structural Break Protection

Implements an automatic cut-off when Z-scores exceed 3.5 standard deviations, closing positions when fundamental shifts occur.

Optimal in Ranging Markets

Demonstrates highest risk-adjusted efficacy in sideways, range-bound environments with low-to-moderate volatility.

Executive Summary

The Mean Reversion strategy identifies temporary price dislocations away from rolling historical equilibrium. Rooted in behavioral finance and market microstructure principles, the model evaluates rolling Z-scores, Ornstein-Uhlenbeck mean-reverting half-lives, and Relative Strength Index (RSI) conditions to capture price reversion back toward moving averages.

1

Introduction, History & Economic Hypothesis

Academic & Empirical Background

The mean reversion phenomenon in financial assets was documented empirically by De Bondt and Thaler (1985) in their seminal work on market overreaction, demonstrating that extreme return deviations tend to reverse over subsequent time horizons. Later research by Poterba and Summers (1988) confirmed mean-reverting components in US equities across multi-week horizons.

Economic Mechanism

In liquid equity markets, sudden price shocks are frequently caused by short-term liquidity imbalances, aggressive institutional block liquidations, or retail news overreaction. Market makers and statistical arbitrageurs provide temporary liquidity by taking the other side of these imbalances, anticipating that prices will revert to fundamental equilibrium once order flow normalizes.

Strengths & Limitations

  • Strengths: High historical win rates in sideways markets, clearly defined entry and exit rules, and short holding periods that minimize prolonged market beta exposure.
  • Limitations: Susceptible to severe drawdowns during runaway macro trends ("catching a falling knife"), execution drag from bid-ask spreads, and potential short-borrow financing constraints.
2

Mathematical Foundation

The Mean Reversion model evaluates multiple mathematical constructs across rolling price series:

1. Rolling Z-Score Formulation

The core signal metric measures the distance of the closing price $P_t$ from its rolling arithmetic mean $\mu_t$ in units of rolling standard deviation $\sigma_t$ over lookback window $N$ (default $N = 20$):

$$\mu_t = \frac{1}{N} \sum_{i=0}^{N-1} P_{t-i}$$

$$\sigma_t = \sqrt{\frac{1}{N} \sum_{i=0}^{N-1} (P_{t-i} - \mu_t)^2}$$

$$Z_t = \frac{P_t - \mu_t}{\sigma_t}$$

2. Continuous Ornstein-Uhlenbeck (OU) SDE

Asset prices are modeled as a stochastic mean-reverting Ornstein-Uhlenbeck process:

$$dP_t = \theta (\mu - P_t) dt + \sigma dW_t$$

Where:

  • $\theta > 0$ represents the speed of reversion.
  • $\mu$ is the long-term equilibrium price.
  • $\sigma$ is the diffusion volatility.
  • $W_t$ is a standard Wiener process.

Discretizing the OU process via an autoregressive AR(1) regression:

$$P_t - P_{t-1} = \alpha + \beta P_{t-1} + \epsilon_t$$

Where reversion speed $\lambda = -\ln(1 + \beta)$, yielding the estimated half-life of mean reversion:

$$t_{1/2} = \frac{\ln(2)}{-\lambda} = \frac{\ln(2)}{\ln(1 + \beta)}$$

Only securities with a verified finite half-life ($t_{1/2} \le N$) are approved for mean-reversion trading.

3. Relative Strength Index (RSI) Filter

To verify that momentum has exhausted, a standard 14-period Wilder RSI is evaluated:

$$RS = \frac{\text{EMA}_{14}(\text{Up Moves})}{\text{EMA}_{14}(\text{Down Moves})}, \quad RSI = 100 - \frac{100}{1 + RS}$$

3

Implementation & Signal Logic

The strategy generates discrete signals according to strict threshold rules:

graph TD
    A[Calculate Daily Z-Score & 14-day RSI] --> B{Z-Score & RSI Triggers}
    B -->|Z < -2.0 & RSI < 35| C[LONG Signal: +1.0]
    B -->|Z > +2.0 & RSI > 65| D[SHORT Signal: -1.0]
    B -->|Otherwise| E[NEUTRAL: 0.0]
    C --> F{Exit Check}
    D --> F
    F -->|abs Z <= 0.5| G[Close Position: Convergence Exit]
    F -->|abs Z >= 3.5| H[Close Position: Stop-Loss Structural Break]
    F -->|Holding Time > 2x Half-Life| I[Close Position: Time Stop]

Execution Rules

  1. Long Entry (+1.0): Triggered when $Z_t < -\text{entry\_threshold}$ (default $-2.0$) and $RSI_t < 35.0$. The raw score is assigned as $-Z_t$.
  2. Short Entry (-1.0): Triggered when $Z_t > +\text{entry\_threshold}$ (default $+2.0$) and $RSI_t > 65.0$. The raw score is assigned as $-Z_t$.
  3. Convergence Exit: Triggered when the price returns near equilibrium: $|Z_t| \le \text{exit\_threshold}$ (default $0.5$).
  4. Structural Break Stop-Loss: If $|Z_t| \ge 3.5$, the price move is deemed an emerging fundamental trend rather than a transient anomaly. The position is liquidated immediately.
  5. Time Stop: Positions exceeding twice the estimated OU half-life ($2 \cdot t_{1/2}$) without convergence are closed to preserve capital velocity.
4

Practical Trader & Operational Considerations

  • Spread Sensitivity: Mean-reversion profit margins are typically modest (1.5% to 3.5% per trade). Consequently, trading in illiquid names with wide bid-ask spreads significantly impairs net returns.
  • Short Borrow Constraints: Executing short signals requires verifying that candidate equities are easy-to-borrow (ETB) with low annual locate fees.
  • Earnings Season Filtering: Entering mean-reversion trades immediately prior to corporate earnings releases introduces catastrophic gap risk, bypassing statistical reversion assumptions.