Zylo Quant
Methodology Notes··~10 min

Regime Detection: Why Your Strategy Works Until It Doesn’t

Markets shift between regimes — trending vs. mean-reverting, low-vol vs. high-vol, risk-on vs. risk-off. A strategy built for one regime will underperform or fail in another. This note examines how to detect shifts and what to do about them.

Why Your Strategy Works Until It Doesn’t

Why Your Strategy Works Until It Doesn’t

A momentum strategy that compounds smoothly for eighteen months and then gives back half its gains in six weeks is not broken. It is regime-dependent.

Markets do not behave the same way all the time. They alternate between states — trending and mean-reverting, compressed and volatile, correlated and dispersed. A strategy that thrives in one state may suffer or fail entirely in another. The strategy did not change. The market did.

This is one of the more frustrating problems in systematic research because the backtest often looks fine. The average performance across the full sample is positive. The Sharpe ratio clears the threshold. But the average is hiding a structure: long stretches of strong returns interrupted by shorter stretches of severe drawdowns that coincide with regime shifts.

In our own work, regime dependence was the explanation behind several strategies that passed every other validation check — walk-forward, cost modeling, out-of-sample confirmation — and still disappointed in live trading. The issue was not the strategy. It was a market environment change that the backtest’s sample period happened to underweight.

SAME STRATEGY, DIFFERENT REGIMESLow VolTrending+14% ann.Transition+2%High VolMean-Reverting−12% ann.Recovery+5%Low VolRange-Bound+3% ann.High VolTrending−8% ann.Perf:Equity:The strategy did not change. The market did.
Fig. 1 — A single momentum strategy shows dramatically different performance across market regimes
What a Regime Actually Is

What a Regime Actually Is

A regime is not a formal concept with a single definition. In practice, it refers to a persistent statistical state of the market that affects how strategies behave.

The most common regime distinctions are volatility-based (low-vol vs. high-vol), trend-based (trending vs. mean-reverting), and correlation-based (high cross-asset correlation vs. high dispersion). These dimensions often move together but not always. You can have a low-volatility, mean-reverting market or a low-volatility, trending market. The combination matters.

What makes a regime a regime rather than random variation is persistence. A single volatile day is not a regime change. A shift in the statistical distribution that lasts weeks or months is. The challenge is that you rarely know whether a shift is a regime change or temporary noise until well after it has started.

Regime DimensionState AState BStrategy Most Affected
VolatilityLow (≤15% ann. realized)High (>25% ann. realized)Short gamma, vol-selling, carry strategies
TrendTrending (persistent directional moves)Mean-reverting (range-bound oscillation)Momentum vs. mean-reversion
CorrelationHigh (macro-driven, risk-on/off)Low (dispersed, stock-picking rewarded)Long/short equity, sector rotation
LiquidityNormal (tight spreads, deep books)Stressed (wide spreads, thin books)High-turnover, small-cap strategies
How Regime Changes Break Strategies

How Regime Changes Break Strategies

Every systematic strategy embeds assumptions about the market’s statistical properties. A momentum strategy assumes that recent winners continue to outperform. A mean-reversion strategy assumes that recent losers revert. Both are correct — some of the time.

When the market shifts from a trending regime to a mean-reverting one, momentum strategies experience a specific failure pattern: they buy names that just rallied, expecting continuation, and instead get reversal. The signal does not stop generating trades. It generates the wrong trades. The loss comes not from inactivity but from confidently doing the wrong thing.

In our pipeline, we observed this most clearly during volatility regime transitions. A strategy that performed well in the low-volatility environment of 2017 and again in 2019 showed significant drawdowns during the transition into and out of the March 2020 volatility spike. The strategy’s signal was unchanged. The market’s response to that signal was completely different.

The subtler problem is that regime changes do not announce themselves. There is no timestamp labeled “regime shift: trending → mean-reverting.” The shift becomes visible only in retrospect, after the strategy has already been losing money for long enough to notice.

Detection Methods

Detection Methods

No detection method identifies regime changes in real time with certainty. The best practical approaches trade off speed against reliability.

Rolling statistics are the simplest approach. Track 20-day realized volatility, rolling correlation, or rolling beta. When the statistic crosses a threshold or moves more than two standard deviations from its trailing mean, flag a potential regime shift. This is easy to implement and easy to understand. The downside is latency: by the time the rolling window confirms the shift, the damage may already be done.

