What it measures
The bands measure two things at once: where the average close has been (the middle line) and how widely the closes have been scattered around it (the distance to the bands).
The scatter is measured with the standard deviation, a figure from ordinary statistics: roughly, the typical distance of a value from the average of its group. Quiet prices give a small deviation and narrow bands. Jumpy prices give a large one and wide bands.
So a close near the upper band is high compared with the last 20 closes, by a measure that adjusts itself to how lively those closes were. That is all it says. The bands are named after John Bollinger, who developed them in the 1980s.
How it is calculated, step by step
- 01
Middle band: a simple moving average.
The sum of the last N closes ÷ N. N is usually 20.
- 02
Find how far each of those N closes is from that average.
Distance = close − average. Some are positive, some negative.
- 03
Square each distance, add them up, divide by N.
Squaring makes every distance positive and counts the large ones more. The result is called the variance.
- 04
Take the square root.
That is the standard deviation, back in the unit of the price.
- 05
Upper band = middle + K × standard deviation.
K is usually 2.
- 06
Lower band = middle − K × standard deviation.
The bands are always the same distance above and below the middle.
This is the population standard deviation: the squared distances are divided by N. That is how the bands are defined. A program that divides by N − 1 instead (the sample standard deviation) draws slightly wider bands. Two figures are often derived from the bands: %B = (close − lower) ÷ (upper − lower), and bandwidth = (upper − lower) ÷ middle.
A worked example, by hand
Eight closes: 2, 4, 4, 4, 5, 5, 7, 9. Length 8, width 2.
- Middle = (2 + 4 + 4 + 4 + 5 + 5 + 7 + 9) ÷ 8 = 40 ÷ 8 = 5
- Distances from 5: −3, −1, −1, −1, 0, 0, 2, 4
- Squared: 9, 1, 1, 1, 0, 0, 4, 16, which add up to 32
- Variance = 32 ÷ 8 = 4; standard deviation = √4 = 2
- Upper band = 5 + 2 × 2 = 9; lower band = 5 − 2 × 2 = 1
- %B of the last close = (9 − 1) ÷ (9 − 1) = 1: it sits exactly on the upper band
The last close, 9, is two standard deviations above the average of the eight. It is on the band because it is the highest of the group, and for no other reason.
The numbers in this example were chosen to be easy to add up. They are not prices of anything.
How people read it
- The width. Wide bands mean the closes of the last N bars have been spread out; narrow bands mean they have been bunched together.
- The squeeze. A stretch of unusually narrow bands. Quiet spells do end, so a squeeze is read as the calm before a larger move. It does not say which way.
- A close at or beyond a band. It is high (or low) relative to the recent average, measured against recent scatter. In a strong trend closes can run along a band for many bars, which is called walking the band.
- The middle line. It is a 20-bar moving average and is read like one.
What it cannot tell you
- It cannot say that a price at the upper band will come back. The band is a measurement, not a wall.
- It cannot promise that 95% of closes stay inside. That figure belongs to a bell curve of independent values. Prices are neither: the share inside two-deviation bands is usually somewhat lower, and it varies. The chart on this page counts it for you.
- It cannot say which way a squeeze will break, or when.
- It cannot see the bar’s high and low. The bands are made from closes only, so a wick can pierce a band on a bar that closes well inside it.
Common mistakes
- Selling because the price touched the upper band, or buying because it touched the lower. A touch says the close is far from its recent average. Trends are made of such closes.
- Treating the bands as fixed levels. They move with every bar, and a band that the price ‘bounced off’ may have moved there to meet it.
- Widening or narrowing the bands until every past turn touches one.
- Forgetting that a narrow band is narrow in price terms. Whether a move out of it would cover the cost of trading is a separate sum.
Questions people ask
- What do 20 and 2 mean in Bollinger Bands?
- The middle band is a 20-bar simple moving average of the close. The upper and lower bands are 2 standard deviations of those same 20 closes above and below it. Both numbers are the conventional defaults; changing either changes how often the price reaches the bands.
- Does the price reverse when it touches a Bollinger Band?
- Not reliably. A close at a band is far from its recent average, measured against how scattered recent closes were. Sometimes the price then returns towards the average; in a strong trend it can stay at the band for many bars. The band describes where the price is, not where it goes.
- What is a Bollinger squeeze?
- A period in which the bands are unusually close together, because the last closes have been unusually near one another. It shows that the market has been quiet. Quiet periods end, but the bands do not say when, or in which direction the price will move when they do.
The words on this page
An indicator is arithmetic on prices that have already happened. It describes what a price did; it does not predict what a price will do. The chart on this page is invented: a seeded random walk, not a market. This page is an explanation for study. It is not advice, a recommendation or a forecast, and nothing an indicator shows says anything certain about what a price will do next.
