Bollinger Bands and the squeeze

Bollinger Bands are two lines drawn above and below a moving average, set a fixed number of standard deviations away. Because the distance depends on recent price variability, the bands widen when a stock gets more volatile and narrow when it quiets down. They were created by John Bollinger and are mainly used to gauge volatility and to put the latest price in context.
The formula
Middle band = 20-period simple moving average of closing price
Upper band = Middle band + 2 x standard deviation of the last 20 closes
Lower band = Middle band - 2 x standard deviation of the last 20 closes
%B = (Close - Lower band) / (Upper band - Lower band)
Bandwidth = (Upper band - Lower band) / Middle band
The settings of 20 periods and 2 standard deviations are the defaults on a daily chart. Standard deviation measures how far closes typically sit from their average, so a more volatile stretch produces a larger value and wider bands.
The two derived measures are helpful:
- %B shows where the latest close sits within the bands. A reading of 1.0 means the close is at the upper band, 0 means it is at the lower band, 0.5 is the middle, and values above 1 or below 0 mean price is outside the bands.
- Bandwidth expresses the width of the bands as a share of the middle band, which makes it comparable across time and across stocks.
Example (illustrative numbers)
A stock has a 20-day average of $50, and the standard deviation of its last 20 closes is $2.
Upper band = 50 + 2 x 2 = $54
Lower band = 50 - 2 x 2 = $46
If the stock closes at $53:
%B = (53 - 46) / (54 - 46) = 7 / 8 = 0.875
Bandwidth = (54 - 46) / 50 = 0.16, or 16%
A few weeks later, volatility drops and the standard deviation falls to $1, with the average still at $50. The bands are now $52 and $48, and bandwidth is 4 / 50 = 8%. The bands have narrowed to half their earlier width, even though the average has not moved.
How to read the bands
- Width shows volatility. Wide bands mean large recent swings; narrow bands mean small ones. Volatility is not a direction, so the width says nothing about whether price will rise or fall.
- Touching a band is not a signal by itself. In a strong uptrend, price can ride along the upper band for many days; this is often called "walking the band". In a strong downtrend, the same happens at the lower band. Treat a close outside the band as a sign of strong movement, not a call to bet against it.
- Range-bound markets. When a stock moves sideways, price often swings between the bands and returns toward the middle line. Reversion toward the average is a tendency in these conditions, but it fails when a new trend begins.
- The middle band as trend gauge. Price holding above a rising middle band is consistent with an uptrend, using the same logic as any moving average.
- No fixed percentage. The bands are not a probability statement. Prices are not normally distributed, so you cannot assume that a certain share of closes will stay inside them.
The squeeze
A squeeze is a period when bandwidth falls to a low level compared with its own recent history, often judged against the past six months or so. It shows that volatility has been unusually quiet.
The idea behind watching it is that volatility tends to move in cycles: quiet periods are often followed by more active ones, and the reverse. So a squeeze can be followed by a larger move. What a squeeze cannot tell you is the direction, or whether a move will come soon. Some squeezes resolve upward, some downward, and some just fade into a longer quiet period.
Practitioners usually wait for price to close decisively outside the bands, ideally with rising volume, before treating the squeeze as resolved. Even then, the first move can reverse. This is the same challenge covered in breakouts and false breakouts.
Common mistakes and limits
- Selling at the upper band, buying at the lower. This works in ranges and fails in trends, and you often cannot tell which you are in until later.
- Using the squeeze to predict direction. It measures a drop in volatility and nothing else.
- Ignoring other volatility measures. Bollinger Bands are based on closing prices. ATR includes intraday ranges and gaps, so the two can give different pictures.
- Changing the settings to fit. Altering the period or multiplier until past signals look good is over-fitting.
- Treating it as a complete system. Bands describe price in relation to its recent past, with no information about the company itself. The wider context is in technical analysis basics.
Where to see it on StocksXray
The scanner includes a Bollinger squeeze preset for stocks whose bands have narrowed. Use it as a way to find charts worth a closer look, and then check the direction of the larger trend and recent volume before drawing conclusions.
Key takeaways
- Bollinger Bands are a 20-period average plus and minus 2 standard deviations; they widen and narrow with volatility.
- %B shows where price sits in the bands, and bandwidth shows how wide the bands are.
- A touch of the upper or lower band is not a signal on its own, because strong trends can keep price pinned near a band.
- A squeeze points to low volatility and a possible increase, but gives no direction.
- Confirm squeeze breakouts with price and volume rather than assuming the first move will hold.
Related reading
Educational only, not financial advice. Examples use illustrative numbers.