Statistical Arbitrage & Pairs Trading
Finding order in chaos. How to profit from the spread between two correlated assets.
Trend following is easy to understand: buy what goes up. Mean reversion is harder psychologically: sell what goes up, because you believe it has gone up too much relative to something else. This is the heart of Stat Arb.
1. Co-integration vs Correlation
Correlation tells you two stocks move in the same direction. Co-integration tells you the distance between them is constant over time.
- Drunk & Dog (Leash): A drunk man and his dog wander around. They might move erratically (non-stationary prices), but the distance between them is limited by the leash. This is Co-integration.
- Two Drunks: Two drunk men leaving a bar might walk in the same general direction (Correlation), but they can drift miles apart forever. This is NOT suitable for pairs trading.
2. The Z-Score Strategy
We measure the "spread" between Asset A and Asset B. We calculate the Mean and Standard Deviation of this spread over a lookback window (e.g., 20 days).
- Z-Score > 2.0: Spread is too wide. Short Asset A / Long Asset B.
- Z-Score < -2.0: Spread is too narrow/negative. Long Asset A / Short Asset B.
- Z-Score = 0: Mean reversion achieved. Close all positions.
3. Market Neutrality (Beta Hedging)
The beauty of Stat Arb is that it is Market Neutral. If the entire market crashes 10%, your Long leg loses money, but your Short leg makes money. You are hedging out market risk (Beta) and isolating the specific relationship (Alpha).
Launch a Hedge Fund Strategy
We build institutional-grade pairs trading bots with ADF Tests and Half-Life calculations built-in.
Build Arb Bot