Anomaly detection & regime change
Can market anomalies warn of a regime change before it happens?
A walk-forward research environment that turns about 24 causal anomaly signals into one probability that SPY falls 7% or more within 21 days, tests that probability against a naive volatility baseline, and plugs it into the DQN, options and risk-parity models. I will share the results here as soon as the research is complete.
How it works
- Baseline. Walk-forward GARCH residuals, chi-squared window scores and conditional extreme-value tails mark when the volatility model breaks.
- Change-point detection. CUSUM and Shiryaev-Roberts tests with false-alarm rates calibrated on bootstrapped residuals, plus Bayesian online change-point detection.
- Regime models. A Gaussian hidden Markov model refitted each year and filtered causally, and a statistical jump model that penalizes regime switches.
- Market fragility. Turbulence split into magnitude and correlation surprise, the absorption ratio, random-matrix spectra, early-warning signals and stock-bond correlation.
- Options and frontier signals. VIX term structure, variance risk premium and vol of vol; Wasserstein k-means, signature MMD and topological data analysis.
- Honest evaluation. Pre-stress scoring, permutation p-values, false-discovery control, lead-time event studies, deflated Sharpe ratios and backtest-overfitting probabilities, with every trial logged.
Results
| Stage | Status |
|---|---|
| Research library (regime_lib.py) | built and tested |
| Research notebook | built and tested on simulated data |
| Run on market data | in progress |
| Signal leaderboard and lead times | pending |
| Fused probability and overlays | pending |
| Plug-ins: DQN, options and risk-parity agents | pending |
Results to follow after research completes
The environment is built: every detector, the evaluation framework and the hooks into the existing agents. The first full run on market data is under way.
This page will show which signals, if any, beat the naive volatility baseline on days before a drawdown begins, how early they fire, and whether acting on them helps the agents after costs.
Takeaways
- Prediction, not confirmation. Most indicators fire once a selloff has started. Signals are scored only on days before a drawdown begins.
- Count every trial. Each experiment is logged, so the Sharpe ratio of the best overlay is deflated by the number of things tried.
- Beat the simple baseline. Every signal must outperform a percentile of 21-day realized volatility to count.
In the repository
View on GitHub: damion-m/Quantitative-Strategies
regime_detection_research.ipynbregime_lib.pyfunc_lib.py