Bollinger Mean Reversion (Mean reversion)

Buys when price closes below the lower Bollinger Band (20-bar, 2σ) and sells when it recovers to the middle band — a mean reversion back to the 20-bar average.

How It Works

  1. Each bar, compute the 20-bar simple moving average of the close and its Bollinger Bands two standard deviations above and below.
  2. Buy when the close drops below the lower band — an unusually stretched move to the downside.
  3. Sell as soon as the close recovers above the middle band (the 20-bar average itself) — taking the quicker, more reliable half of the bounce instead of waiting for the far band.

Worked example. With bands at 96 / 100 / 104, a close at 95.5 buys. When price recovers and closes at 100.4 — back above the 20-bar average — the trade exits with roughly a 5% gain.

The Math Behind The Indicators

Everything runs on closing prices of the traded timeframe: P is a close, Pt today's close, and N counts bars — one bar is one candle of that timeframe, so 20 bars on a 1h chart is 20 hours.

Simple Moving Average (SMA)
The plain average of the last N closing prices: add them up, divide by N. It smooths out bar-to-bar noise so the underlying direction is easier to see — a rising SMA means recent prices sit above where they used to be.
\[\mathrm{SMA}_N = \dfrac{P_1 + P_2 + \cdots + P_N}{N}\]
Example: With N = 3 and closes 100, 102, 104 the SMA is (100 + 102 + 104) / 3 = 102.
Bollinger Bands
A 20-bar SMA with an envelope two standard deviations above and below it. The standard deviation σ measures how far closes have recently strayed from their average, so the bands widen when the market is choppy and tighten when it is calm — a close outside a band is a statistically unusual move.
\[\mathrm{Bands} = \mathrm{SMA}_{20} \pm 2\sigma_{20}, \quad \sigma_{20} = \sqrt{\dfrac{1}{20}\sum_{i=1}^{20} \left(P_i - \mathrm{SMA}_{20}\right)^2}\]
Example: If the last 20 closes average 100 and typically stray about 1.5 from it (σ = 1.5), the bands sit at 100 ± 3, i.e. 97 and 103. A close at 96.5 is below the lower band — unusually cheap relative to the recent range.

Example Chart

Example Chart

Bollinger Mean Reversion (Mean reversion)

Real Data27/ 100Composite score

Metrics Per Trade

Metrics Per Trade

Real data · Bollinger Mean Reversion (Mean reversion)

Final Metrics

Final Metrics

Real data · Bollinger Mean Reversion (Mean reversion)

Scores

Scores

Real data · Bollinger Mean Reversion (Mean reversion)

Resampled Data27/ 100Composite score

Metrics Per Trade

Metrics Per Trade

Resampled data · Bollinger Mean Reversion (Mean reversion)

Final Metrics

Final Metrics

Resampled data · Bollinger Mean Reversion (Mean reversion)

Scores

Scores

Resampled data · Bollinger Mean Reversion (Mean reversion)