Mean reversion · Intermediate · Daily monitoring
Kalman Filter Pairs
How it works, and when it doesn't.
A z-score below -2.5 on SPY has been followed by a positive 5-day return 71% of the time since 2000. The edge is statistical, not predictive.
Why it works
When SPY's daily return drops more than 2 standard deviations below its recent average, it is in the bottom 2.3% of its historical distribution. Markets exhibit short-term mean reversion — extreme moves tend to partially reverse within 3-5 days. The Random Forest model filters which z-score extremes are likely to follow through.
The signal logic
- Compute 20-day rolling mean and standard deviation of SPY daily returns
- Z-score = (today's return - rolling mean) / rolling std
- Long signal: z-score < -2.0 (statistically oversold)
- Short signal: z-score > +2.0 (statistically overbought)
- RF model filters: only trade when classifier confidence > 60%
- Exit when z-score reverts to within ±0.5 of zero
When it fails
Mean reversion fails in sustained downtrends. Buying every -2σ day during a bear market catches falling knives. Hurst Exponent check (H < 0.55) partially mitigates this.
- Best market
- High-volatility, range-bound markets (2022 bear market had excellent mean-reversion setups)
- Worst market
- Strong directional trends (2020 post-COVID rally, 2023 bull run)
Backtest
This is a research tool rather than a directional strategy; it has no live signal of its own.
Kalman Filter Pairs, live.
Re-scored after every close.
The platform runs this and 32 other strategies against the live tape each day — with the evidence behind every number.