Bollinger Bands
Dynamic bands placed above and below a moving average at a set number of standard deviations, adapting to market volatility.
Overview
Bollinger Bands were developed by John Bollinger in the early 1980s and trademarked in 2011. They consist of a middle band (a 20-period SMA), an upper band (SMA + 2 standard deviations), and a lower band (SMA − 2 standard deviations). The bands automatically widen during volatile markets and narrow during quiet periods, providing a relative definition of high and low price based on recent volatility.
How it looks on a chart
Illustration only — synthetic data generated for visual reference.
Bollinger Bands put a "volatility envelope" around price. When markets are calm and prices are moving sideways, the bands squeeze together. When markets become volatile, the bands expand. This means the bands adapt to the current environment, making them more useful than fixed-percentage envelopes. The most popular use is the "mean reversion" approach: when price touches the upper band, it may be relatively overextended and due for a pullback. When it touches the lower band, it may be relatively cheap and due for a bounce. But touching a band alone is not a signal — price can "walk" the bands during strong trends. The Bollinger Squeeze is another key concept: when the bands narrow to a very tight range, it signals a period of low volatility that often precedes a significant move. Traders watch for a breakout from a squeeze to enter the direction of the new trend. The squeeze itself doesn't tell you which way — additional signals are needed for direction.
Middle Band = SMA(20). Upper Band = SMA(20) + 2σ. Lower Band = SMA(20) − 2σ, where σ is the standard deviation of closing prices over the last 20 periods. The %B indicator measures where price is relative to the bands: %B = (Close − Lower Band) / (Upper Band − Lower Band). A %B above 1 means price is above the upper band; below 0 means below the lower band. Bandwidth = (Upper − Lower) / Middle, normalized volatility. Extreme low bandwidth (Squeeze) followed by a bandwidth expansion often marks the start of a new directional move. Bollinger recommends using the Squeeze on monthly charts for major market analysis and daily for swing trading. For systematic strategies, the mean-reversion signal is best applied when price closes outside the bands (not just touches) and immediately reverts inside on the next bar. This pattern — a "band pierce and close back inside" — has been shown to have positive expectancy on mean-reverting assets like large-cap stocks in calm markets.
The statistical interpretation of Bollinger Bands rests on the assumption that prices follow a normal distribution, with 95% of values within ±2σ. Financial returns are fat-tailed — kurtosis > 3 in nearly all asset classes — meaning price spends more time at extreme band levels than a Gaussian model would predict. This is why Band "walks" during trends are common. Quantitative researchers extend Bollinger Bands in several ways: using an EMA instead of SMA for the middle band (reduces lag), using 1.5σ bands for higher signal frequency, or using 3σ bands for only the highest-conviction extreme readings. Keltner Channels — which use ATR-based rather than σ-based bands — are a volatility-normalized alternative that some practitioners find more robust. The Squeeze can be systematized using the Bollinger Band Width Percentile (BBW%): bandwidth divided by its 125-period rolling percentile. A BBW% below 5 (in the lowest 5% of historical bandwidth readings) defines a squeeze. Combining a squeeze with a MACD histogram color change (positive turning negative or vice versa) to determine direction is a well-known systematic implementation.
Formula
Middle = SMA(Close, 20) Upper = Middle + (2 × σ₂₀) Lower = Middle − (2 × σ₂₀) %B = (Close − Lower) / (Upper − Lower)
- 1.Calculate the 20-period Simple Moving Average of closing prices (Middle Band).
- 2.Calculate the standard deviation of closing prices over the same 20 periods.
- 3.Upper Band = Middle + (multiplier × standard deviation).
- 4.Lower Band = Middle − (multiplier × standard deviation).
- 5.Compute %B and Bandwidth for additional context on price position and volatility regime.
Parameters
| Parameter | Default | Range | Description |
|---|---|---|---|
| Period | 20 | 5–50 | Moving average period for the middle band. |
| Standard Deviations | 2 | 1–4 | Number of standard deviations for band placement. |
Trading signals
bullish: Price touches lower band with bullish reversal candle
Mean reversion setup — price at statistical extreme below average.
bearish: Price touches upper band with bearish reversal candle
Mean reversion setup — price at statistical extreme above average.
bullish: Bollinger Squeeze breaks out to the upside
Volatility expansion after compression — potential start of new uptrend.
bearish: Bollinger Squeeze breaks out to the downside
Volatility expansion after compression — potential start of new downtrend.
Limitations
- •Band touch is not a signal in itself — price can walk the bands for extended periods in trends.
- •Standard deviation is sensitive to outliers and can expand dramatically on single news-driven spikes.
- •Does not indicate direction of a squeeze breakout — additional directional signal required.
- •Based on normal distribution assumption that does not hold for financial returns (fat tails).
Gilito tests Bollinger Band strategies across period (10–50) and standard deviation (1.5–3.0) parameter spaces, evaluating mean-reversion and breakout variants separately. The Bollinger Squeeze is used as a conditional signal — strategies are backtested on how they perform specifically in the 5 bars following a squeeze event versus normal market conditions.