Ratio Model Tutorial
The simplest and most intuitive approach to mean-reversion pairs trading.
1Understanding Price Ratios
A price ratio is simply one stock's price divided by another stock's price. This technique normalizes price differences, making it easier to compare stocks regardless of their actual price levels.
Formula:
Ratio = Stock A Price ÷ Stock B PriceExample:
• Stock A: $120
• Stock B: $60
• Ratio: 2.0
Benefit:
If the ratio increases to 2.1, Stock A is temporarily "expensive" relative to Stock B.
2Calculating Rolling Averages
The core assumption of pairs trading is mean reversion. We calculate the average ratio over a specific lookback period (e.g., 60 days) to establish the "equilibrium" or normal relationship between the stocks.
Rolling Average Formula:
Average = Sum of ratios over Lookback ÷ Lookback Period💡 Key Insight:
The rolling average is our dynamic central tendency. We trade when the current price deviates significantly from this historical average.
3Understanding Z-Scores
The Z-score measures divergence in terms of Standard Deviations. It quantifies how unusual the current ratio is.
Z-Score Formula:
Z-Score = (Current Ratio - Average) ÷ Standard Deviation4Trade Execution and Signals
Pairs trading is designed to be market-neutral. Trades are always initiated by taking opposite positions on the pair.
📈 Entry: Z-Score > +2.5
Ratio is too high. Stock A is relatively expensive.
Action: Short Stock A and Long Stock B
📉 Entry: Z-Score < -2.5
Ratio is too low. Stock B is relatively expensive.
Action: Long Stock A and Short Stock B
🎯 Exit Strategy (Mean Reversion):
Close the entire market-neutral position when the Z-score returns to near zero (typically ±0.5 to ±1.0), indicating the historical relationship has been restored and the profit has been realized.
5Risk Management
Effective risk management involves setting clear stop-loss points and appropriately sizing positions to protect capital when the pair's relationship breaks down permanently.
🛡️ Stop Loss:
Set a statistical stop loss at Z = ±3.0. If the spread continues to diverge beyond this point, the core assumption of mean reversion has likely failed, and you must exit to limit losses.
⚖️ Position Sizing:
Use OLS or Kalman regression to calculate the optimal hedge ratio (β). This ensures the position is value-neutral, minimizing market risk.
Ready to Analyze?
Use the Pair Analyzer to load your stocks and view the ratio, Z-scores, and statistical half-life.
Quick Navigation
💡 Pro Tip
Always check the Statistical Half-Life in the Pair Analyzer. A short half-life (e.g., 5-60 days) is ideal for mean-reversion strategies like the Ratio Model.