Market regimes
A market regime is the character of price movement over a stretch of time: directional movement, oscillation within a range, a lull, or a sharp expansion of the range. The same trading idea behaves differently in different regimes, which is why it pays to see the regime. This is a practice-level lesson with advanced sections: which regimes are distinguished, what each regime measure measures, and how to use them.
Which regimes are distinguished
- Trend — price shifts in one direction, pullbacks are smaller than the moves with the trend.
- Balance (range, flat market) — price oscillates between boundaries, moves in both directions roughly balance out.
- Volatility compression — bar ranges shrink, the market “goes quiet”.
- Volatility expansion — the range grows sharply: a breakout from a range, news, a cascade of stops.
- Momentum — a short, strong move in one direction.
- Mean reversion — deviations from some level (for example, VWAP) are more often followed by a move back than by continuation.
These words describe different properties of movement. Trend and balance are about directionality, compression and expansion are about range, momentum and reversion are about how neighboring moves are related. So no single measure can tell you “which regime we are in” — it measures one of these properties.
Directionality: EfficiencyRatio, CorrelationTrend, KalmanTrend
EfficiencyRatio (Kaufman’s efficiency ratio) compares the net price change over several bars with the path traveled: 1 means price moved in one direction without pullbacks, around 0 means it thrashed around in place. In the terminal the window is 10 bars by default.
CorrelationTrend is how closely price resembles a straight line: around +1 means it rises almost in a straight line, around −1 means it falls, around 0 means there is no straight-line dependence on time. KalmanTrend estimates the rate of price change and compares it with the noise: values beyond ±2 mean that directional movement stands out against the fluctuations.
All three answer the question “does the movement have a direction over this window”, but they react differently to outliers, window length and smoothing.
More: the EfficiencyRatio formula
Here is the bar’s price and is the window in bars. CorrelationTrend is the correlation of price with the bar number over bars. KalmanTrend divides the rate of price change estimated by a Kalman filter by the uncertainty of that estimate — the result is a quantity similar to a z-score.
How price fills a range: Choppiness
Choppiness compares the sum of the bars’ ranges with the range of the whole window. If the bars cross the same range many times, the value is high (above 61.8 by the traditional markup — “choppy”). If each bar adds new territory, the value is low (below 38.2 — directional movement).
More: the Choppiness formula
Here is the bar’s true range, and and are the high and low over bars (14 by default).
How neighboring moves are related: VarianceRatio
VarianceRatio answers a different question: do neighboring price changes continue one another? Around 1 means the changes are independent, as in a random walk. Above 1 means a rise is more often followed by a rise — moves tend to continue. Below 1 means a rise is more often followed by a pullback — moves tend to revert.
The key difference from directionality: price can move noticeably over the window (high EfficiencyRatio) while VarianceRatio stays around 1 — the shift happened but says nothing about continuation. Conversely, mean reversion can take place within an overall rise.
More: the Lo–MacKinlay test
VarianceRatio is based on the Lo–MacKinlay test (Review of Financial Studies, 1988). It compares the variance of log-price changes over bars with times the variance of one-bar changes:
In the terminal and the window is 200 bars; you can also display the z-statistic — how much larger the deviation from 1 is than random scatter. The windows overlap and volatility changes over time, so read the z-statistic on the chart as a scale, not as a rigorous statistical test.
Orderliness: PermutationEntropy
PermutationEntropy looks not at the size of changes but at their order: how often the same “patterns” of several neighboring prices repeat. 1 means all patterns occur equally often, with no orderliness at all; the lower it is, the more often the same patterns repeat — for example, “up, up, up” in a steady trend. The measure does not know how strong the movement was — only how regular it was.
More: permutation entropy
Bandt and Pompe’s permutation entropy: every consecutive prices (in the terminal ) form a pattern — which price is greater than which. The entropy of these patterns’ frequencies, normalized to its maximum:
Price changes in ticks, and on short bars neighboring closes are often equal. The terminal, like common calculation libraries, orders equal values by time — earlier means smaller — so in a quiet market with a large tick size the entropy is lower even though there is no orderly movement.
Range: Volatility
Volatility estimates volatility from bar ranges in percent per bar; it can be shown as a percentile relative to history or as the ratio of short-term to long-term volatility. Compression is a low percentile or a ratio below 1, expansion the opposite. Volatility says nothing about direction: the range expands both in a trend and in a chaotic range.
More: volatility estimators
The indicator uses the Parkinson, Garman–Klass, Rogers–Satchell and Yang–Zhang range-based estimators; unlike an estimate from closes alone, they take the bar’s high and low into account.
Why the measures disagree
- A steady rise with small pullbacks: EfficiencyRatio, CorrelationTrend and KalmanTrend are high, Choppiness is low, PermutationEntropy is below 1, while VarianceRatio may stay around 1 — if the pullbacks are random, the moves do not necessarily continue one another.
- A wide range with sharp reversals: directionality measures are low, Choppiness is high, VarianceRatio is below 1, PermutationEntropy is around 1.
- A random walk that happened to drift over the window: directionality measures can be high even though no continuation is built in; VarianceRatio and PermutationEntropy are around 1.
The disagreement is not a flaw of the measures but a consequence of the fact that they measure different properties.
How to use them
Regime measures describe the past stretch — they are context for choosing an approach, not an entry signal. Decide which property of movement matters for your idea, and watch that one:
- the idea “the move will continue” — directionality and how neighboring moves are related;
- a range breakout — compression before it and range expansion on the way out;
- reversion to VWAP or to the range boundary — high Choppiness and a tendency to revert.
A single measure is a reason to take a closer look; read it together with the level, the order flow and your risk.
In the JetScalp terminal
Indicators, formulas and settings: EfficiencyRatio, Choppiness, VarianceRatio, PermutationEntropy, CorrelationTrend, KalmanTrend, Volatility. How to add an indicator to a chart — Indicators.
Summary
- A regime is a set of properties: directionality, range, how neighboring moves are related, orderliness; one measure measures one property.
- EfficiencyRatio, CorrelationTrend and KalmanTrend are about directionality, Choppiness is about how price fills a range, VarianceRatio is about continuation or reversion, PermutationEntropy is about regularity, Volatility is about range.
- A directional shift over the window does not mean that the movement tends to continue.
- Regime measures are context for choosing an approach: match the idea to the regime rather than looking for a signal in it.
Check yourself
- How do the questions answered by EfficiencyRatio and VarianceRatio differ?
- Can Choppiness be high when price has risen noticeably over the window? Why?
- Why doesn’t PermutationEntropy distinguish a weak steady rise from a strong one?