Introduction

Financial markets alternate between periods of persistent directional movement and periods of consolidation around a mean. This distinction — between trending and mean-reverting regimes — is among the most consequential facts a trader or portfolio manager must confront, for the optimal strategy in one regime is often the worst in the other. A moving-average crossover that generates steady profits in a trending market will be whipsawed to extinction in a range-bound one; conversely, a mean-reversion strategy that profits from oscillations will suffer catastrophic drawdowns when a trend emerges.

The challenge, then, is to identify the prevailing market regime in real time. No single indicator suffices. Volatility measures, trend-strength metrics, and momentum oscillators each capture a different facet of market microstructure, and it is only by synthesizing their signals that one can form a robust classification. This article develops a multi-indicator framework built on four well-known technical indicators — Average True Range (ATR), Bollinger Bands, Average Directional Index (ADX), and Relative Strength Index (RSI) — and shows how their conjunction can be used to define a principled regime detection procedure.

Average True Range

Definition and Computation

The True Range (TR), introduced by J. Welles Wilder in his 1978 monograph New Concepts in Technical Trading Systems, is defined as the largest of three quantities:

TRt=max(HtLt,  HtCt1,  LtCt1) \text{TR}_t = \max\left(H_t - L_t,\; |H_t - C_{t-1}|,\; |L_t - C_{t-1}|\right)

where HtH_t and LtL_t denote the high and low of period tt, and Ct1C_{t-1} is the close of the preceding period. The inclusion of gaps — the second and third terms — ensures that overnight jumps are not silently absorbed into the range estimate.

The Average True Range is then an exponential moving average of the True Range over nn periods:

ATRt=n1nATRt1+1nTRt \text{ATR}_t = \frac{n-1}{n}\,\text{ATR}_{t-1} + \frac{1}{n}\,\text{TR}_t

Wilder’s original convention sets n=14n = 14, though practitioners may adjust this depending on the time horizon of interest. The recursive form of the EMA means that ATR responds more quickly to recent volatility shocks than a simple moving average would, while still smoothing out transient noise.

Interpretation in Regime Detection

ATR is a pure volatility measure: it carries no information about direction. Its value lies in distinguishing between high-volatility and low-volatility regimes. A persistently low ATR — for instance, one that falls below the 20th percentile of its rolling 50-day distribution — signals that the market is compressing, with price confined to a narrow range. Such compression is characteristic of a mean-reverting regime.

Conversely, a sharp expansion in ATR indicates that the market is breaking out of its recent range. When ATR crosses above its own rolling mean by a significant margin (say, 1.5 standard deviations), it provides early evidence that a new trend may be forming. The economic intuition is straightforward: trends require directional conviction, and conviction manifests as expanded range. A market in which participants disagree strongly enough to push prices persistently in one direction will, by construction, exhibit larger bar ranges.

It is worth noting that ATR is not normalized. A value of 0.50 is not inherently “low” — it must be interpreted relative to the recent history of the asset. This is why percentile-based or z-score-based thresholds are generally preferred over absolute thresholds.

Bollinger Bands

Construction

Bollinger Bands, introduced by John Bollinger in the 1980s, overlay a volatility envelope on a moving average. The middle band is a simple moving average of closing prices over nn periods:

MBt=1ni=0n1Cti \text{MB}_t = \frac{1}{n}\sum_{i=0}^{n-1} C_{t-i}

The upper and lower bands are displaced from the middle band by kk standard deviations:

UBt=MBt+kσt,LBt=MBtkσt \text{UB}_t = \text{MB}_t + k\,\sigma_t, \qquad \text{LB}_t = \text{MB}_t - k\,\sigma_t

where

σt=1ni=0n1(CtiMBt)2 \sigma_t = \sqrt{\frac{1}{n}\sum_{i=0}^{n-1}(C_{t-i} - \text{MB}_t)^2}

The standard parameters are n=20n = 20 and k=2k = 2. Under the assumption of normally distributed returns, approximately 95% of price observations should fall within the bands — though in practice, financial return distributions exhibit fat tails, and the empirical coverage is often lower.

Bandwidth as a Regime Signal

The raw band positions are less informative than the bandwidth, defined as:

BWt=UBtLBtMBt \text{BW}_t = \frac{\text{UB}_t - \text{LB}_t}{\text{MB}_t}

