Lesson 5 of 6·25 min·Advanced

Market Regime Detection: Trading the Right Strategy at the Right Time

Algorithmic & Systematic Trading Basics


Why Strategies Fail Unexpectedly

A strategy that worked for 18 months suddenly stops working for 6 months. The trader concludes the edge is gone.

Often, the edge isn't gone — the market regime changed, and the strategy is now operating in conditions it wasn't designed for.

Example:

A momentum breakout strategy excels during 2020–2021's trending, high-volatility market. In 2022's choppy, mean-reverting conditions, the same strategy produces a significant drawdown. The strategy itself is unchanged — but the market conditions are no longer favorable.

Market regime detection is the practice of identifying which type of market you're in — and either switching strategies or reducing exposure accordingly.

The Two Primary Market Regimes

Trending/Momentum Regime:

  • Price makes sustained directional moves
  • Higher timeframe structure: clear HH/HL or LH/LL
  • Low relative frequency of mean-reversion; few false breakouts
  • Higher volatility (not necessarily absolute — relative to recent history)

Strategies that work: Trend-following, breakout, momentum

Range/Mean-Reversion Regime:

  • Price oscillates between support and resistance
  • Higher timeframe structure: sideways range
  • High relative frequency of false breakouts
  • Compressed volatility

Strategies that work: Mean-reversion, range-bound, stat arb

Quantifying the Regime

Rather than subjectively deciding "this looks like a trend," use objective measures:

ADX (Average Directional Index):

  • ADX > 25: Trending regime
  • ADX < 20: Ranging/mean-reversion regime
  • ADX rising: Trend strengthening
  • ADX falling: Trend weakening

ATR relative to historical ATR:

  • Current 14-day ATR vs. 60-day average ATR
  • If current ATR > 1.2× historical average: elevated volatility, trend-favorable
  • If current ATR < 0.8× historical average: compressed volatility, range-favorable

Trend efficiency (smoothness):

  • Price traveled 90% of the straight-line distance between two points: highly efficient/trending
  • Price traveled 200% of the straight-line distance: choppy, mean-reverting

Implementing a Regime Filter

Add a regime filter to your systematic strategy to reduce performance degradation in unfavorable conditions:

For trend-following strategies:

  • Entry condition: Only enter if ADX(14) > 25 AND current ATR > 0.9× 60-day ATR average
  • When conditions not met: Do not trade (not short — simply stay flat)

For mean-reversion strategies:

  • Entry condition: Only enter if ADX(14) < 20 AND current ATR < 1.1× 60-day ATR average
  • When conditions not met: Do not trade

Backtesting the regime filter:

Run your strategy with and without the regime filter on out-of-sample data. The filter should:

  • Reduce maximum drawdown (the strategy no longer trades in unfavorable conditions)
  • Potentially reduce total return (fewer trades)
  • Improve Sharpe Ratio (return per unit of risk improves)

If the filter doesn't improve Sharpe Ratio, the filter criteria need adjustment.

Regime-Based Journaling

Even without implementing a formal regime filter, regime awareness improves trading.

Daily regime assessment (1 minute):

  • Is ADX rising or falling?
  • Is today's ATR higher or lower than this week's average?
  • What's the recent price structure (trending or choppy)?

Record this in your trading plan for the day. Tag all trades with the identified regime.

After 100+ trades, filter your performance by regime. You'll see clear performance differences — and specific evidence for which regimes your current strategy excels in.

This data forms the basis for adding a regime filter to your rules: "Only trade Setup X when regime is tagged as 'trending.'"

Educational content only. Not financial advice. Content reviewed April 2026.