# 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?

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.

• Thanks for the input. When you "suggest indicators which operate on logarithmic price changes", how do I know which indicators operate on true prices or log prices? Take for example the RSI indicator - can I just convert a time-series of true prices to their equivalent log prices and then calculate the RSI value at each time point?
– KOB
Mar 16, 2018 at 0:46
• You could, but RSI already is already normalized by the range, so additional normalization may not be that helpful. Normalizing for logs does however help with other indicators like MACD which operate on price. In fact, I was disappointed by the performance of MACD in backtests -- taking it as a sign that technical analysis does not work -- until I figured to normalize it. It basically amounts to a mean reversion signal which is slightly more sophisticated than Fama-French's short-term reversal factor. If you think it would help, I could probably elaborate on my answer. Mar 16, 2018 at 1:05
• No need to elaborate I don't think. I'm very familiar with everything stats and data related, but not so much with the financial side of things yet. So with regards to the most well known indicators (MACD, Stochastic Oscillator, CCI, ADX, Parabolic SAR, Aroon Oscillator, etc.), it would be safe enough for me to just convert my prices to their stationary or log equivalent (if the indicator doesn't output a normalized value), and then use them in the indicator's calculation?
– KOB
Mar 16, 2018 at 1:09
• Without knowing the specifics, what you propose sounds reasonable to me. Mar 16, 2018 at 1:16
• And finally, this may be more off topic than my original question, but as you recommended using logarithmic prices, can I still simply use the percentage change of the price between each time point, or definitely the log price?
– KOB
Mar 16, 2018 at 1:20

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.

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.