# BandWidth

A Volatility concept (Band & channel systems) in the LuxAlgo Library, with 1 indicator implementation.

## What is BandWidth?

BandWidth is John Bollinger's normalized measure of how wide [Bollinger Bands](https://www.luxalgo.com/library/concept/bollinger-bands/) are: upper band minus lower band, divided by the middle band. With default parameters (a 20-period [SMA](https://www.luxalgo.com/library/concept/sma/) basis and bands two standard deviations away), the numerator spans four standard deviations of price, so BandWidth is relative volatility expressed as a fraction of the average. Dividing by the middle band is what makes readings comparable across instruments and price levels; a raw band span in points is not.

Bollinger defined it to formalize two of his observations. The Squeeze: when BandWidth falls to its lowest level in around six months of daily data (roughly 125 sessions), volatility is unusually compressed, a condition that often precedes the birth of a directional move. The Bulge: extreme high readings mark volatility that is unlikely to be sustained, frequently appearing near trend endings. Both are conditions rather than signals. The Squeeze in particular says nothing about direction, and Bollinger himself documented the head fake, an initial break opposite the eventual move.

The measure earns its keep because volatility is cyclical: quiet periods breed expansion and expansion exhausts itself back into quiet, so a normalized width oscillates in slow waves that raw price never shows directly. That is also the honest caveat about the Squeeze: compression can persist, a dead market printing new width lows for weeks, so the condition builds a watchlist rather than a countdown. Bollinger's own presentation, laid out in his Bollinger on Bollinger Bands book, treats width analysis as preparation, with direction always delegated to price action and confirming tools.

