Learn › Technical analysis

Trending or Mean-Reverting? Measure It with the Variance Ratio and Hurst

If bars were independent, k-bar variance would be k times one-bar variance. Computing VR and Hurst on simulated prices, how noisy short samples are, and how to use them.

Advanced 11 min read 22 October 2026

What you will learn
  • If each bar's move is independent, the variance of a k-bar change is exactly k times the one-bar variance. A ratio above 1 means persistence, below 1 means a pull back
  • The Hurst exponent is the slope of the same idea on a log-log chart. 0.5 is a random walk, above 0.5 trends continue, below 0.5 moves get pulled back
  • On 500 bars, a true random walk still gives an H anywhere from about 0.37 to 0.57, so a value a little away from 0.5 tells you nothing yet
  • The mild pull-back in very short-term currency moves is smaller than the spread, so fading it loses after costs
  • Use these numbers to choose a strategy family (trend or range) at your holding horizon, not to time entries

Under every strategy sits one question: does this market keep going or swing back? If it keeps going, trend-following systems have the edge. If it swings back, range systems do. This article introduces two statistical tools that answer that question directly, the variance ratio and the Hurst exponent. We test them on simulated prices where we already know the answer, look at how much the numbers wobble on short samples, and explain why the small pull-back you can measure in very short-term currency moves usually can’t be turned into money.

Terms used in this article

  • Random walk: a price where each bar’s move has nothing to do with the previous one. Looking back you will still see trends and ranges, but they are pure chance
  • Autocorrelation: how this bar’s move relates to the previous bar’s move. Positive means up tends to follow up, negative means up tends to be followed by down. It runs from −1 to 1
  • Mean reversion: the further price strays from a centre, the stronger the pull back toward it
  • Return: in this article, the change in price per bar, not the price itself

The idea: if bars are independent, variances simply add up

Variance is the average squared distance from the mean, a measure of how widely price swings. A key rule in statistics: if each bar’s change is independent of the others, the variance of the total change over k bars is exactly k times the variance of one bar.

What if they are not independent?

  • Moves in the same direction cluster: the k-bar change runs longer than it should, and the variance comes out above k times
  • Moves often alternate: up then down, down then up, the changes cancel each other and the variance comes out below k times

That gives the variance ratio, which Andrew Lo and Craig MacKinlay used as a test of the random walk in their 1988 paper.

VR(k) = variance of k-bar changes ÷ (k × variance of 1-bar changes)

A VR near 1 is a random walk, above 1 means persistence, below 1 means a pull back. It is tied directly to autocorrelation: VR(2) is roughly 1 + the one-bar autocorrelation, and VR at longer k is a weighted sum of the autocorrelations at every lag up to k. Its strength is that it adds up many small effects across lags that might each be too small to see on their own.

Worked example: VR(2) by hand

Eleven closing prices (in pips): 100, 102, 105, 106, 105, 102, 100, 102, 105, 104, 100

  1. One-bar changes: +2, +3, +1, −1, −3, −2, +2, +3, −1, −4. They sum to exactly zero, so the mean is 0 and we can use the average of the squares directly
  2. Squares: 4 + 9 + 1 + 1 + 9 + 4 + 4 + 9 + 1 + 16 = 58, divided by 10 = 5.8
  3. Two-bar changes (overlapping): +5, +4, 0, −4, −5, 0, +5, +2, −5
  4. Squares: 25 + 16 + 0 + 16 + 25 + 0 + 25 + 4 + 25 = 136, divided by 9 = 15.11
  5. VR(2) = 15.11 ÷ (2 × 5.8) = 1.30

Under a random walk the two-bar variance should be about 2 × 5.8 = 11.6, but it is 15.11 because same-direction bars cluster (three up, three down, two up). Check: the one-bar autocorrelation of this series is 20 ÷ 58 = 0.34, close to VR(2) − 1 = 0.30. The gap comes from the very short sample. A real calculation subtracts the mean first (markets usually have a small drift) and uses hundreds of bars or more.

The Hurst exponent is the slope of the same thing

Measure the variance of k-bar changes at k = 1, 2, 4, 8, 16, 32, 64 and plot it on a chart where both axes are log scale. A random walk gives a straight line with slope 1, because the variance grows in step with k.

  • The variance grows like k to the power 2H. H is the Hurst exponent, half the slope
  • H = 0.5 random walk, H > 0.5 persistent (moves continue), H < 0.5 anti-persistent (moves get pulled back)
  • Link to VR: if H is constant, VR(k) = k to the power (2H − 1)

The name comes from Harold Edwin Hurst, a British hydrologist who studied the levels of the Nile to design dams. His original method is called R/S analysis (rescaled range). This article uses the variance method above because it ties straight to VR and is easy to explain. The two methods give different values on short samples, as the next sections show.