Hidden Markov Models (HMMs) are the most common formal approach. An HMM assumes the market is always in one of several hidden states, each with its own statistical distribution. The model estimates the current state and transition probabilities from observed data. In practice, HMMs work well on historical data but produce noisy state estimates in real time because they must infer the hidden state from a limited window of observations.

Structural break tests — such as the Chow test, CUSUM, or Bai-Perron — test whether the statistical properties of a time series changed at a specific point. These are designed for retrospective analysis rather than real-time detection. They are most useful for understanding historical regime boundaries during strategy development.

Threshold-based classification is the most pragmatic approach for live systems. Define regimes by observable quantities: VIX above or below 20, realized volatility above or below a trailing percentile, breadth above or below a threshold. This is less statistically elegant than an HMM but more transparent and easier to act on.

ROLLING 20-DAY REALIZED VOLATILITY — REGIME SHIFT DETECTIONSHIFTSHIFT20%10%20%30%40%Low-vol regimeHigh-vol regimeNormalizationRe-entryRolling statistics detect shifts after they happen — not before
Fig. 2 — A simple rolling volatility threshold detects regime shifts with an inherent delay
The Honest Limits of Detection

The Honest Limits of Detection

Every detection method shares the same fundamental limitation: regime changes are only clearly identifiable after they have already occurred.

Rolling statistics have an inherent lag proportional to the window length. A 20-day rolling volatility measure needs roughly 10-15 days of elevated volatility before it crosses a threshold. An HMM needs enough data points in the new state to shift its posterior probability. A structural break test needs a full sample on both sides of the break.

This means you cannot use regime detection to avoid regime changes. You can use it to recognize that a regime change has likely occurred and adjust accordingly — but the adjustment comes after some damage has already been taken.

In our experience, the strategies that handle regime changes best are not the ones that detect changes fastest. They are the ones that degrade gracefully when the regime shifts — strategies whose performance weakens but does not catastrophically reverse.

What to Do Instead of Predicting Regimes

What to Do Instead of Predicting Regimes

Since regime prediction is unreliable, the practical approach is to build strategies and portfolios that are less sensitive to regime changes in the first place.

Strategy diversification is the most direct protection. A portfolio that includes both momentum and mean-reversion strategies will underperform a pure momentum portfolio in a strong trending regime but will suffer far less when the trend breaks. The cost is lower peak performance. The benefit is a much shallower drawdown during transitions.

Adaptive position sizing reduces exposure when the environment becomes unfavorable. If realized volatility spikes above a threshold, scale down. If the strategy’s recent hit rate drops below a rolling baseline, reduce size. This is not prediction — it is reaction. But timely reaction, even if imperfect, substantially reduces tail risk.

Regime-conditional backtesting means running every strategy through different market environments separately rather than relying on aggregate statistics. If a strategy shows 15% annualized returns across the full sample but -8% during high-vol regimes and +22% during low-vol regimes, you know exactly where the risk lies. That information is invisible in the aggregate number.

In our workflow, we now run every strategy through at least three conditional subsamples: low-vol periods, high-vol periods, and transition periods. If the strategy shows a positive edge in all three, we have more confidence. If it only works in one regime, we know the edge is conditional and size accordingly.

Regime Awareness Checklist

  • Have you tested the strategy separately in low-vol, high-vol, and transition periods?
  • Does the strategy degrade gracefully in unfavorable regimes, or does it reverse sharply?
  • Is there a position-sizing or exposure rule that reduces risk when rolling statistics signal a regime shift?
  • Does the portfolio include strategies with different regime preferences (e.g., momentum + mean-reversion)?
  • Have you identified which regime dimension (volatility, trend, correlation) matters most for this strategy?
  • Is the backtest’s sample period representative of the full range of regimes, or does it overweight one state?
Takeaway

Takeaway

Regimes are real. Detection is lagged. Prediction is unreliable.

The practical response is not to build a better detector but to build strategies and portfolios that survive the transition. That means conditional testing, diversification across regime preferences, and position-sizing rules that respond to observable shifts.

A strategy that compounds at 12% across all regimes is more valuable than one that compounds at 20% in favorable conditions and gives back half during transitions. The second one looks better in the backtest. The first one is the one you can actually run.

This content is the original work of Zylo Technology and may not be republished or reproduced without permission.