Adaptive regime-aware trading engine
What it is
Complexa Labs' in-house investment platform: an adaptive trading engine built on fractal and extreme-value statistics. The system observes each instrument through a multi-scale measurement stack, classifies its current statistical regime, and runs a portfolio of regime-gated strategies whose weights update online from realised performance.
Three commitments distinguish it from conventional algorithmic platforms:
- Measure complexity, not just price. The engine detects regime shifts and volatility clustering at multiple time-scales rather than fitting a single trend-or-mean-reversion model at one horizon.
- Strategies are regime-gated. Directional strategies downsize or disengage when the engine detects stressed or transitioning conditions.
- Allocation updates online. The portfolio framework learns from its own live history which strategies earn their keep in which regimes, and rebalances accordingly.
The measurement layer
Each instrument is observed through a sensor stack that decomposes its behaviour at three speeds:
- Character (slow). Mean-reverting vs trending, smooth vs rough volatility, thin vs fat tails — properties that drift on weekly-to-monthly timescales.
- State (fast). A regime classification with calibrated confidence, plus a structural-break detector that flags when the model and the data start to disagree.
- Forecast. Conditional volatility and Value-at-Risk over the relevant forward horizon, used by every sizing decision downstream.
- Cross-asset structure. Which instruments lead or lag under stress, and which share their regime.
Why regimes, not prices
The bet behind the architecture is statistical: regimes are persistent (calm markets stay calm for weeks; crises stay crises for weeks), whereas individual price moves are mostly noise. Predicting regimes is a tractable problem; predicting prices directly is not.
Methodology
The methodological backbone draws on three traditions that complement each other when markets refuse to behave:
- Multifractal cascade models for capturing volatility dynamics across timescales — a natural fit when standard GARCH-family models break under heavy tails and long memory.
- Extreme value statistics for tail risk, drawdown forecasting, and the regime transitions that ordinary Gaussian assumptions miss.
- Bayesian online learning for the weight-allocation layer — updating beliefs about which strategies are working as new evidence arrives, with explicit uncertainty quantification.
Stack
Python · NumPy · scipy · custom regime-detection and filtering implementations · Bayesian online learning · FastAPI for the partner interface · Next.js front end.
