Gann-Kalman Structural Pair Mean Reversion
Family: hybrid · Regime: trending · Complexity: high · Asset classes: Equities, Forex (Cross-pairs), Crypto-assets · Timeframes: H1, H4
Thesis
Market participants often trade correlated assets in 'herds,' but momentary idiosyncratic shocks cause temporary divergences in their price ratio (spread). These divergences are statistically likely to mean-revert, particularly when the broader market structure (Darvas Boxes) and trend direction (Gann HiLo) remain intact. By utilizing a Kalman Filter to define the 'fair' spread dynamically, we can capture high-probability entries as the assets re-align, using momentum (MACD) to time the turn and structural levels (Darvas) to manage risk.
Components
- Indicator Metadata Sample (regime) — Acts as a data integrity filter; ensures sufficient bar history (rates_total) exists for Kalman filter initialization before allowing signals.
- HiLo Activator (Gann Style) (direction) — Provides the primary directional bias; we only enter mean-reversion pair trades that align with the established price trend of the base asset.
- AI Pair Trading System v1.0 (entry) — Calculates the statistical deviation (Z-score) of the price ratio between two assets. Entry occurs when the spread is overextended.
- Relative Strength Index (RSI) (exit) — Identifies momentum exhaustion for take-profit targets when the mean reversion has achieved its primary impulse.
- Darvas Boxes Modern/Classic (risk) — Defines structural support/resistance levels for hard stop-loss placement and calculates position size based on box height.
- MACD Classic (3-Line) (confirmation) — Filters entries to ensure price momentum is beginning to turn back toward the mean, reducing the 'falling knife' risk of pure Z-score entries.
Known failure conditions
- Persistent breakdown of cointegration between the pair assets (e.g., ETH and BTC decoupling during a fork).
- Market regime shifts where volatility expands exponentially, rendering the fixed Z-score entry threshold obsolete.
- High-frequency whipsaws in the HiLo Activator resulting in alternating direction signals every 2-3 bars.
Explore the full interactive blueprint with parameter ranges and evidence on WOBR StrategyVerse, or generate this strategy as an MT4/MT5 Expert Advisor with QuantMogul AI Engine (free download).