Kalman-Filtered Structural Spread Trading System
Family: hybrid · Regime: mixed · Complexity: high · Asset classes: Equities, Crypto, Forex (Pairs) · Timeframes: 1H, 4H
Thesis
The hypothesis is that statistical spreads between correlated assets exhibit higher mean-reversion reliability when the 'spread momentum' aligns with a multi-period moving average channel. By using a Kalman filter for dynamic mean detection and a debugger-derived regime check to ensure data integrity, the system enters when the spread is overextended. Risk is managed via a price-action 'box' range, which accounts for local volatility better than static stops. This edge is structural, relying on the tendency of correlated assets to return to a dynamic equilibrium.
Components
- Linefill Array Slice History Utility (regime) — Serves as a 'Runtime Integrity Filter'; ensures that historical array slices of market structure are populated and valid before executing logic.
- MA Channel (Framework Version) (direction) — Provides the trend-state counter to ensure we are only entering mean-reversion trades in the direction of the broader channel momentum.
- AI Pair Trading System v1.0 (entry) — Uses a Kalman Filter to derive a dynamic mean and Z-Score for the spread between two symbols, identifying statistical overextensions.
- Sherif Hilo (exit) — Acts as a trailing stop/exit by tracking the highest highs and lowest lows, providing a clear 'break' signal for trend exhaustion.
- Boxline (Dynamic Range Breakout) (risk) — Defines the local volatility floor/ceiling for stop-loss placement and determines position size based on current range expansion/contraction.
Known failure conditions
- Persistent divergence where the spread (e.g., ETH/BTC) fails to mean-revert due to fundamental decoupling.
- Market volatility exceeding the Boxline range expansion speed, leading to stops being hit before the Kalman mean can adjust.
- Array slice reference errors (Linefill Utility) caused by data gaps in the underlying symbols.
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).