Crypto Statistical Arbitrage: Pair Trading on Exchanges
Statistical arbitrage in cryptocurrency markets exploits temporary deviations from historical price relationships between correlated assets. Unlike pure arbitrage capturing risk-free spreads, statistical arbitrage (stat arb) trades mean-reverting price relationships with statistical confidence rather than certainty. When executed systematically across dozens of pairs, stat arb generates consistent returns through high win rates and favorable risk-reward ratios.Statistical Arbitrage Fundamentals
Statistical arbitrage trades temporary price dislocations between related assets, betting on mean reversion to historical norms. The core premise: if BTC and ETH maintain 0.85 correlation and their price ratio diverges 2+ standard deviations from average, the spread likely reverts, creating profit opportunities. Statistical arbitrage accepts timing risk and potential loss if relationships don't revert, compensated by higher expected returns and more frequent opportunities. Crypto markets offer excellent stat arb conditions: high volatility creating frequent dislocations, 24/7 trading enabling continuous monitoring, correlated asset pairs (BTC/ETH, ETH/altcoins, stablecoin crosses), fragmented liquidity across exchanges, and limited institutional arbitrage competition compared to traditional markets. These characteristics create positive expectancy: (0.60 × 2% winners) - (0.40 × 1% losers) = 0.8% expected return per trade. With 30 trades monthly, annualized returns approximate 25-35% on deployed capital. Risk management distinguishes successful stat arb from curve-fitted strategies that fail in live trading. Robust strategies maintain profitability across multiple market regimes, asset pairs, and time periods. Overfitted strategies optimize to historical data but breakdown when correlations shift or volatility changes.Pair Selection and Cointegration Testing
Identifying tradable pairs requires rigorous statistical testing beyond simple correlation analysis. High correlation doesn't guarantee mean reversion - both assets might trend together without reverting. Cointegration testing determines if two assets maintain a stationary (mean-reverting) linear relationship. If BTC and ETH are cointegrated, their price ratio reverts to a constant mean despite both prices trending upward over time. Non-cointegrated pairs might correlate highly but drift apart indefinitely. The Engle-Granger two-step procedure tests cointegration: (1) Regress ETH price on BTC price to find β coefficient (hedge ratio), (2) Calculate residuals (spread) = ETH - β × BTC, (3) Test if residuals are stationary using Augmented Dickey-Fuller (ADF) test. If ADF p-value <0.05, reject non-stationarity hypothesis - the spread is stationary and tradable. Python implementation using statsmodels (check our statsmodels import reference if you hit import errors with your installed version): ``python
import statsmodels.api as sm
from statsmodels.tsa.stattools import adfuller
Step 1: Calculate hedge ratio
btc_prices = get_prices('BTC')
eth_prices = get_prices('ETH')
model = sm.OLS(eth_prices, sm.add_constant(btc_prices))
results = model.fit()
beta = results.params[1] # Hedge ratio
Step 2: Calculate spread
spread = eth_prices - beta * btc_prices
Step 3: Test stationarity
adf_result = adfuller(spread)
if adf_result[1] < 0.05:
print(f"Cointegrated with beta={beta:.4f}")
``
Rolling cointegration analysis tests relationship stability over time. Calculate cointegration using 90-day windows, moving forward daily. If pair shows cointegration in 80%+ of windows, relationship is robust. If only 50%, relationship is unstable and non-tradable.
Correlation versus cointegration example: BTC and ETH show 0.85 correlation but aren't necessarily cointegrated. Both trend upward together (high correlation) but their ratio might drift (not cointegrated). Conversely, stablecoins (USDC/USDT) show perfect correlation and strong cointegration - ratio always reverts to 1.0.
Tradable pair characteristics include: ADF p-value <0.05, correlation >0.60, average spread reversion time <7 days, spread standard deviation 2-8% (enough movement for profit but not excessive volatility), and consistent hedge ratio over time (beta doesn't shift dramatically).