← All lessons

Bands

Use Bollinger-style bands as a reversion rule · 7 min

ProGoal: Use Bollinger-style bands as a reversion ruleBefore this: Z-scoresFurther reading: Chan, Algorithmic Trading
The same ±2 σ bands on a trending market
79901000159
  • Close
  • 20-day mean
  • ±2 σ bands

Price rides along the upper band for weeks. Every touch looked "overbought".

Predict first

A band rule sells short every close above the upper 2 σ band and covers at the mean. What happens on a market like the one above?

Bollinger-style bands draw the mean ± k standard deviations around price. They are a picture of the z-score: a close above the upper band is z above +k. The band width shows volatility, and bands widen in storms and squeeze in calm.

upper = mean + k × σ · lower = mean − k × σ (usually n = 20, k = 2)

A band rule fades closes outside the bands. It shares the z-score's assumption: the market comes back. When a trend starts, that assumption breaks, and the losses can be far bigger than the usual gains, because nothing caps how far a trend goes. Two defences are common: a stop in z units (give up beyond, say, 3.5 σ) and a regime filter that stands aside when a trend measure is strong.

Try it: the band rule in a range and in a trend
1.00×1.50×2.00×01451
  • Band rule on a range market (most moves revert within days)
Sharpe ratio1.24
Return a year12.7%
Volatility10.0%
Max drawdown-10.7%
Trades57
Winners77%
Worst trade-7.2%

Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.

Worked calculation

Band levels and a signal

20-day mean, σ, k
50.00, 1.50, 2
Upper band
50 + 2 × 1.5 = 53.00
Lower band
50 − 2 × 1.5 = 47.00
Close 46.60
below the lower band: buy
z of that close
(46.60 − 50) ÷ 1.5 = −2.27
Check yourself
3 questions

What usually breaks a band rule?

The lower band is 47.00. Today’s low is 46.80 and the close is 47.40. Does a close-based band rule buy?

Mean 120, σ 4, k = 2.5. Where are the bands?

Missed questions come back for review after one day, then three, then a week.

Practice

The 20-day mean is 200 and the 20-day standard deviation is 10. Price closes at 180. What is its z-score?

Hint: z = (price − mean) ÷ standard deviation.

More in Drills →

Closing round

Three years of a fresh generated market are on screen; the next two years do not exist yet. Tune the rule on what you can see, commit to two predictions, then generate the future.

0.90×0.98×1.07×0625
  • Your rule so far
Sharpe before split0.14
Return before split2.1%
Max drawdown before-16.0%
Dickey–Fuller t (log price)-0.94

Over the next two years, after costs, this rule will…

What kind of market is this?

Generated markets, not real data. They show how a rule depends on the market it meets; they do not predict how real markets behave.