Bandwidth is a normalized measure of volatility relative to price level, which makes it comparable across assets and time periods. A period of narrow bandwidth — often called a “squeeze” — indicates that the market has entered a low-volatility consolidation phase. Historical analysis shows that squeezes are typically resolved by a sharp expansion in bandwidth, corresponding to the onset of a new trend.

The direction in which price exits the bands carries additional information. A close above the upper band in a widening-bandwidth environment is consistent with an emerging uptrend; a close below the lower band under the same conditions is consistent with a downtrend. In contrast, when bandwidth is contracting and price oscillates between the upper and lower bands without sustained penetration, the market is in a mean-reverting regime.

Bollinger Bands thus serve a dual purpose: the bandwidth quantifies the volatility regime, while the position of price relative to the bands provides directional context. This dual information content is what makes them particularly valuable when combined with other indicators.

Average Directional Index

The Directional Movement System

ADX is also due to Wilder (1978) and forms part of his Directional Movement System. The construction begins with the Directional Movement indicators. Let the “up move” and “down move” be defined as:

+DMt=max(HtHt1,  0),DMt=max(Lt1Lt,  0) +\text{DM}_t = \max(H_t - H_{t-1},\; 0), \qquad -\text{DM}_t = \max(L_{t-1} - L_t,\; 0)

If both +DMt+\text{DM}_t and DMt-\text{DM}_t are positive, only the larger value is retained; the other is set to zero. These raw values are then smoothed with Wilder’s smoothing (a variant of EMA with α=1/n\alpha = 1/n) to yield +DMsm+\text{DM}_{\text{sm}} and DMsm-\text{DM}_{\text{sm}}.

The Directional Indicators are formed by normalizing by ATR:

+DIt=100×+DMsm,tATRt,DIt=100×DMsm,tATRt +\text{DI}_t = 100 \times \frac{+\text{DM}_{\text{sm},t}}{\text{ATR}_t}, \qquad -\text{DI}_t = 100 \times \frac{-\text{DM}_{\text{sm},t}}{\text{ATR}_t}

The DX value quantifies the directional imbalance:

DXt=100×+DItDIt+DIt+DIt \text{DX}_t = 100 \times \frac{|+\text{DI}_t - -\text{DI}_t|}{+\text{DI}_t + -\text{DI}_t}

Finally, ADX is the smoothed average of DX, again using Wilder’s smoothing over nn periods (conventionally n=14n = 14):

ADXt=n1nADXt1+1nDXt \text{ADX}_t = \frac{n-1}{n}\,\text{ADX}_{t-1} + \frac{1}{n}\,\text{DX}_t

ADX as a Trend Strength Filter

ADX ranges from 0 to 100 but in practice rarely exceeds 60. Its defining property is that it measures the strength of a trend without regard to its direction. A rising ADX indicates that the directional imbalance — whether bullish or bearish — is intensifying; a falling ADX indicates that directional conviction is weakening.

The conventional thresholds are well established by empirical usage:

  • ADX below 20 indicates the absence of a discernible trend. The market is either in a trading range or transitioning between regimes. In this state, mean-reversion strategies are statistically favored.
  • ADX above 25 confirms the presence of a trend. The market has developed sufficient directional conviction to sustain a trend-following approach.
  • ADX above 40 signals a strong trend. While this may seem like an ideal environment for trend followers, it also warrants caution: very high ADX readings often coincide with the later stages of a trend, and the probability of exhaustion or reversal increases.
  • ADX above 50 is rare and typically reflects an extreme, parabolic move. Such readings are more often a warning than an opportunity.

A particularly valuable signal is the rate of change of ADX. When ADX is rising from below 20 toward 25, it indicates that a new trend is forming — the market is transitioning from a mean-reverting to a trending regime. Conversely, when ADX peaks above 40 and begins to decline, it signals that the existing trend is losing momentum, even though the price may still be making new highs or lows.

Relative Strength Index

Mathematical Formulation

The Relative Strength Index, another of Wilder’s contributions (1978), measures the ratio of average gains to average losses over a lookback window. Let GtG_t and LtL_t denote the magnitude of the gain and loss, respectively, on period tt (if price declines, Gt=0G_t = 0; if price rises, Lt=0L_t = 0). Wilder’s smoothing is applied separately:

