The Bollinger Bands calculation is a well known and often used method to identify overbought and oversold market conditions. This is done by adding a simple moving average (SMA), and standard deviations bands to a chart. The idea is that about 95% of the trading volume should be within the standard deviations if prices are normally distributed. But prices are not normally distributed. Markets are non-random and herd behavior leads to positive feedback loops, sometimes collectively referred to as irrational exuberance. Still, many traders rely on normal distributions models as they are convenient and “work most of the time”.

Before we had powerful computers, indicators were designed in ways that made them easy to calculate. At the time, volume data was unavailable in real-time and accordingly, most indicators were based on price data only. This led to oversimplifications and the Bollinger Bands indicator is an example of this. It uses the *bar close* although more information is available to us, i.e. the open, high, low and volume. With today’s computer power we can use this information to calculate standard deviation bands with a much higher accuracy.

**Building a better model**

(1) The Bollinger Bands calculation treat all bars as equals. But all bars are not created equal… High volume bars should receive more weight than low volume bars, when calculating both the mean and the standard deviations.

(2) The volume contained within a price bar is distributed between the high and low points. We don’t know the exact price volume distribution, but it’s certainly possible to use a better estimate than just the bar close. A simple model would be to use the open, high, low, close, the bar center (high + low)/2 and the center of the candle body (open + close)/2. The bar volume is then split between 6 price levels. More weight is allocated to the bar center and the candle body than to the open, high, low and close.

(3) Furthermore, we can replace the SMA with a volume-weighted moving average. The input series is then calculated from all data points i.e. (open + high + low + close)/4. The model is compatible with a faster recursive formula for calculating the variance and standard deviations and can be used without increasing CPU load.

**Volume-weighted standard deviation bands vs. Bollinger Bands**

Daily chart: The upper chart shows the volume-weighted standard deviation bands. As mentioned, statistically, about 95% of all price points should lie within the bands. The bands should therefore act as support and resistance. Looking at the original Bollinger Bands, we notice that they do not respond quick enough during strong trends. They also overreact on the side which is opposite to the trend. Support and resistance do not match, and there are clearly more than 5% of all prices data points outside the bands.

Intraday chart: Variations in volume is much higher for intraday bars compared to daily charts (this is due to the difference in volume between the regular session vs. pre-session). Therefore, the accuracy of the Bollinger Bands calculation is considerably affected, when applied to intraday charts. The chart below outlines areas where the price moves outside the Bollinger Bands. This is not due to extreme price movements, the Bollinger Bands calculation simply do not plot the real statistical mean and standard deviation of the underlying trades. The LizardTrader volume-weighted standard deviation bands are more accurate, as they take the trade volume, and the entire span of the price bars, into account.

**Further improvements**

Although our volume-weighted standard deviation bands are a significant improvement compared to the standard Bollinger Bands calculation, there is certainly room for improvement. For example, the heuristic 6 point model could be replaced with a better model for the intra-bar distribution of volume for different types of candles. Such a model would need testing on single tick data and may be included in a future project.

Also, the SMA and volume-weighted moving average behave like dogs that bark with both their heads and their tails. Not only do they greet new high volume bars with a significant change, they also dispatch of old bars that drop out on the other end of the lookback period. This effect could be mitigated by smoothing the dropouts bars over a period using a triangular moving average.

You may download the Volume-Weighted Standard Deviation indicator from our NT8 Indicator Library. You may furthermore access additional tools from the Indicator Library Statistical Analysis category.