Indicator library · Trend

Bollinger Bands and Their Bandwidth

A moving average with a band two standard deviations either side of it. The envelope breathes with recent volatility, which makes the width the interesting reading and the touch the one that is routinely misread.

The calculation

  1. Middle band: a simple moving average of the close over n periods, conventionally 20.
  2. Standard deviation of the same n closes around that average.
  3. Upper and lower bands: average ± k × standard deviation, with k conventionally 2.

The envelope therefore has no fixed width: it expands when recent closes have been scattered and contracts when they have been tight. That single dependency produces every property the tool has, including the one that gets it misused, in a quiet market the bands are close to the price, so touches are frequent and mean very little.

Bandwidth through a squeeze and the expansion after itThe upper panel shows a price series trading in a very narrow range for about fifteen bars and then advancing steadily for fifteen more. The lower panel shows bandwidth, the distance between the bands as a percentage of the middle average, which sits at a very low level through the quiet stretch, expands sharply as the advance begins, and stays elevated while price continues to rise.CLOSEBANDWIDTH %7.68Bandwidth through a squeeze and the expansion after itThe upper panel shows a price series trading in a very narrow range for about fifteen bars and then advancing steadily for fifteen more. The lower panel shows bandwidth, the distance between the bands as a percentage of the middle average, which sits at a very low level through the quiet stretch, expands sharply as the advance begins, and stays elevated while price continues to rise.CLOSEBANDWIDTH %7.68
Fig. 1: schematicComputed at build time. Bandwidth falls to 0.79% of the average through the quiet stretch and reaches 15.06% during the advance, a factor of more than ten, from the same formula on the same instrument. The squeeze is visible before the move and says nothing about its direction; what followed here could as easily have been a decline, and the figure would look the same until the price panel diverged.

The touch is not the signal

The most common thing said about these bands (price at the upper band is overbought) is the one thing their creator has spent years objecting to. It is worth being precise about why.

A touch means the close is two standard deviations from its own recent mean. In a market going nowhere, that is a genuine outlier and the reading has some content. In a trend, the mean is moving with the price and the deviation is being computed over a window in which almost every close was higher than the one before, so price reaching the band is what a healthy advance does, repeatedly, for as long as it lasts.

The behaviour has a name: a walk up the band. During one, every touch is a losing counter-trend trade for anyone reading touches as reversals. The reading that carries information arrives at the end of the walk, when a new push in price fails to reach the band at all, the same divergence logic as everywhere else on this site, and equally not a countdown.

The squeeze, which is the real reading

Bandwidth, the distance between the bands as a percentage of the middle average, turns the impression "the bands look narrow" into a number that can be compared with the instrument’s own history. When it reaches the lowest few per cent of its own range, the market has been unusually quiet.

This is the one reading with a real mechanism behind it. Volatility is persistent and mean-reverting (quiet periods cluster, and they do not last indefinitely), which is among the better-documented regularities in market data and is the basis of a great deal of options pricing. A squeeze is therefore a genuine statement that the current calm is unusual for this instrument.

What it emphatically does not carry is direction. The expansion that follows a squeeze can go either way, and the figure above would look identical up to the moment of expansion whichever way it broke. Anyone trading a squeeze directionally is taking a position the indicator does not support.

The centre line does its own work

The middle band is an ordinary moving average and carries every property of one, including the one people forget: it can turn on a quiet session because a large value has just left the back of the window. When that happens the whole envelope shifts with it, and a touch that looks like price reaching the band is partly the band arriving at the price.

It is also the reference the two outer lines are dispersion around, which makes the choice of period matter twice over. A 20-period setting defines both what "recent mean" means and what "recent scatter" means, and the two cannot be tuned separately without making the envelope asymmetric around the quantity it is measuring. If a chart's bands look wrong, the first thing to check is the centre line rather than the multiplier.

Where it misleads

