# Bollinger Bands Trading Strategies | Are The %B Systems Profitable? (Including Backtest And Performance)

Last Updated on October 22, 2022

Can we make a profitable **Bollinger Bands trading strategy?** The Bollinger Bands are renamed after its inventor, John Bollinger. The indicator was invented in 1980 and made John Bollinger a pretty famous trader. The bands are included in all software platforms and frequently mentioned in the financial media. What is all the fuzz about? Are Bollinger Bands profitable?

**We conclude the Bollinger Bands are somewhat profitable in the stock market, which is a market that is very mean-revertive. We tested some ideas for Bollinger Band trading strategies, and it seems to work as a breakout indicator in gold. However, we didn’t manage to find any useful Bollinger Bands strategies for stock indices.**

If you find this article useful, you might want to have a look at our landing pages for a lot of other trading strategies and edges:

Table of contents:

## What are the Bollinger Bands?

Bollinger Bands consist of three indicators:

- In the middle, there is a moving average based on x days (usually an exponential or simple moving average).
- Above the moving average, there is a band called the Upper Bollinger Band. It’s a band that measures x number of standard deviations added to the moving average.
- The band below the moving average, named the Lower Bollinger Band, is x standard deviations subtracted from the moving average.

Thus, you have three bands:

The above chart shows the 20-day simple moving average (the blue line), and the red lines above and below are added and subtracted 2 standard deviations from the moving average.

In times of high volatility, the bands expand. In times of low volatility, the bands contract. Why do they expand and contract? This is because the bands react to the volatility of the share price – the standard deviation:

## What is the standard deviation? How do we calculate the Bollinger Bands?

The standard deviation is a statistical term used to measure the volatility in a sequence of numbers. For stocks, the sequence of numbers is, of course, the stock price.

A coin flip better explains how the standard deviation works:

If you flip a coin, the random nature means a 50% chance of either heads or tails. However, over many flips, it might not be 50% each. If you toss the coin 100 times, it’s actually more likely it will not be 50% evenly distributed.

If we use the computer to generate 1 000 sets of 100 flips each, the result would resemble the famous bell curve. The majority of the flips are around 50:50 and less as we go toward 51:49, 52:48, 53:47, etc.

A standard deviation is a way of quantifying the likelihood of “extreme” events away from the mean, which in this case is 50:50. One standard deviation is the square root of the variance.

The more standard deviations we use, the more the upper and lower bands deviate from the mean. One standard deviation is expected to contain 67% of the observations, while two standard deviations contain 95% of the observations. Three standard deviations contain 99% of the observations.

In the example above with the coin flips, one standard deviation is the square root of the sample size (100) divided by two. This equals 5. Hence, 67% of the time we can expect the coin flips to be within 55:45 and 95% of the time within 60:40. There is only a one percent chance of getting 65:35 or more.

## How do Bollinger Bands work?

As mentioned above, the middle line, the moving average, forms the basis of the indicator. As the price moves along, the upper and lower bands are adjusted to reflect the price’s past variations. This, of course, means that the indicator only looks back and basically reacts to the past x days’ volatility.

Nassim Nicholas Taleb has been a strong advocate of the randomness of the markets. The fact is that the variability of the markets is not like the bell curve. Anyone who has traded should be familiar with expressions like “fat-tails” and “tail risk“.

Fat tails reflect that big moves happen more often than the statistics suggest. As an example, look at what happened to the Swiss Franc in January 2015. The Swiss National Bank removed the cap on the CHF resulting in a gigantic appreciation of the currency. This, of course, resulted in huge losses (and gains for others). The point is, no model can ever predict such moves, and certainly not Bollinger Bands.

## Do Bollinger Bands work?

It’s impossible to have a definite answer because you can use the bands in a wide range of possibilities. Moreover, some asset classes show different patterns and characteristics than others, and thus one way of using the Bollinger Bands doesn’t fit all markets.

Below we will test some different variations of the Bollinger Bands. All in all, we test three different Bollinger Band strategies:

## Bollinger Bands as overbought and oversold strategy/indicator:

The most used method is probably to use the bands as overbought or oversold indications:

When the price closes outside the lower band, it indicates an oversold condition and vice versa.

Let’s test a simple strategy: When the share price closes two standard deviations below the 10-day average, go long. Exit when it crosses above the 10-day average.

On the S&P 500 we get this equity curve:

As we can see, the performance has been reasonably well, but it failed to beat the “buy and hold” since 1993 by a wide margin. Since 2018 it has been a losing strategy.

## Bollinger Bands strategy as trend filter:

Some traders use the Bollinger Bands as trend filters: when the price closes above the upper band, they go long. This doesn’t work on stocks, which is very mean-revertive, but it shows some promise on some commodities.

Let’s test to go long the gold price (GLD) if the close is above one standard deviation from the 10-day moving average.

You can also code the strategy to only go long after periods with very low volatility, ie. when the bands typically narrow.

On websites we see many recommend using Bollinger Bands as a trend filter. For example, when the price breaks above the upper bands, it might indicate a positive trend has started, and a position can be initiated when the price pulls back into the channel again. We have tried to write code for such a strategy, but we have found nothing to work.

## Bollinger Bands breakout strategy:

We were playing with ideas and numbers when we tested this simple idea: What happens when it breaks out of a short-term Bollinger Band channel, but the short-term bands are smaller than the long-term bands?

The general idea is only to trade breakouts when the bands are more narrow than “normal” (measured by the 100-day bands). This doesn’t work in stocks, but shows some promise in gold (GLD):

Interestingly, this performs really bad in GDX (gold miners):

## Bollinger Band code for Amibroker (or Tradestation):

We give you the Amibroker code (and for Tradestation if you require) for the strategies we made above on demand. Read more here:

## What is the best setting for Bollinger Bands?

As with any strategy, there is no best setting for any indicator, and not Bollinger Bands either. You have to play around with the indicator and perhaps you find something that might work.

## What time frame is best for Bollinger Bands?

The best time frame for Bollinger Bands depends on your investment horizon. But the best time frame is, of course, the profitable one. If you’re a trader or investor, you want to invest your capital in profitable strategies. You need to be an investment agnostic and go after the profitable strategies. This means you can use different time frames depending on the asset class. What works in stocks doesn’t necessarily work in commodities.

## Which indicator works best with Bollinger Bands?

There is no definite answer. Mean reversion works on stocks, at least for now, while mean-reversion doesn’t work well in commodities. No strategy fits all markets. You have to play with indicators yourself.

## What is %b (percent b)?

Larry Connors has twisted the Bollinger Band somewhat in chapter 5 of his book *High Probability ETF Trading*. Connors’ %b is a measurement that I believe he invented, but it’s just a small deviation from the Bollinger Bands. The calculation of %b is this in Amibroker:

percentB=( ( Close – BBandBot(C,10,2) ) / ( BBandTop(C,10,2) – BBandBot(C,10,2) ) )* 100;

## Conclusion: Are the Bollinger Bands profitable?

The Bollinger Bands are like all other indicators: it measures the past movement. Your task as a quantitative trader is to calculate how the past movement predicts future movement. As such, the Bollinger Bands shows some promise. However, we have not used any **Bollinger Bands strategies** yet for live trading because we believe other indicators are more useful than Bollinger Bands. You can have a look at our free trading strategies or monthly Trading Edges.

Excellent work, I love when the very simple still has alpha!

Thank you for all of your hard work and the inspiration you provide me ðŸ™‚