Deep Autoencoders as Early Warning Systems for Regime Shifts
Autoencoder reconstruction error detects regime transitions 2-3 bars before traditional indicators, providing early warning for parameter adjustment.
How Reconstruction Error Signals Change
An autoencoder trained on normal market data learns to reconstruct typical feature patterns. When the market enters a new regime, the patterns change and reconstruction error spikes. S10 uses a 4-layer autoencoder (38-20-10-20-38) trained on the same feature vector as L1 models. When reconstruction error exceeds 2 standard deviations from its rolling mean, S10 flags a potential regime transition.
The key finding was timing. Reconstruction error spikes 2-3 bars before traditional indicators like ADX or Hurst register the change. Those 2-3 bars of early warning allow the system to tighten risk parameters before the new regime fully materializes.
Architecture and Training Details
The autoencoder is built in PyTorch with dropout (0.2) between layers to prevent memorization. Training uses the same walk-forward splits as the main L1 models, ensuring no look-ahead bias. The model is retrained quarterly on expanding windows to capture evolving market dynamics.
Reconstruction error is normalized per instrument because different assets have different baseline complexity. EURUSD, being the most liquid forex pair, has lower baseline reconstruction error than a volatile instrument like BTCUSD. Without normalization, the system would flag regime changes on quiet instruments while missing them on volatile ones.
Early Warning in Practice
The 2-3 bar early warning sounds small. On M15 bars, that is 30-45 minutes of advance notice. But in a system that manages exits with trailing stops and giveback thresholds, 30 minutes is enough to tighten parameters and protect open profits. S10 does not generate trading signals directly. It modulates other modules by signaling "something is changing, get defensive." In the V7 backtest, early regime detection from S10 contributed to the 1.49% max drawdown by preventing the system from being caught fully exposed during rapid regime transitions. The value is entirely defensive, and that is exactly what a risk-first system needs.