Testing on simulated prices with a known answer

We built three simulated price series of 2,000 bars each in node and computed VR and H with the formulas above (mean subtracted).

  • Random walk: each bar’s change is independent and random
  • Persistent returns: this bar’s change = 0.3 × the previous bar’s change + noise (an AR(1) process)
  • Pulled back to a mean: every bar, price is pulled 2% of the way back toward zero, plus noise (an Ornstein–Uhlenbeck, or OU, process). The distance halves in about 34 bars
Random walk · H = 0.50 · VR(64) = 1.06 Persistent returns (trending) · H = 0.58 · VR(64) = 2.00 Pulled back to a mean (OU) · H = 0.42 · VR(64) = 0.51
Illustrative simulated series, not real market prices. Each row has its own vertical scale. H and VR are computed from the same series shown.
Series1-bar autocorrelationVR(2)VR(8)VR(16)VR(64)H
Random walk−0.0051.000.910.911.060.50
Persistent returns0.3121.311.821.912.000.58
Pulled back to a mean0.0051.000.900.790.510.42
1 2 4 8 16 32 64 1 10 100 Number of bars k (log scale) Variance of the k-bar change (log) Dashed = exactly H 0.5 Trending H 0.58 Random walk H 0.50 Reverting H 0.42
Same series as the first figure. Half the slope of each line is its estimated H. The dashed line is where a random walk should sit (H = 0.5).

Three lessons from this table:

  1. Even a random walk isn’t exactly 1.00. The random walk’s VR(8) is 0.91, which is pure chance. You need to know how far the value can wander before you read anything into it
  2. Mean reversion hides at long horizons. The OU series has a one-bar autocorrelation of 0.005, practically zero, and a VR(2) of 1.00. Looking bar to bar you would call it a random walk. Yet at 16 bars VR falls to 0.79 and at 64 bars to 0.51. The pull back shows up only at horizons near its half-life
  3. H depends on the range of k you use. The AR(1) series’ VR rises fast and then flattens (theory says VR(64) = 1.84, we measured 2.00), so the slope is steep at short k and parallel to 1 at long k. The H of 0.58 is an average over 1 to 64. Measure another range and you get another number

The practical conclusion: the right question is not “is this market trending?” but “at the horizon I hold trades, does this market continue or pull back?”

How noisy are these numbers on short samples?

We simulated 200 random walks per length and computed H and VR(16) for each. None of them has a trend or any mean reversion, so everything you see is sampling variation.

LengthH, variance method, mean ± SDMiddle 95%H by R/S, meanVR(16), middle 95%
250 bars0.454 ± 0.0730.30 – 0.580.6010.49 – 1.73
500 bars0.476 ± 0.0450.37 – 0.570.5890.63 – 1.37
2,000 bars0.495 ± 0.0240.45 – 0.540.5670.79 – 1.23
5,000 bars0.499 ± 0.0140.47 – 0.520.5530.88 – 1.12
500-bar series 5,000-bar series 0.3 0.4 0.5 0.6 Estimated H 95% fall between 0.37 and 0.57 95% fall between 0.47 and 0.52
200 simulated random walks per length, with no trend and no mean reversion at all. Every distance from 0.5 is pure sampling luck.

How to read it:

  • 250 daily bars is about a year. In one year a true random walk can give a VR(16) anywhere from 0.49 to 1.73. You could call it “a strongly mean-reverting year” or “a strong trend year”, and there is nothing there at all
  • Both methods are biased, in opposite directions. The variance method reads below 0.5 on short samples (0.454 at 250 bars), while R/S reads above 0.5 and is still biased at 5,000 bars (0.553). If someone says “H = 0.58, this market trends” from 500 bars using R/S, that number sits very close to the random-walk average for that method (0.589)
  • The width matches theory. The standard error formula for VR under a random walk (the overlapping version Lo and MacKinlay used) gives an SD for VR(16) of 0.28, 0.20, 0.10 and 0.06 by length, close to the simulated 0.29, 0.18, 0.11 and 0.06
  • The right method: before reading the H or VR of a real market, simulate random walks of the same length, compute them with the same method, and check whether the real value falls outside that range. If you measure many pairs over many periods, some will fall outside by chance alone, as explained in testing many ideas and finding a winner by luck

Very short-term currency moves often look mean-reverting, but the spread eats it

High-frequency studies have long found that tick-to-tick and few-minute price changes in major currencies tend to have a slightly negative one-bar autocorrelation. The main explanation is market microstructure, not traders overreacting:

  • Bid-ask bounce: if recorded prices alternate between the bid and the ask, the changes alternate in sign even when the true price hasn’t moved. Richard Roll described this mechanism in 1984 and used it to estimate the size of the spread
  • Quote adjustment: a price jolted by a large order is often partly corrected once liquidity returns
  • Price steps: prices move in units of the last decimal, and rounding creates small up-down alternations