The construction generalizes beyond price. Bands can wrap any series, and LazyBear's RSI Bands study carries the full kit onto the oscillator, RSI bands, an RSI %B, and an RSI BandWidth whose compressions flag momentum coiling the same way price BandWidth flags price coiling. On price itself, the width read sits alongside relatives: [realized volatility](https://www.luxalgo.com/library/concept/realized-volatility/) measures what movement actually occurred while BandWidth tracks the bands' statistical casing, and [ATR](https://www.luxalgo.com/library/concept/atr/)-based widths incorporate gaps that close-based standard deviation never sees. Ranking any of them against their own history is what turns a raw number into a regime read.

## How to identify BandWidth readings

The number only means something against its own history, so identification is normalization plus ranking.

1. Compute the bands: a 20-period basis with bands two standard deviations away is the convention the definitions assume.
2. Take the width: upper minus lower, divided by the middle band, optionally times 100 for readability.
3. Rank it against the instrument's own history: percentile position or distance from the long-lookback extremes.
4. Flag the conditions: a low around the 125-session minimum is Squeeze territory, an extreme high after a long advance is Bulge territory.
5. Delegate direction: width says the market is coiled or overstretched, and price action, structure, or volume must say which way that resolves.

## How it's calculated

The width of the Bollinger Bands expressed as a fraction of the middle band, making volatility comparable across time and instruments.

```
Middle_t = SMA_n(C)
sigma_t = sqrt( ( Σ_(i=0..n-1) (C_(t-i) - Middle_t)^2 ) / n )
Upper_t = Middle_t + k × sigma_t
Lower_t = Middle_t - k × sigma_t
BandWidth_t = (Upper_t - Lower_t) / Middle_t
Equivalently: BandWidth_t = 2 × k × sigma_t / Middle_t

  C: close price series; C_(t-i) is the close i bars back
  t: current bar index
  i: bar offset
  n: band length (default 20)
  k: standard deviation multiplier (default 2)
  SMA_n: simple moving average over the last n bars
  Middle_t: middle band
  sigma_t: population standard deviation of the last n closes
  Upper_t: upper band
  Lower_t: lower band
  BandWidth_t: normalized band width
```

Bollinger specifies the population standard deviation (divide by n, not n - 1).

Many platforms multiply by 100 and quote BandWidth in percent.

Bollinger defines a squeeze as BandWidth at its lowest level in roughly 125 bars; %b is the companion measure of where price sits inside the bands.

## How traders use it

- Squeeze scanning: screeners flag instruments whose BandWidth just printed a long-lookback low, building a watchlist of compressed charts before the [Bollinger Squeeze](https://www.luxalgo.com/library/concept/bollinger-squeeze/) resolves.
- Breakout confirmation: after a squeeze, expanding BandWidth alongside a range break supports the move being genuine, while a break on flat width is more suspect; the head-fake risk of a [false breakout](https://www.luxalgo.com/library/concept/false-breakout/) argues for confirmation over anticipation.
- Trend maturity: width stretched far above its own norm after a sustained advance warns the move is mature; Bollinger tied trend endings to the Bulge, extreme width that tends not to be sustained.
- Normalized comparison: because it is a ratio, BandWidth can be ranked against its own history as a [volatility percentile](https://www.luxalgo.com/library/concept/volatility-percentile-rank/) or compared across a watchlist to surface the quietest and loudest charts.
- On other series: bands drawn around an oscillator give that oscillator its own BandWidth, so momentum compression can be tracked with the same squeeze-and-release grammar used on price.

## BandWidth vs. related measures

- **%B** (https://www.luxalgo.com/library/concept/percent-b/): Bollinger's other derivative answers a different question: %B locates price within the bands, BandWidth measures how far apart the bands are. One is position, the other is width; squeeze work uses BandWidth, overbought/oversold work uses %B.
- **TTM Squeeze** (https://www.luxalgo.com/library/concept/ttm-squeeze/): The TTM version defines compression externally: Bollinger Bands trading inside Keltner Channels. BandWidth defines it internally, as a low reading relative to the band's own history, and the two definitions can disagree at the margin.
- **Donchian Width** (https://www.luxalgo.com/library/concept/donchian-width/): Donchian Width measures the high-to-low span of a lookback window, an extremes-based range measure. BandWidth is standard-deviation based, so a single spike bar moves the two very differently.

## FAQ

### What counts as a low BandWidth reading?

Low is relative, not absolute. Bollinger's Squeeze definition looks for the lowest BandWidth in roughly 125 trading days on daily charts, about six months, and percentile rankings against the instrument's own history generalize the idea to any timeframe. Fixed numeric thresholds fail across instruments because normal width differs by market.

### Is BandWidth the same as the Bollinger Squeeze?

BandWidth is the measurement; the Squeeze is a condition defined on it. The indicator continuously tracks relative band width, and the Squeeze fires when that value reaches a long-lookback minimum. BandWidth serves other purposes too, such as spotting overstretched width late in an extended trend or comparing volatility across a watchlist.

### What is the head fake after a squeeze?

Bollinger's term for the trap where price breaks one way out of a squeeze, draws traders in, then reverses and makes the real move in the opposite direction. He considered it common enough to plan for, which is why many squeeze methods wait for confirmation or prepare entries on both sides of the range.

### Why divide by the middle band?

To remove price level from the reading. A ten-point band span is enormous on a fifty-dollar stock and invisible on an index; dividing by the basis converts the span into a fraction of the average price, which survives stock splits, compares across symbols, and can be ranked against years of the instrument's own history. Without the normalization, width charts would mostly redraw the price level.

### How does BandWidth differ from ATR?

Different volatility anatomy. BandWidth is built from the standard deviation of closes, so it measures dispersion around the average and never sees gaps or intrabar extremes. ATR averages true ranges, which capture gaps and wicks but not closing dispersion. A market gapping overnight but closing tightly reads volatile to ATR and quiet to BandWidth; both are right about what they measure.

### Can BandWidth be applied to indicators instead of price?

Yes. Bands wrap any reasonably scaled series, and the width of those bands is that series' BandWidth. The established example puts the whole toolkit on RSI, where an RSI BandWidth squeeze marks momentum coiling inside a quiet oscillator, often while price still looks unremarkable. The grammar transfers intact: lows build watchlists, expansion confirms the release, and direction still comes from elsewhere.

## Implementations in the Library

- BandWidth (LuxAlgo): https://www.luxalgo.com/library/indicator/bandwidth/

## Related concepts

- Donchian Channels: https://www.luxalgo.com/library/concept/donchian-channels/
- Envelope: https://www.luxalgo.com/library/concept/envelope/
- Bollinger Bands: https://www.luxalgo.com/library/concept/bollinger-bands/
- %B: https://www.luxalgo.com/library/concept/percent-b/
- Bollinger Squeeze: https://www.luxalgo.com/library/concept/bollinger-squeeze/
- Band Walk: https://www.luxalgo.com/library/concept/band-walk/
- Bollinger Band Tag Reversion: https://www.luxalgo.com/library/concept/bollinger-band-tag-reversion/
- Double Bollinger Zones: https://www.luxalgo.com/library/concept/double-bollinger-zones/
- Fibonacci Bollinger Bands: https://www.luxalgo.com/library/concept/fibonacci-bollinger-bands/
- Keltner Channels: https://www.luxalgo.com/library/concept/keltner-channels/

---

Source: https://www.luxalgo.com/library/concept/bandwidth/ (LuxAlgo Library, the encyclopedia of trading & technical analysis). Free to use with attribution: https://www.luxalgo.com/library/license/