I have recently been looking at some old materials and I came across another interesting work by Larry Connors and Cesar Alvarez regarding Bollinger Bands.
Bollinger Bands were developed by John Bollinger and can be used in a number of different ways. In this article, we will use Bollinger Bands to find mean reversion trades.
Backtesting Bollinger Bands
As I said in a previous blog about classic trading books, I always like going over old material because you’re given a large window of out of sample data for evaluation.
If a book talks about a trading strategy and is published in 2010, for example, you then have 7+ years of data to see how it got on.
In their guidebook on Bollinger Bands, Connors and Alvarez present a number of different strategies and they show impressive quantified results between 2006 – 2012.
(Most of the strategies show win rates above 75% with some even higher than 90%).
Their strategies are designed to find pullbacks in ETFs and the rules are all based on an indicator called %b which is derived from the Bollinger Bands calculation.
The %b Indicator
The %b value is used to quantify a security’s price in relation to the upper and lower Bollinger Band and can be calculated with the following formula:
%b = (Price ‐ Lower Band) / (Upper Band ‐ Lower Band)
When %b is greater than 1, it means price is above the upper band and when %b is less than zero it means price is below the lower band.
Instead of the standard Bollinger Band configuration of a 15 period moving average with two standard deviations, Connors and Alvarez like to use a 5-period MA.
They determine the standard deviation of the price over the same number of periods which in this case is five. We are given the following formula:
Upper Band = MA(5) + SD(5)
Lower Band = MA(5) – SD(5)
According to Connors, the ‘%b component of Bollinger Bands allows you to better pinpoint proper entry and exit triggers’.
They also like the %b value to be under 0.3 for multiple days in a row. The lower the reading, the more oversold the security and therefore the greater the chance of a profitable pullback trade.
As mentioned, the guidebook details a number of strategies based on %b but they are all variations on the same theme.
For the purposes of this article, I will be testing just one variation which I picked at random. The strategy is designed for ETFs and the rules are as follows:
- The 21-day average volume of the ETF must be greater than 125,000.
- The lowest daily volume of the ETF over the last 21 days must be greater than 50,000.
- The closing price of the ETF must be above it’s 200-day moving average.
- The %b value must be under -0.1 for four days in a row.
- Sell when %b goes above 1.
Rules In Plain Language & Trade Example
In other words to implement this strategy we have some liquidity rules and some price action rules.
We need the ETF to have sufficient volume so that we can trade it easily and we need the %b to be under -0.1 for four days in a row so that we can be sure the security is very oversold.
We then sell when %b climbs above 1, hopefully giving us a quick, profitable swing trade.
Following is an example of the trade setup we are looking for in the iShares Japan ETF (EWJ):
EWJ meets the volume criteria first of all with millions of shares traded.
On the 29th July, the %b value (middle pane) has been under -0.1 for four days in a row. We therefore enter long on the next open (green arrow).
The %b value then crosses above 1 on the 1st August and so we close the trade on the next open for a profit of 2.78% in 4 days (red arrow).
Backtest Settings & Issues
Although the strategy guidebook does a good job of explaining the rules there are a few issues that we should address before we look at the results shown in the book.
The first issue is that the results assume trading on the close of the trading signal. While this may not always be a major problem I feel it is quite difficult for traders to do this, since the %b and 200-day moving average values require close values in order to be plotted.
Therefore our backtest will enter trades with a one bar delay. That is, we will enter and exit on the next day open instead of the same day close.
The second issue is that the guidebook gives no detail as to which ETFs are used in the simulation.
This is a bit of a problem because it means I have been unable to replicate the results in the guidebook.
I did try testing on the same watchlist of 20 ETFs that was described in another one of Connors’s products but my backtest only resulted in 63 trades. Connors results show over 400 trades for this strategy so he must be using a much wider universe of ETFs.
Because of this, I will use my own watchlist containing of 45 liquid ETFs and stocks.
Finally, Connors provides no information regarding transaction costs. We will use a position size of $1,000 per trade and assume transaction costs of $0.01 per share.
The following table shows Connors results as recorded in the guidebook compared to our results for the backtest period between 1/2006 – 8/2012.
As you can see, there are some differences in the two results.
We have recorded fewer trades overall. This was expected because we do not know what ETFs Connors has used.
The average profit per trade is quite a lot lower but the win rate is above 75% and is pretty good.
Connors does not provide details about drawdowns but we recorded a CAR/MDD of 0.47 which is also pretty good.
Following is an equity curve that shows how profits accumulated during our backtest:
Since this guidebook was published in August 2012 we now have over five years of data with which to evaluate this system.
Following shows the results and equity curve when we apply this same system to the watchlist of 45 stocks and ETFs during the out-of-sample period between 9/2012 – 9/2017.
As you can see, this system has performed quite well in the time period since publication. Although our profit per trade and win rate has decreased slightly we have not encountered much of a drawdown and our CAR/MDD has gone up to 0.51
Putting It Together
Now that we have seen there might be a possibility of a profitable edge using this Bollinger Band signal we can go one step further and put it all together as a portfolio simulation.
The following results and equity curve show the performance of a $100,000 portfolio between 1/2006 – 9/2017. The maximum number of open positions is capped at 10 with equal weighting position size (i.e. 10% per trade).
If we get more signals than the portfolio can carry we will prefer the ETF with lower %b.
- Net Profit: $87,557
- Annualised Return: 5.54%
- Maximum Drawdown: -12.19%
- CAR/MDD: 0.45
- Win Rate: 65.3%
- Exposure: 27.68%
- Risk Adjusted Return: 20.02%
- Profit Factor: 1.41
As you can see, the annualised return when traded as portfolio is not particularly strong at 5.54%. However, it is balanced by a modest drawdown, giving a CAR/MDD of 0.47.
The win rate is OK at 65% and exposure is also reasonable. However, one worrying feature is that the system has basically flat-lined since 2015.
In response to Marco’s comment below, I have just back-tested the same system as above but this time I have used the open price instead of the close price for all of the calculations. This ensures we can trade on the close and not have to wait for the next open.
Results are significantly better. CAR: 7.31%, MDD: -9.59%, CAR/MDD: 0.76, WR: 72.28%.
It is always good to look over old materials to find interesting strategies that you can test on unseen data.
In this article, we found an interesting Bollinger Bands strategy that worked pretty well on our selection of ETFs and stocks and shows a fairly high win rate.
Although it hit a bad patch after 2015, this system has some good characteristics and could be worth investigating further.
Following is a snippet of Amibroker AFL to show how we constructed the formula:
Simulations and charts in this article produced with Amibroker using historical data from Norgate.