Notice that every one of these is about the size of the spread or smaller. That is the problem. Put numbers on it (hypothetical, not market data): a price whose per-bar change has an SD of 2 pips and a one-bar autocorrelation of −0.1, which would be strong for a real market. The rule “last bar up, sell; last bar down, buy; hold one bar” has an average edge per trade of 0.1 × 0.80 × 2 = 0.16 pip before costs. (0.80 is √(2/π), the mean size of a normal draw. A one-million-bar simulation gave 0.079 SD per trade, matching the theoretical 0.080.) Pay a 1-pip spread per round trip and the net is −0.84 pip on every trade. To break even you would need an autocorrelation of −0.63, far beyond what major currency markets show.

A pull back smaller than the spread is not an opportunity. It is the footprint of the spread itself, and the one who benefits is the price maker, not the trader paying to cross it.

The same logic explains why small timeframes like M1 carry heavier costs, see is trading M1 a good idea.

What we saw in our own backtests

We haven’t measured Hurst on real data, but we tested something very close: fading stretched prices versus riding the move. In our backtests on gold (XAUUSD) from 2022 to 2026 (2026 on real tick data, 2022–2025 on ticks generated from 1-minute bars):

  • Nearly every rule we built that fades a price level lost money in both 2022 and 2023. One variant passed those two years, then lost heavily in 2024 with a 41% drawdown, and its five-year total was close to zero. The rule that survived rides the move
  • There is no level where a reversal is certain. Across 921 large gold swings from April to August 2026, once price stretched past the start of the swing to the 127.2 through 423.6 Fibonacci extensions, the chance of continuing further stayed at roughly 40–70% at every level, never below about 40%. This was a statistical count on a single year, not live trades

This agrees with price at the old high: ride or fade and market regimes: the same market changes character from year to year. Limits: this is one market, gold, and past test results do not predict future results.

How to use it: choose the strategy family, not the entry

VR and Hurst measure the average behaviour of a market over the whole sample. They don’t tell you where the next bar goes. Use them for planning questions:

  1. Measure at the horizon you hold trades. Holding about 4 hours on M15? Look at VR at k around 16 bars, not VR(2)
  2. Measure on returns, not on price. Running R/S directly on price levels gives a value near 1 every time, which means nothing
  3. Use long samples and compare with the random-walk range. At least several thousand bars, and simulate the 95% range at the same length as in the table above
  4. Look year by year. If the value flips sides (VR above 1 some years, below 1 in others), the market’s character isn’t stable, and one system run throughout has to survive both
  5. Choose a family only when the result is clear. A VR clearly and consistently above 1 leans toward trend systems (trend following research). Clearly below 1 leans toward range systems. Inside the random range, don’t choose a family because of this number
  6. Look for mean reversion where it actually lives. A single currency pair often has no centre to return to, but the spread between two linked assets might. See pairs trading and cointegration
  7. Test the strategy itself after costs. A good VR doesn’t make a strategy profitable. Account for spread, swap and slippage, and keep the risk per trade at your usual level

If you want a measure you can read on the chart right away, ADX shows the strength of the current trend, while VR and Hurst answer a broader question, the average behaviour over the whole sample. They work together: one for the big picture, the other for now.

Common mistakes

  • Reading H from a few hundred bars. A 500-bar random walk still gives H anywhere from 0.37 to 0.57
  • Comparing numbers from different methods. R/S on a random walk still gives about 0.55 to 0.60. Use 0.5 as the dividing line and you will see trends in every market
  • Looking only at bar-to-bar autocorrelation. The OU pull back in the test above is almost invisible at 1 bar but clear at 64 bars
  • Thinking a small pull back is money. If it is smaller than the spread, it is your cost
  • Using one value forever. Market character changes over time. Last year’s number only describes last year
  • Using VR to time entries and exits. It is an average over the whole sample and says nothing about the direction of the next bar

Frequently asked questions

What Hurst exponent should my currency pair have?

There is no fixed value, and the result depends on the method, the horizon and the sample length. Most values seen in currency data sit near 0.5, and once compared with the range a random walk of the same length produces, they are often indistinguishable. Look at whether the value falls outside that range, not at the single number.

Why doesn't the H from my software match other sources?

There are several methods, such as classic R/S analysis or the variance method in this article, and each is biased differently on short samples. In our simulation, R/S averaged about 0.60 on 250-bar random walks whose true value is 0.5. Only compare numbers computed with the same method.

If H is below 0.5, does that mean fading is profitable?

No. H describes the shape of past moves. It does not tell you whether those moves are large enough to pay the spread and fees, and market behaviour changes. You have to test the strategy itself, after costs, across several periods.

This is general education, not investment advice. Trading is risky and you may lose all of your capital.

Tools Chat on LINE