Gt=n1nGt1+1nGt,Lt=n1nLt1+1nLt \overline{G}_t = \frac{n-1}{n}\,\overline{G}_{t-1} + \frac{1}{n}\,G_t, \qquad \overline{L}_t = \frac{n-1}{n}\,\overline{L}_{t-1} + \frac{1}{n}\,L_t

The Relative Strength is then:

RSt=GtLt \text{RS}_t = \frac{\overline{G}_t}{\overline{L}_t}

and the RSI is:

RSIt=1001001+RSt=100×GtGt+Lt \text{RSI}_t = 100 - \frac{100}{1 + \text{RS}_t} = 100 \times \frac{\overline{G}_t}{\overline{G}_t + \overline{L}_t}

The second form shows that RSI is simply the proportion of average gain to total average price movement, scaled to [0,100][0, 100]. The standard lookback is n=14n = 14.

RSI in Regime Context

RSI is conventionally used as an overbought/oversold indicator: values above 70 suggest overbought conditions and values below 30 suggest oversold conditions. However, this interpretation is regime-dependent and, without context, can be misleading.

In a mean-reverting regime, RSI oscillations between 30 and 70 are indeed informative. A reading near 70 indicates that the recent upward momentum is likely to revert, and a short (or liquidation of longs) is statistically justified. Similarly, a reading near 30 favors a long entry. The mean-reverting logic is sound because the underlying price process is expected to revert to its mean.

In a trending regime, the dynamics change fundamentally. During a strong uptrend, RSI can remain above 70 for extended periods as each successive bar contributes a positive gain to the smoothed average. An overbought reading in a trending market is, paradoxically, a confirmation of trend strength rather than a reversal signal. Conversely, RSI readings below 30 in a strong downtrend indicate persistent selling pressure, not an imminent bounce.

The correct interpretation of RSI therefore requires knowledge of the prevailing regime — which is precisely what the other indicators are providing. RSI’s contribution to the framework is to quantify momentum within the regime context established by ATR, Bollinger Bands, and ADX.

A further useful signal is RSI divergence. When price makes a new high but RSI makes a lower high, the divergence suggests that the momentum behind the trend is waning — even if ADX remains elevated. This can serve as an early warning of regime transition.

A Unified Regime Detection Framework

The Logic of Multi-Indicator Synthesis

Each of the four indicators captures a distinct aspect of market microstructure. ATR measures realized volatility — the amplitude of price fluctuations. Bollinger Bandwidth measures the same quantity but in a normalized, relative form, and adds information about price position within the volatility envelope. ADX measures directional conviction — whether the net order flow is sufficiently one-sided to produce a persistent trend. RSI measures momentum — the asymmetry between upward and downward price changes.

No single indicator can unambiguously classify the market regime because each is subject to its own noise and lag. ATR can spike on a single news event without a trend developing. Bollinger Bands can narrow without a breakout materializing. ADX can be low during a period of choppy, high-volatility trading. RSI can signal overbought conditions that persist for weeks in a strong trend.

The framework proposed here combines the four indicators into a conjunctive classification rule. The key insight is that when multiple independent signals agree, the probability of a correct classification increases substantially — this is the same principle that underlies ensemble methods in statistical learning.

Regime Definitions

Mean-Reverting Regime. The market is classified as mean-reverting when the following conditions hold simultaneously:

  1. ATR is below its 20th percentile relative to its rolling 50-day distribution, indicating compressed volatility.
  2. Bollinger Bandwidth is in the lower quartile of its recent distribution, confirming the volatility compression on a normalized basis.
  3. ADX is below 20, confirming the absence of directional conviction.
  4. RSI oscillates within the 30–70 band, indicating balanced momentum without persistent overbought or oversold conditions.

Under these conditions, the price process is well-approximated by a mean-reverting model (e.g., an Ornstein-Uhlenbeck process), and strategies that sell resistance and buy support are theoretically justified.

Trending Regime. The market is classified as trending when:

  1. ATR exceeds its rolling mean by more than 1.5 standard deviations, indicating a significant expansion in realized volatility.
  2. Bollinger Bandwidth is expanding and price is trading near or beyond one band, indicating directional breakout.
  3. ADX is above 25 and rising, confirming increasing directional conviction.
  4. RSI has exited the 30–70 neutral zone and shows no sign of reversal (i.e., no divergence with price).

In this regime, the price process is better modeled as having a persistent drift component, and trend-following strategies — moving average crossovers, channel breakouts, or momentum models — are appropriate.

