Skip to content
All library documents

Normalizing Bollinger Band Features for Market Prediction

Article Quant Q&A · Author: KOB

Summary

The document considers how to represent Bollinger Bands as inputs to a neural network that predicts market direction across multiple stocks. The replies explain that the bands combine a moving average with a volatility-based width, so raw price levels are not directly comparable across securities. Suggested approaches include expressing the price’s location within the bands as %B, which maps it to a bounded scale, and using logarithmic price changes or percentage changes to represent movement in a more comparable way.

The answers also caution that Bollinger Bands may mostly repackage information already present in volatility and normalized returns. Their usefulness as predictive features is not demonstrated: the discussion offers suggestions, but no model comparison, backtest, or evidence that any representation improves forecasts. Feature scaling choices should therefore be evaluated on the intended dataset and prediction task.

Key ideas

  • Bollinger Bands combine a moving average with a width based on price variability.
  • The %B indicator expresses price location relative to the bands on a bounded scale.
  • Logarithmic or percentage price changes can make features more comparable across securities.
  • Band width may largely reflect volatility, so its predictive contribution should be assessed empirically.

Tags

Full text
# Appropriate way to normalize Bollinger Bands?


# Appropriate way to normalize Bollinger Bands?












I am playing around with using neural nets to make predictions on market trends. I am currently feeding in a portfolio of historical data of many stocks, and am now implementing several technical indicators into my data set.

As of now, I am just attempting to predict up or down trends, and so I have made all of my data stationary - for example rather than feeding in raw sequences of closing prices, I instead feed in the normalized percentage change of the closing price from one time point to the next.

I am looking to incorporate Bollinger Bands into my data to see if they have any impact, but I am struggling to figure out how to apply a similar detrending technique. One method I have thought of is to calculate the difference between the upper and middle band, and between the middle and lower band at each time point, and then normalise both of these values.

Any thoughts on this? Any other recommendations?

## Answer by David Addison (score 3, accepted)

https://quant.stackexchange.com/a/38812

You may notice that the difference between the middle bands and upper and lower bands is simply a constant of realized standard deviation of price. If you want to feed a prediction algorithm some standardized data which is comparable for all securities, I would suggest indicators which operate on logarithmic price changes.

## Answer by babelproofreader (score 3)

https://quant.stackexchange.com/a/38822

Specifically for using Bollinger bands, you could use the %B indicator. This will scale your price data to the 0 to 1 range ( easily adjusted to -1 to +1 range ) which is convenient for the Sigmoid or Tanh activation functions of a neural net.

## Answer by He Shiming (score 0)

https://quant.stackexchange.com/a/38840

Most technical indicators are designed to visualize numbers, so that they can be easily understood by a human. In the case of Bollinger Bands, it's merely a graph of 20-day moving average accompanied by standard deviation of prices.

When it comes to understanding by computers, I would say Bollinger Bands contains no more significant information than volatility, which is already normalized. The 20-day MA of course, can be normalized by calculating day-to-day change percentages.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.