Known failure modes
SituationWhat goes wrong
Touch read as a reversalIn a trend price walks the band for weeks. Every touch is a counter-trend trade in a market that is not turning.
Squeeze traded directionallyThe reading is about the size of the coming move, not its direction. The expansion can break either way.
Normal-distribution reasoning"Two standard deviations contains 95%" does not hold for closing prices, which have fat tails and are autocorrelated.
After a gapThe bands widen at once and narrow abruptly when the gap leaves the window, both are artefacts of the lookback.
Quiet marketThe envelope contracts around the price, so touches become frequent and carry almost no information.
Bandwidth compared across instrumentsA narrow band on one instrument is an ordinary week on another. Compare against its own history only.

What volume adds

Every input here is a closing price, so the bands cannot distinguish a squeeze produced by genuine equilibrium, buyers and sellers meeting in size and agreeing on a level, from one produced by nobody trading at all. They look identical in the closes and they resolve very differently.

Volume separates them at a glance. A narrow band on sustained, ordinary volume describes a market in balance; a narrow band on the lightest sessions of the quarter describes an absence of participants, where the expansion may be nothing more than the first real order arriving. The same pairing applies at the other end: a band touch on heavy volume is a different event from an identical touch on a session nobody traded.

Frequently asked questions

How are the bands calculated?

A simple moving average of the close — 20 periods by convention — with an upper and a lower band placed a fixed number of standard deviations away, conventionally two. The standard deviation is computed over the same window as the average, so the bands widen when recent closes have been scattered and narrow when they have been tight. Everything the tool does follows from that one dependency.

Does a touch of the upper band mean the instrument is overbought?

No, and John Bollinger has said so repeatedly. A touch means price is two standard deviations from its own recent mean, which in a strong trend is a normal condition. Price can walk along the upper band for weeks, making a new high and a new touch every few sessions. Selling every touch in that market is a stream of losing counter-trend trades. The bands describe where price is relative to its recent behaviour; they contain no statement about what happens next.

What is a squeeze?

A period in which the bands narrow to an unusually small width, because recent closes have been tightly clustered. It is the one reading here with a documented tendency behind it: volatility is persistent and mean-reverting, so unusually quiet periods tend to be followed by less quiet ones. What the squeeze does not say is direction, the expansion that follows can go either way, and a squeeze traded directionally is a coin flip with extra steps.

What does bandwidth measure?

The distance between the bands as a percentage of the middle average, which turns "the bands look narrow" into a number you can compare with the same instrument’s own history. A bandwidth in the lowest few per cent of its own two-year range is a squeeze; the same absolute figure on another instrument may be perfectly ordinary. Like almost everything on this site, it is only meaningful against its own past.

Should I change the two standard deviations?

Rarely, and never to make the bands "work better". Two is a convention that gives a useful visual and has no statistical standing here, because closing prices are not normally distributed, the tidy "95 per cent of observations" claim from statistics does not transfer to a series with fat tails and autocorrelation. Widening to 2.5 produces fewer touches and narrowing to 1.5 more, and neither adjustment changes what a touch means.

Why a simple average rather than an exponential one?

Because the standard deviation is computed over the same fixed window, and using a differently weighted centre line would make the two halves of the calculation inconsistent. Some implementations do offer an exponential middle band; it is defensible and it means the envelope is no longer symmetric around the quantity whose dispersion is being measured. If you compare two charts and the middle lines differ, this is usually why.

What is a "walk up the band"?

A sustained advance in which price stays pressed against the upper band, touching it repeatedly without any meaningful pullback. It is the clearest demonstration that a touch is not a reversal signal, and Bollinger’s own guidance treats a walk as evidence of strength rather than of exhaustion. The reading that matters during a walk is when price finally fails to reach the band on a new push.

How do the bands behave around a gap?

Badly for a few sessions, and predictably. A gap adds a large deviation to the window, so the bands widen immediately and stay wide until the gap leaves the lookback, at which point they narrow abruptly on a day when nothing happened. Both movements are artefacts of the window rather than statements about the market, and they are the reason a squeeze reading taken shortly after an earnings gap should be distrusted.