1996issue C031-3
Constructing Bollinger bands, percent-b, and stochastics
A 20-day simple moving average of closes centers a two-standard-deviation band pair that can be rescaled into percent-b. A separate 14-period high-low ratio becomes percent-k and can be smoothed into percent-d. The note keeps each window, spread, and extra average explicit.
- A Bollinger band pair is a 20-day simple moving average of closes plus and minus twice the 20-day standard deviation of those closes, with the same window used for the average and the spread.
- Percent-b places the close on a 0-to-100 scale between the lower and upper bands, using a four-standard-deviation width, and can be withheld when twice the scaled standard deviation is zero.
- A 14-period stochastic scales the close between the window low and high by 100; percent-k is that ratio, and percent-d is a smoothed percent-k, often a three-day simple moving average.
- Editorial: keep the window, deviation multiple, price field, and extra averaging explicit so the band pair, percent-b, and stochastic are assembled, not treated as a black box.
A shared moving-average kit
Editorial reading: a lookback average can center a two-standard-deviation close envelope, that envelope can be rescaled into a 0-to-100 band oscillator, and a high-low range ratio can be smoothed into a stochastic. This editorial lesson is to keep the window, the deviation multiple, the price field, and any extra averaging explicit so each plotted object is assembled, not treated as a black box.
A lookback average of closes is used as the band centerline and as a smoother on a stochastic ratio. The archive workflow below states those averages and spreads in turn.
The 20-day band pair
A Bollinger band pair is drawn two standard deviations above and below a 20-day simple moving average, and the same 20-day window is used for the standard deviation. The channel lines are placed a stated number of standard deviations above and below a simple moving average of closes.
The standard deviation uses each day's close versus the 20-day average: square those differences, sum them, divide by 20, then take the square root. That lookback spread of closes around the average is formed by squaring deviations, averaging them, and taking the square root.
The upper band equals a 20-period simple moving average of closes plus twice the 20-period standard deviation of closes. The lower band equals a 20-period simple moving average of closes minus twice the 20-period standard deviation of closes.
Percent-b on a 0-to-100 scale
Percent-b maps the close onto a 0-to-100 scale on which 100 is the upper band and 0 is the lower band, with a four-standard-deviation width in the denominator. The close is rescaled so the upper band sits at 100 and the lower band sits at 0.
A percent-b ratio can be guarded so it is not formed when twice the scaled standard deviation is zero.
The stochastic ratio and percent-d
A 14-period stochastic locates the close between the lowest low and the highest high in that window and scales the ratio by 100. The oscillator is that ratio: it places the close between the highest high and lowest low over a lookback window.
Percent-k is the lookback-period ratio, the unsmoothed stochastic lookback ratio, and is often slowed by averaging highs and lows. Percent-d is a smoothed percent-k, commonly a three-day simple moving average. Percent-d can also be defined as a moving average of the percent-k series over a separate smoothing length.
All readings on this track · 45 readings
- 1992Constructing volatility-scaled bands with relative strength index confirmation
- 1994Implied volatility as a band-defined regime filter for index options
- 1995Constructing projection bands from least-squares slopes
- 1995Constructing regression projection bands and range oscillators
- 1996Constructing Bollinger bands, percent-b, and stochastics
- 1996Constructing mechanical rules from Bollinger Bands and stochastics
- 1996Constructing a standard-error envelope around a linear regression
- 1996Dual-horizon ratio envelopes and regression error channels
- 1997Rational group structure with a trend screen, RSI, and bands
- 1997Asymmetric volatility band construction
- 1998Constructing three-state filters from Bollinger band envelopes
- 1999Combination filters with Bollinger Bands and the relative strength index
- 1999Constructing stochastic timed exits and band-RSI reversals
- 1999Evaluating Bollinger Bands against fixed-width and range-based envelopes
- 2000Constructing a Bollinger Band target as a forward price
- 2001Numeric candlestick encoding with local size bands
- 2001Ranked candlestick sentiment to band-cross entries
- 2002Combining Bollinger Bands, RSI, and a stop-loss
- 2002Bollinger Bands remain filters, not forecasts
- 2002Constructing a stochastic RSI with Bollinger bands
- 2002Constructing a StochRSI and Bollinger mechanical system
- 2003Constructing volatility-scaled Bollinger envelopes
- 2003Why tick breadth fails as a market personality
- 2005Constructing Bollinger bands versus fixed trading bands
- 2006Squared versus absolute deviation in envelope construction
- 2006Confirming yen crossovers with implied volatility and bands
- 2006A daily candle reversal is a hypothesis until shorter sessions fail at the same zone
- 2008Rebuild the Relative Strength Index as price-scale bands
- 2008Reading Relative Strength Index extremes on one price axis with Bollinger Bands and moving averages
- 2011Three-filter confirmation for short-swing futures
- 2011Constructing an inverse Fisher stochastic with bands and averages
- 2012Constructing a Bollinger Band indicator suite
- 2012Stacking price extremes, crossovers, bands, and MACD
- 2012Adaptive Bollinger band impulse, trend, and momentum filters
- 2013Rescaling stochastic, percent-B, and wave-count parameters
- 2014Industry-group quartile pivots as a Bollinger Bands case study
- 2014Bollinger Bands as adaptive price envelopes: a 2014 classroom case
- 2016Trend-channel entry rules from stacked moving averages
- 2016A permission stack for Bollinger, RSI, and the 50-period average
- 2017Constructing weighted Bollinger bands and volume averages
- 2017Four swing-entry rules that share a timed exit
- 2017Two-wave monthly cycles as a regime filter
- 2019Constructing exponential-deviation-bands from a midline-average
- 2020Critiquing exponential variants of Bollinger Bands
- 2020Constructing selectable volatility and moving-average bands