This paper describes a multi-dimensional market regime classification system that provides real-time environment context to all trading strategies in a portfolio. The system classifies each currency pair's volatility environment into four levels (QUIET, NORMAL, ELEVATED, STRESS) with directional tracking (falling, flat, rising), and augments this with global indicators including VIX level, dollar trend, and cross-pair dispersion. Anti-flicker mechanisms including Schmitt trigger hysteresis and minimum hold times ensure that regime labels are stable enough to be actionable. The system runs hourly, publishes state to a shared file consumed by all trading engines, and has demonstrated that regime conditioning improves strategy Sharpe ratios by 30--40% across all three production trading systems.
The same trading strategy performs very differently across market environments. A mean reversion system that thrives during calm, range-bound conditions may suffer persistent losses during trending, high-volatility regimes. A flow-detection system that captures sharp reversals during stress events may produce nothing but noise during quiet periods.
Rather than building separate strategies for each environment, the approach taken here is to build a single classification layer that all strategies can query. Each strategy then gates its entries, adjusts its position sizing, and adapts its trade management based on the current regime. This produces better risk-adjusted returns than any fixed-parameter approach while maintaining a clean separation between signal generation and environment classification.
The primary classification dimension is per-pair ATR (average true range) expressed as a percentile rank within a rolling window.
ATR Computation: True range is computed from hourly OHLC data using the standard formula (maximum of high-low, |high-previous close|, |low-previous close|). A 20-period simple moving average of true range produces the ATR series.
Smoothing: The raw ATR is smoothed with a 150-hour rolling average (approximately 6 trading days) to remove intra-week noise while preserving genuine regime transitions. This window was chosen based on the operational requirement that regimes should represent days-to-weeks conditions, not hours.
Scoring: The smoothed ATR is converted to a continuous 0--1 score via percentile ranking within a rolling window of 4,380 hours (approximately 6 months). A score of 0.3 means the current ATR is at the 30th percentile of the last six months --- lower than 70% of recent observations.
Classification: The score is mapped to four regime levels via dynamic boundaries:
| Level | Score Range | Interpretation |
|---|---|---|
| QUIET | Below 0.25 | Lowest quartile. Tight ranges, low activity. |
| NORMAL | 0.25 to 0.65 | Typical conditions. Broad middle band. |
| ELEVATED | 0.65 to 0.85 | Above-average volatility. Wider ranges. |
| STRESS | Above 0.85 | Top 15%. Crisis-level volatility. |
The boundaries themselves are computed using anchored rolling percentiles: the rolling quantile is clipped to an expanding floor and ceiling (with 8 percentile point margins) to prevent boundary drift during prolonged regime periods.
For each dimension, the direction of change is tracked to distinguish between a pair that is in ELEVATED volatility and rising (entering a crisis) versus ELEVATED and falling (recovering from one). These represent fundamentally different environments for trading.
Slope Computation: The slope of the smoothed ATR series is computed over a 150-bar differencing window. This slope is then ranked via percentile within the same rolling window used for level classification.
Classification: The slope score is divided into terciles:
| Direction | Slope Score | Interpretation |
|---|---|---|
| Falling | Below 0.33 | Volatility declining. |
| Flat | 0.33 to 0.67 | Stable volatility. |
| Rising | Above 0.67 | Volatility expanding. |
The combination of level and direction produces 12 possible states per pair (4 levels x 3 directions), each with distinct implications for strategy performance.
Three global indicators supplement the per-pair classification:
VIX Level: The CBOE Volatility Index is scored using the same percentile ranking methodology with boundaries at 0.33, 0.67, and 0.90, producing QUIET, NORMAL, ELEVATED, and STRESS levels. VIX can escalate a pair's regime (a QUIET pair during VIX STRESS gets bumped to at least NORMAL) but cannot de-escalate. This asymmetric treatment reflects the observation that broad market stress affects all pairs even when their individual ATR has not yet responded.
DXY Trend: The US Dollar Index trend is classified using 20/100 hourly moving average crossover, with the crossover ratio scored via rolling percentile. Three levels --- usd_weak, flat, usd_strong --- provide directional context for all USD pairs. The DXY trend uses wider hysteresis (7 percentile points) and longer minimum hold times (8 hours) reflecting its slow-moving nature.
Cross-Pair Dispersion: The standard deviation of ATR changes across all traded pairs measures market coherence. Low dispersion means pairs are moving independently (normal); high dispersion means volatility is correlated across the board (systemic risk event). Boundaries at 0.33 and 0.67 produce low, normal, and high classifications.
Raw classification from score boundaries produces unstable labels. A pair hovering near a boundary will flip between regimes every few hours, generating contradictory signals for downstream strategies. The Schmitt trigger solves this with two mechanisms:
A dead zone is created around each boundary. To transition from NORMAL to ELEVATED, the score must exceed the boundary plus the hysteresis margin. To transition back, it must fall below the boundary minus the margin. With a 5 percentile point hysteresis and a boundary at 0.65, the effective transition thresholds are:
This 10-point dead zone prevents oscillation when the score hovers near a boundary.
Even after a transition is triggered by crossing the hysteresis threshold, the new regime must persist for a minimum hold period before it becomes the current label. For ATR regimes, this minimum is 3 hours. For DXY trend, it is 8 hours.
The combination of hysteresis and minimum hold time produces regime labels that change on the timescale of days to weeks rather than hours, matching the operational horizon of the trading strategies that consume them.
The Schmitt trigger maintains three pieces of state per dimension:
This state is persisted between runs, allowing the system to resume correctly after restarts.
The system publishes a JSON state file hourly, consumed by all trading engines:
{
"timestamp": "2026-04-05T14:00:00",
"global": {
"vix_level": "ELEVATED",
"dxy_trend": "flat",
"dispersion": "low"
},
"pairs": {
"EURUSD": {
"vol_regime": "NORMAL",
"vol_direction": "flat",
"trend_state": "RANGE_BOUND",
"vol_detail": {
"atr_pct": 0.0692,
"pct_rank": 45.0
}
}
}
}
Each trading system reads this file at entry time and applies its own gating rules. The Fair Value system may choose to reduce size during STRESS. The Elasticity-Reversal system may block entries in NORMAL+rising for certain pairs. The Range Trading system adapts its take profit, stop, and hold time per regime level.
Regime conditioning allows the FV system to avoid low-quality entries during environments where the z-score signal has historically been unreliable. Certain pair-regime combinations where the win rate drops below 45% are blocked entirely.
The ER system uses the most granular regime gating: each of 10 pairs x 4 regime levels x 3 directions (120 combinations) has a Monte Carlo validated trade/no-trade decision with a size multiplier. This gating improves the portfolio Sharpe from approximately 3.2 (no gating) to 4.18 (full regime gating) --- a 30% improvement.
The RT system adapts its trade management parameters per regime. Regime-conditional parameters increase the portfolio Sharpe from 1.47 (fixed parameters) to 2.08 (adaptive) --- a 41% improvement. The key adaptation: tight take profits and short holds in ELEVATED/STRESS regimes, wide targets and patient holds in QUIET.
The regime classification layer enables intelligent capital allocation across systems. QUIET regimes favour the Range Trading system (natural mean reversion). STRESS regimes favour the ER system (sharp flow reversals). NORMAL regimes suit all three. This regime-aware allocation further improves the combined portfolio Sharpe beyond what any single system achieves.
| Dimension | Rolling Window | Boundaries | Hysteresis | Min Hold | Labels |
|---|---|---|---|---|---|
| ATR (per-pair) | 4,380h | 0.25, 0.65, 0.85 | 0.05 | 3h | QUIET, NORMAL, ELEVATED, STRESS |
| VIX (global) | 4,380h | 0.33, 0.67, 0.90 | 0.05 | 4h | QUIET, NORMAL, ELEVATED, STRESS |
| DXY (global) | 6,000h | 0.33, 0.67 | 0.07 | 8h | usd_weak, flat, usd_strong |
| Dispersion (global) | 4,380h | 0.33, 0.67 | 0.05 | 4h | low, normal, high |
| Direction (all) | Same as parent | 0.33, 0.67 | 0.05--0.08 | 3--24h | falling, flat, rising |
The regime classification system has been validated through:
1. Temporal stability: regime labels transition on the timescale of days to weeks, not hours, confirming the anti-flicker mechanisms work as intended
2. Sharpe spread: across all three trading systems, the difference in Sharpe ratio between the best and worst regime slices exceeds 4.0, confirming that regimes capture genuinely different market environments
3. Monotonic ordering: STRESS regimes produce wider ATR, more extreme price moves, and higher correlation across pairs than QUIET regimes, confirming the classification aligns with economic intuition
4. Walk-forward robustness: regime-conditional parameters selected on training data maintain their advantage on out-of-sample test periods across three expanding folds
5. Monte Carlo significance: per-pair-regime-direction trade slices are permutation-tested to confirm that edge is statistically distinguishable from random
Market regime is not a nuisance to be averaged over --- it is a primary determinant of strategy performance. By classifying the environment systematically and sharing that classification across all strategies, each system can focus on what it does best: generating signals. The regime layer handles the meta-question of when and how aggressively to act on those signals, producing a portfolio that adapts to the market rather than hoping the market adapts to it.