Skip to main content
All posts

What is Bollinger Bands? Definition, Formula, and Example

Bollinger Bands are a volatility indicator consisting of a 20-period simple moving average flanked by upper and lower bands set two standard deviations above and below it, widening during high-volatility periods and contracting during low-volatility ones.

What Are Bollinger Bands?

Bollinger Bands are a volatility indicator consisting of three lines plotted around a price series: a middle band (a simple moving average), an upper band set two standard deviations above the middle, and a lower band set two standard deviations below. Developed by John Bollinger in the 1980s, the bands dynamically expand and contract as market volatility rises and falls, giving traders a statistically grounded envelope for assessing whether price is extended relative to its recent history.

Bollinger Bands Formula

Standard parameters are a 20-period lookback and ±2 standard deviations. The three lines:

Middle Band = 20-period SMA of closing prices

Upper Band = 20-period SMA + (2 × 20-period standard deviation of closing prices)

Lower Band = 20-period SMA − (2 × 20-period standard deviation of closing prices)

A derived metric, %B, normalizes price position within the bands:

%B = (Price − Lower Band) / (Upper Band − Lower Band)

%B above 1.0 means price is above the upper band; %B below 0 means price is below the lower band; 0.5 is the midpoint.

Bandwidth measures band width relative to the middle band: (Upper Band − Lower Band) / Middle Band. Extremely low bandwidth readings signal volatility compression, historically a precursor to directional expansion.

Worked Example

SPY closes at $521.40. The 20-session average close is $518.00 and the 20-session standard deviation of closes is $6.80.

  • Upper Band = $518.00 + (2 × $6.80) = $531.60
  • Lower Band = $518.00 − (2 × $6.80) = $504.40
  • %B = ($521.40 − $504.40) / ($531.60 − $504.40) = $17.00 / $27.20 = 0.625

SPY sits 62.5% of the way up the band range — above the midpoint but not near the upper band. A close above $531.60 would represent a statistically unusual upward extension (price exceeding two standard deviations above the 20-day mean).

When Traders Use Bollinger Bands

Squeeze breakout traders watch for bandwidth to compress to multi-month lows — a Bollinger Band squeeze — then enter in the direction of the first decisive break beyond either band on rising volume. Historically, the tighter the squeeze, the larger the subsequent expansion.

Mean-reversion traders fade price when it touches or breaches the outer bands, targeting a return to the middle band (20-day SMA). This approach performs best in range-bound, low-trend environments.

Swing traders use %B alongside momentum oscillators to filter entries: a %B below 0.20 combined with a rising RSI suggests an oversold setup with momentum beginning to turn.

Limitations and Common Misconceptions

Bollinger Bands do not signal direction. A close above the upper band is not bearish — in strong uptrends, price "walks the upper band" for weeks, with each bar printing above +2 standard deviations. The bands are entirely backward-looking and offer no predictive edge alone; they quantify where price has been, not where it is going. Changing the standard deviation multiplier from 2 to 1.5 dramatically increases the frequency of band touches, so parameter choice materially affects any trading rule built around the indicator.

Institutional-grade tools, browser-based.

Get every ticker in this post on a real terminal, scanner, charts, filings, insider trades, and 800K+ economic series in one tab. Free tier, no credit card.

Try Tapeboard free → 14-day Pro trial · no card