Frankline Oyolo, Misango

Published on

Statistical Arbitrage Through Pairs Trading: A Practical Demonstration

Abstract

This paper introduces a novel pairs trading framework combining fractional cointegration, stochastic optimal control, and reinforcement learning applied to BTC/ETH. We extend traditional cointegration theory to capture long-memory dependencies and formalize trading decisions via Hamilton-Jacobi-Bellman equations. Key innovations include volatility-adaptive thresholding with Gaussian Process optimization, fractional Ornstein-Uhlenbeck dynamics for spread modeling, and a deep RL agent for real-time parameter tuning. Backtests show 35% higher risk-adjusted returns versus benchmarks with 38% lower drawdowns.

Introduction

Pairs trading exploits the mean-reverting behavior of asset price spreads. The core mathematical foundation is the cointegration of two time series, ensuring a stationary linear combination exists: . Traditional pairs trading faces three fundamental limitations: standard cointegration assumes integer-order integration $I(1)$, static thresholds ignore volatility regimes, and mean-reversion models miss long-range dependence. This framework solves all three.

Motivation

Cryptocurrency pairs offer a compelling statistical arbitrage opportunity: BTC and ETH share common economic drivers (crypto market sentiment, regulatory news, liquidity cycles) yet diverge temporarily due to idiosyncratic factors. The Johansen trace test confirms cointegration rank $r=1$ for BTC/ETH (trace statistic 48.72 vs critical value 35.17 at 95%), validating the pair. The motivation for fractional extensions is that standard $I(1)$ cointegration misses the long-memory structure in crypto spreads, leading to suboptimal threshold placement and excessive trading.

Key Equations

Hedge ratio via OLS:

Fractional cointegration (Geweke-Porter-Hudak estimator for $d$):

Ornstein-Uhlenbeck spread dynamics:

Z-score and rolling estimators:

Volatility-adaptive threshold:

HJB stochastic control formulation:

RL Q-learning update:

Algorithm Blueprint

Algorithm — Fractional Pairs Trading — BTC/ETH
Input: Price series P_BTC[1..T], P_ETH[1..T]
Output: Trade signals, position vectors, cumulative P&L
FORM a 252-day window:
run Johansen test on BTC/ETH prices
IF trace statistic ≤ critical value:
reject pair
ELSE:
estimate hedge ratio, fractional order d, and OU half-life
FOR each day t:
compute spread = BTC[t] - hedge_ratio * ETH[t]
compute rolling z-score over 60 days
update EWMA volatility and adaptive threshold
IF z-score > +threshold:
SHORT BTC and LONG ETH
ELSE IF z-score < -threshold:
LONG BTC and SHORT ETH
ELSE IF abs(z-score) < 0.5 AND position is open:
close all positions
update hedge ratio with Kalman filter
tune policy parameters with reinforcement learning feedback

Results

Sharpe Ratio Progression — Model Variants (BTC/ETH, 2020–2024)

Max Drawdown by Model Variant

| Model | Sharpe | Calmar | Max DD | Profit Factor | CAPM α | |---|---|---|---|---|---| | Standard OU | 1.82 | 2.15 | 8.7% | 1.92 | 0.08 | | Johansen VAR | 2.03 | 2.47 | 7.9% | 2.15 | 0.12 | | Our Framework | 2.86 | 3.42 | 5.4% | 3.15 | 0.21 | | + Fractional CI | 3.11 | 3.78 | 4.9% | 3.42 | 0.24 | | + RL Control | 3.27 | 4.01 | 4.3% | 3.68 | 0.29 |

Backtest period: Jan 2020 – Dec 2024 on BTC/ETH cryptocurrency pair.

Contributions

  • First application of fractional cointegration to cryptocurrency pairs trading, capturing long-memory spread dynamics missed by standard $I(1)$ models
  • Stochastic control formulation via HJB equations providing theoretically grounded entry/exit decisions
  • Volatility-adaptive thresholds via Gaussian Process regression, eliminating the need for static threshold tuning
  • Convergence proof for the RL-based trading agent and high-frequency P&L decomposition theorem including Hawkes jump processes

Paper

Author

Frankline Misango Oyolo Quantitative Research Division, Arithmax Research research@arithmax.com — Published: October 19, 2025