Bollinger Bands are a volatility indicator made of three lines: a moving average in the middle, and an upper and lower band set a number of standard deviations away from it. The bands widen when prices become more volatile and narrow when they calm down, so they show both where price sits relative to its recent average and how volatile the market currently is. Developed by John Bollinger in the 1980s, they are used for both mean-reversion and breakout trading, two approaches that read the same band touch in opposite ways. A touch of a band is a description of where price is, not a signal by itself.
Key takeaways
- The standard settings are a 20-period simple moving average with bands 2 standard deviations above and below.
- Band width tracks volatility: a "squeeze" of narrow bands describes unusually low volatility, which has often been followed by larger moves, though not in a predictable direction.
- In strong trends, price can "walk the band," closing at or near the upper or lower band for many bars in a row.
- %B shows where price sits within the bands, and bandwidth measures how wide the bands are relative to the middle line.
- Keltner Channels use average true range instead of standard deviation, which makes them smoother and less reactive to single large bars.
On this page
How Bollinger Bands are built
With the default settings:
- Middle band = 20-period simple moving average (SMA) of the close.
- Upper band = middle band + 2 x the 20-period standard deviation of the close.
- Lower band = middle band - 2 x the 20-period standard deviation.
Standard deviation measures how spread out the last 20 closes are around their average. When closes are tightly clustered, the standard deviation is small and the bands are close to the middle line. When closes swing widely, the bands move apart. Platforms differ slightly in whether they divide by N or N - 1 when computing standard deviation; with 20 periods the difference is small.
It is sometimes said that about 95 percent of prices fall inside 2-standard-deviation bands. That figure comes from the normal distribution, but prices are not normally distributed and the calculation uses a rolling window of prices rather than returns. In practice, closes outside the bands are more common than that figure suggests, and the share varies by market and period.
%B and bandwidth
Two derived indicators turn the bands into numbers:
- %B = (price - lower band) / (upper band - lower band). A value of 1 means price is at the upper band, 0 means at the lower band, and 0.5 means at the middle line. Values above 1 or below 0 mean price is outside the bands.
- Bandwidth = (upper band - lower band) / middle band. It expresses band width as a fraction of price, which makes it comparable across time and across assets.
%B is useful in systems that need a single number for "how stretched" price is. Bandwidth is the standard way to identify a squeeze.
Worked example
The last 20 daily closes of a stock have an average of $50.00 and a standard deviation of $1.50.
- Middle band = $50.00
- Upper band = 50.00 + 2 x 1.50 = $53.00
- Lower band = 50.00 - 2 x 1.50 = $47.00
- Bandwidth = (53.00 - 47.00) / 50.00 = 6.00 / 50.00 = 0.12, or 12 percent
If today's close is $52.40:
- %B = (52.40 - 47.00) / (53.00 - 47.00) = 5.40 / 6.00 = 0.90. Price is near the upper band.
If it closes at $53.60 instead:
- %B = (53.60 - 47.00) / 6.00 = 6.60 / 6.00 = 1.10. Price closed outside the upper band.
A squeeze. A few weeks later, the stock has traded quietly and the 20-day standard deviation has fallen to $0.50, with the average still near $50.00.
- Upper band = 50.00 + 2 x 0.50 = $51.00; lower band = 50.00 - 2 x 0.50 = $49.00
- Bandwidth = 2.00 / 50.00 = 4 percent
Bandwidth has fallen from 12 percent to 4 percent, one-third of its earlier level. If 4 percent is near the lowest bandwidth reading of the past several months, traders would describe this as a squeeze.
The squeeze
Volatility tends to cluster: quiet periods tend to be followed by more quiet periods, and active periods by more activity, but over time volatility also tends to revert toward its longer-run level. A squeeze highlights a period of unusually low volatility. Traders who watch for it expect an eventual expansion, a larger move in one direction or the other.
The difficulty is that a squeeze says nothing about direction, and the first move out of a squeeze is sometimes a fakeout that reverses. Traders typically combine the squeeze with something else to choose a side:
- The direction of the larger trend.
- A close beyond a nearby support or resistance level.
- Volume expanding on the breakout. See volume analysis.
A squeeze can also last much longer than expected, with bands staying narrow for weeks.
Walking the bands
In a strong uptrend, price can close at or above the upper band for many bars in a row, with the middle band acting as an area where pullbacks find buyers. The reverse happens in strong downtrends along the lower band. This is called walking the bands.
Walking the bands is the main reason that selling every touch of the upper band is dangerous. In a trend, a close outside the upper band often reflects strength rather than an imminent reversal. Bollinger himself emphasized that touching a band is not, by itself, a buy or sell signal.
Mean reversion vs breakout use
The same event, price closing outside a band, is read in opposite ways depending on the approach:
| Approach | Reading of a close above the upper band | Works best in | Main risk |
|---|---|---|---|
| Mean reversion | Price is stretched; expect a move back toward the middle band | Ranges, choppy markets | A trend starts and price walks the band |
| Breakout / trend | Volatility and momentum are expanding upward; consider joining | Emerging trends, post-squeeze breakouts | The breakout fails and price reverts inside the bands |
Mean-reversion traders often combine band touches with an oscillator such as RSI and a filter that avoids trading against strong trends. Breakout traders often require a prior squeeze and a close beyond a key level. Neither approach is right in all conditions; the hard part is judging which regime the market is in, and that judgment is often only clear in hindsight.
Mean-reversion strategies tend to have high win rates with occasional large losses; breakout strategies tend to have lower win rates with occasional large wins. Either can lose money after costs, which is why expectancy matters more than win rate.
Bollinger Bands vs Keltner Channels
Keltner Channels look similar but measure volatility differently. The modern version, which is the default on most platforms, uses:
- Middle line: an exponential moving average, often 20 periods.
- Upper and lower lines: the middle line plus and minus a multiple of average true range (ATR), commonly 1.5 or 2.
| Feature | Bollinger Bands | Keltner Channels |
|---|---|---|
| Middle line | 20 SMA | EMA, often 20 |
| Volatility measure | Standard deviation of closes | Average true range, which includes gaps and intrabar range |
| Reaction to a single big bar | Bands widen sharply | Smoother, gradual widening |
| Typical shape | Bulges and pinches | Steadier, more parallel |
Because standard deviation reacts more strongly to large moves, Bollinger Bands expand and contract more dramatically. Some traders define a squeeze as the moment when Bollinger Bands contract inside Keltner Channels.
Example. With the stock above, suppose the 20-period EMA is about $50.00 and ATR is $1.20. Keltner Channels at 2 x ATR sit at 50.00 +/- 2.40, or $47.60 and $52.40, a width of $4.80. During the earlier volatile period, the Bollinger Bands ($47.00 to $53.00, width $6.00) were outside the Keltner Channels. During the squeeze, the Bollinger Bands ($49.00 to $51.00, width $2.00) sit inside them, which those traders would call a squeeze. In practice ATR would also have shrunk somewhat during the quiet period; the comparison works as long as standard deviation falls faster than ATR.
What the evidence says
Bollinger Bands are a way of measuring volatility and the distance of price from its recent average, and those quantities are real and useful for setting stops and sizing positions. Simple rules that buy the lower band and sell the upper band, or trade every breakout, have shown mixed results in published tests, with performance depending heavily on the market, period and costs. Volatility clustering itself is well documented in financial returns, which supports the idea behind the squeeze, but that does not make the direction of the next move predictable.
Common mistakes
- Treating band touches as signals. A touch only shows where price is relative to recent volatility.
- Fading strong trends. Selling the upper band during a band walk is a common way to lose repeatedly.
- Assuming 95 percent containment. Prices are not normally distributed, and closes outside the bands are common.
- Guessing the squeeze direction. The squeeze describes low volatility, not where price will break.
- Over-optimizing the settings. Changing the period and multiplier to fit past data is unlikely to help in future data.
FAQ
What are the best Bollinger Band settings?
The default of a 20-period moving average with 2 standard deviations is by far the most widely used and a sensible starting point. Shorter periods make the bands react faster, and any change should be tested on the market and timeframe you trade.
What does a Bollinger Band squeeze mean?
A squeeze is when the bands narrow to unusually low width, showing a period of low volatility. Such periods have often been followed by larger moves, but the squeeze does not indicate which direction the move will take.
Is price touching the upper Bollinger Band a sell signal?
Not on its own. In ranges, price often reverts from the upper band, but in strong uptrends price can close at or above the upper band for many bars in a row.
What is the difference between Bollinger Bands and Keltner Channels?
Bollinger Bands use standard deviation of closing prices around a simple moving average, while Keltner Channels use average true range around an exponential moving average. Keltner Channels are smoother, and Bollinger Bands expand and contract more sharply.