Mean Reversion: What It Is, the Z-Score Math, and a Test on 33 Years of SPY
Mean reversion means trading against a stretched move on the expectation that price returns toward its average. On SPY since 1993, closes below the lower Bollinger Band got back to the 20-day average within 20 sessions 91.22% of the time, but the median miss was more than four times the median gain.
Mean reversion is the idea that a price pushed unusually far from its average tends to drift back toward it, so a mean-reversion trade goes against the stretch and takes profit at the average. The catch, measured below on SPY, is that an average drifts toward price even when nothing is pulling price back.
How it works
Every mean-reversion rule makes three choices. Which average counts as “the mean” (a 20-day simple average is common for swing trades, VWAP for a single session), how far is “too far” (a fixed percentage, a number of standard deviations, or an oscillator reading), and how long the trade is allowed to take before it is called wrong.
The entry is the stretch and the exit is the middle. A close far under the average is a buy, a close far over it is a sell short, and the target is the average itself rather than the opposite extreme. Bollinger Bands draw the two-standard-deviation version of “too far” straight onto the chart, and the RSI 2 strategy uses a very short oscillator instead.
The same logic runs on things other than one price. In pairs trading the stretched number is the gap between two related stocks, and in volatility trading it is the level of the VIX. What changes is the series; the bet that an extreme reading fades is the same.
It needs a market that has a middle. In a trading range the average sits near the center of the swings and a stretch has somewhere to go back to. In a strong trend the average is chasing price, and the “stretched” reading can stay stretched for weeks.
The z-score: how far is “too far”
A z-score puts the stretch in units of normal movement. Take the last N closes, find their average and their standard deviation, then divide the gap between today’s close and the average by that standard deviation. A z-score of −2 means the close is two standard deviations under its average, which is exactly where the lower Bollinger Band sits.
One detail changes the answer: which standard deviation. The textbook sample version divides by N − 1; the Bollinger version that charting platforms draw divides by N. For a 20-day window the sample figure is about 2.6% larger, so the same close gives a slightly smaller z-score.
Of the 262 SPY closes below the lower band since 1993 that are tested below, 23 were not two sample standard deviations under their average. A rule written as “z under −2” and a rule written as “close under the lower band” are not quite the same rule.
A worked example
SPY on 16 September 2026, the most recent signal with 20 sessions of data after it. The 20 closes from 19 August to 16 September added up to $15,293.44, so the 20-day average was $15,293.44 ÷ 20 = $764.67. The population standard deviation of those 20 closes was $4.71 (the sample version, $4.83).
The stretch, in numbers. The close of $754.05 sat $10.62 under the average. Divided by $4.71, that is a z-score of −2.26, or −2.20 using the sample standard deviation. The lower band was $764.67 − 2 × $4.71 = $755.25, and the previous close, $757.39 on 15 September, had been just above its own band at $757.22, so 16 September was the first close under it.
What happened next. SPY closed at $762.60 on 17 September, $761.69 on 18 September and $773.50 on 21 September, the first close back above the 20-day average, which by then was $764.69. A trade at the signal close that took profit at the average made 2.58% in three sessions, before costs. In this case the average did not move down to meet price at all; price did the whole trip. Twenty sessions after the signal, on 14 October, SPY closed at $769.60, 2.06% above the entry.
One example proves nothing, which is why the rest of this page counts all of them. This case was picked only because it is the latest complete one, and it happened to work. SPY’s 30 October 2026 close was another first close under the band, too recent to score.
Mean reversion against trend following
They are the same claim with the sign flipped. Mean reversion says a large move is more likely to be followed by a move the other way; trend following says it is more likely to continue. On one market, at one speed, over one period, the data can only favor one of them.
Their results have opposite shapes. Mean reversion tends to produce many small gains and a few large losses, so it feels right for a long time. Trend following produces many small losses and a few large gains, so it feels wrong most of the time. A long run of small gains is evidence of the shape, not of an edge.
The original data
The test. Yahoo Finance daily closes for SPY from 29 January 1993 to 30 October 2026, downloaded 1 November 2026, unadjusted for dividends. A signal is the first close below the lower Bollinger Band (the 20-day simple average minus two population standard deviations of the same 20 closes), with the previous close at or above its own lower band.
That gives 262 signals from 2 April 1993 to 16 September 2026, the last with 20 sessions after it. Got back means a later close at or above that day’s 20-day average within 20 sessions.
239 of the 262 got back, 91.22%, after a median of 9 sessions, at a median 1.86% above the entry close. The 23 that never got back sat a median 8.27% below entry 20 sessions later, and the worst, from 29 September 2008, was 24.63% down.
Added up as simple percentages, the 239 came to +426.52 points and the 23 to −229.68, so fewer than one case in eleven took back more than half of what the rest made, before any costs. Every signal is in the lower-band file.
Of the 239, 42 were at or below the entry when the average was reached, because the average had come down to meet price. That raises the question none of the usual definitions ask: how often would a series with no pull back to its average still “get back to the average”?
The control: SPY with its days shuffled. The 8,496 daily close-to-close changes were put in random order 1,000 times and each shuffled series was rebuilt from the first close. Every shuffled series has exactly the same daily moves and ends at exactly the same price as the real one; only the order is different, so any pull back toward the average is gone. The same lower-band rule then ran on each.
The shuffled series got back to the average a median 79.15% of the time (the middle 90% of shuffles fell between 73.87% and 84.16%). So most of the 91.22% needs no reversion force at all: a falling 20-day average drifts down toward a low close on its own. Measured on the real signals, the average’s own fall closed a median 46.50% of the gap between the signal close and the average.
But the real series beat every one of the 1,000 shuffles, whose best was 89.11%. About 12 points of the real result is the most that a genuine pull back to the average could explain in SPY’s daily history. It is a ceiling, not a measurement: shuffling also breaks up calm and wild stretches, and that alone can change how often a close gets back. The same holds for the count: the real series produced 262 first closes under the band, more than any shuffle (at most 250), because real volatility comes in clusters.
Twenty sessions out, the extra was within chance. SPY closed higher 20 sessions after 180 of the 262 signals, 68.70%, against 5,398 of 8,457 for every close that could have been a signal (from 1 March 1993, the first with a band the day before) and had 20 sessions after it, 63.83%. That gap gives p = 0.10 under the normal approximation, and signals cluster in sell-offs, so it is weaker than that.
The shuffle file lists all 1,001 runs. Nasdaq’s own SPY closes from 31 October 2016 to 30 October 2026 give the same 70 signals on the same dates, 66 of them getting back, as Yahoo; the two feeds differ by more than 2 cents on two days.
Speed changes the answer, and so does the decade. On the S&P 500 index from 1950 to 2026, the session after a 2% drop closed higher 26.67% of the time in the 1970s and 71.43% in the 1990s, and no decade since 2000 separated from chance; the decade table has all eight. The fade trading page tests the next-day bounce on SPY itself.
In the search study behind this site, 157 of 24,971 videos have mean reversion in the title, at a median of 3,857 views.
Questions people ask
What is the difference between mean regression and mean reversion?
Regression to the mean is a statistical effect: an extreme measurement is usually followed by a less extreme one simply because part of the extreme was luck. Mean reversion is a stronger claim, that a force pulls the price back toward its average. The shuffle test above separates the two: the 79.15% is the part any noisy series produces, and only the gap above it is a candidate for reversion.
What is the best mean reversion strategy?
There is no tested best; there are three choices (the average, the stretch, the time limit) and a stop. A two-standard-deviation stretch against a 20-day average is the most common, and on SPY it got back to the average 91.22% of the time while its misses ran a median 8.27% the wrong way. Any version should be judged on what its misses cost, not on how often it hit.
How long does mean reversion take?
It depends on the average. With a 20-day average on daily SPY closes, the median trip back to the average took 9 sessions, and the test gave up after 20. A five-minute chart and a 20-bar average work in minutes; valuation measures such as price-to-earnings ratios can take years.
Does mean reversion work in a trending market?
It bets against the trend’s direction, which is the problem. In a strong downtrend the average keeps falling and each “stretched” close is followed by a lower one; the five SPY lower-band closes of September 2008 that never got back were down 9.82% to 24.63% twenty sessions later.
When it fails
Fading a trend
This failure is not symmetrical with trend following’s. A trend follower in a range loses a little, again and again; a mean reverter in a trend loses a great deal once. The SPY close below the lower band on 25 February 2020 never got back within 20 sessions, and its lowest close in that time was 28.69% below the entry.
The exit is not a price
“Out when price comes back” has no number on it. A method whose losing case has no defined end is the one that ends an account, and it is an easy mistake here because the winning case is so frequent. The stop has to sit at a fixed price beyond the stretch, such as a swing low from market structure, set before the trade and sized as a stop loss rather than a hope.
The stretch was a repricing
A move with news behind it is not a stretch. A stock that gapped on earnings has a new value, and the old average describes a company that no longer exists. The band or the z-score says “far” without asking why, and the why is what separates a move that comes back from one that has repriced.
The rule was fitted to the decade
A rule tested on one period can meet the opposite in the next. A next-day bounce rule fitted to the 1990s would have been fitted to the one decade where it looked strongest, right after two decades in which the same signal pointed the other way.
Related
Trend following is the opposite bet, and neither page means much without the other.
Trading range is the condition mean reversion needs, read from price rather than from an indicator.
And Bollinger Bands is the usual way of putting a number on “stretched”.
Size a mean-reversion position for the move that does not come back, not for the many that do. A run of small gains can make the method feel safe, and then one move keeps going and takes back more than many small gains added.
— Michael Whitman
This page is educational, not financial advice. Test every idea on your own charts before risking money.