Transitional State. When the indicators disagree — for instance, when ATR is rising but ADX remains below 20, or when Bollinger Bands are narrowing but RSI is at an extreme — the market is in a transitional state. This is the most hazardous environment for systematic strategies, because the regime has not yet resolved. The prudent course is to reduce position size and wait for confirmation. The transition from mean-reverting to trending is often marked by a “squeeze release” in Bollinger Bands coinciding with a sharp rise in ATR and a crossover of ADX above 20. The reverse transition — from trending to mean-reverting — is often signaled by ADX turning down from a peak above 40 while RSI shows divergence.

Threshold Calibration

The specific numerical thresholds cited above (20th percentile for ATR, ADX at 20 and 25, RSI at 30 and 70) are conventions rather than laws. They should be calibrated to each asset and time horizon. A useful procedure is the following:

  1. Compute the four indicators over a long historical sample (at least 500 periods).
  2. Label each period as trending or mean-reverting using a forward-looking criterion — for instance, whether the next 10-period return exhibits a significant drift (trending) or mean-reverts (mean-reverting).
  3. Sweep the indicator thresholds to maximize the classification accuracy (or the F1 score, if class imbalance is a concern).
  4. Validate the chosen thresholds on an out-of-sample period.

This procedure ensures that the thresholds are grounded in empirical evidence rather than received wisdom. The cross-validation also guards against overfitting to a particular market episode.

Conditional Strategy Selection

The practical payoff of regime detection is the ability to switch between strategy families. In the mean-reverting regime, the framework favors strategies such as Bollinger Band mean-reversion (entering long at the lower band and short at the upper band), RSI-based oscillation trades, and short-dated options selling strategies that profit from time decay in a low-volatility environment. Stop-losses should be set narrowly — at 1 to 1.5 times ATR from entry — because the mean-reverting model implies that prices should not wander far from the mean.

In the trending regime, the framework favors trend-following strategies: moving average crossovers, Donchian channel breakouts, and long-dated options buying strategies that profit from volatility expansion. Stop-losses should be set more generously — at 2 to 3 times ATR — to accommodate the larger price swings that characterize trends. Position sizing should account for the increased volatility by scaling inversely with ATR, so that the dollar risk per trade remains constant.

Limitations and Extensions

The framework presented here is deliberately simple — four indicators, conjunctive rules, fixed (or empirically calibrated) thresholds. Several extensions are possible.

First, the indicators could be combined in a probabilistic rather than deterministic fashion. A logistic regression or random forest trained on the four indicator values as features, with the regime label as the target, would produce a probability of being in each regime rather than a binary classification. This would naturally handle the transitional state by assigning it a probability close to 0.5.

Second, the framework could be enriched with additional indicators. The Choppiness Index (CHOP) directly measures whether a market is trending or ranging. The VIX (for equity markets) provides a forward-looking measure of implied volatility that complements the realized volatility captured by ATR. Volume-based indicators — such as the Volume Price Trend or On-Balance Volume — can confirm whether a price move is supported by participation.

Third, the framework could be made adaptive. Rather than fixed thresholds, one could use regime-switching models (e.g., Hidden Markov Models) to estimate the probability of each regime in a fully data-driven manner. The technical indicators would then serve as features for the HMM rather than as direct classification rules. This approach has the advantage of letting the data speak, but the disadvantage of being harder to interpret and diagnose when it fails.

Finally, it should be acknowledged that all technical indicators are lagging — they are computed from past prices and cannot anticipate regime changes before they occur. The framework can identify a regime promptly after it begins, but it cannot predict the timing of a transition. This is an inherent limitation of any backward-looking methodology and is not specific to the indicators chosen here.

References

  1. Wilder, J. W. (1978). New Concepts in Technical Trading Systems. Trend Research.
  2. Bollinger, J. (2001). Bollinger on Bollinger Bands. McGraw-Hill.
  3. Murphy, J. J. (1999). Technical Analysis of the Financial Markets. New York Institute of Finance.
  4. Kaufman, P. J. (2013). Trading Systems and Methods (6th ed.). Wiley.
  5. Ang, A., & Timmermann, A. (2012). Regime Changes and Financial Markets. Annual Review of Financial Economics, 4, 313–337.
  6. Hamilton, J. D. (1989). A New Approach to the Economic Analysis of Nonstationary Time Series and the Business Cycle. Econometrica, 57(2), 357–384.