In Episode 4 of the Better System Trader podcast, Nick Radge discusses some trading ideas he’s used to create profitable systems. He mentions a Bollinger Band idea which is also published in his book Unholy Grails. Nick says:
the strategy that we did test and showed very promising results was an entry using a Bollinger band and an exit using the opposite Bollinger band, but we use 3 standard deviations for the entry and 1 standard deviation for the exit, just to keep the trailing stop a little bit tighter.”
In Unholy Grails the strategy is used on the Australian stockmarket but in this article we’re going to test it on the Nasdaq 100 instead to determine if the strategy has potential in other markets.
The trading rules
Firstly, here are the test parameters:
- Period: Daily charts
- Universe: Nasdaq 100, using historical constituents to eliminate survivorship bias, data from Premium Data
- Test period: From 1/1/2005 to 1/1/2015. This period was chosen because it has a mix of bull and bear markets, along with high and low volatility
- Starting equity: $100,000
- Maximum number of simultaneous trades: 6
- Position size: Each position will be 1/6th of $100,000
- Compounding profits: No
- Commissions: $10 each way
- Leverage: 0%
Now for the entry and exit rules. In Nicks book, he uses 100 period Bollinger Bands so we’ll do the same. The upper Bollinger Band will be 3 deviations from the central line, the lower Bollinger Band will be 1 deviation below the central line.
Entry: Buy on the Open the day after a stock closes above the top Bollinger Band
Exit: Exit on the Open the day after a stock closes below the lower Bollinger Band
Here is an example of an entry (10/05/2007) and exit for AAPL:
Comparing the results of the basic Bollinger Band strategy to Buy & Hold:
Buy & Hold
Basic strategy
Annual Return (CAR)%
9.88%
11.83%
Max Drawdown (MDD)
-52.81%
-21.80%
CAR/MDD
0.19
0.54
Transactions
1
81
Win %
n/a
71.60%
Win/Loss Ratio
n/a
2.40
The annual return of the basic strategy is almost 20% better than Buy & Hold with less than 1/2 the drawdown. The equity curve of the basic strategy shows a general rise in equity with a few periods of drawdown:
Adding a market filter
A market filter is used to switch a strategy on or off based on broader market conditions. As this is a long only system we probably don’t want to enter trades in a bear market so we’ll only enter trades when the index is rising. With the S&P 500 the most frequently used index by financial professionals, we’re going to use that for the index filter.
In this test a bull market will be defined as the index closing above the 100 day simple moving average; when the index closes below the 100-day moving average it is a bear market and we won’t enter trades until prices closes back above the 100 day moving average. The 100 day moving average was chosen to match the Bollinger Band value, other moving average lengths may work better but will need to be tested. The results:
Buy & Hold
Basic strategy
Basic strategy with Index filter
Annual Return (CAR)%
9.88%
11.83%
13.01%
Max Drawdown (MDD)
-52.81%
-21.80%
-17.95%
CAR/MDD
0.19
0.54
0.73
Transactions
1
81
73
Win %
n/a
71.60%
64.38%
Win/Loss Ratio
n/a
2.40
3.66
The index filter has improved the quality of the strategy, with a higher return, lower drawdown and higher win/loss ratio with fewer trades.
There are periods during the test where more trade entry signals are presented than we can take using a maximum of 6 positions, so we need to decide which stocks to choose when this happens.
Let’s try a basic ranking strategy in order to systematise the selection process.
Ranking
When a number of stock entries occur on the same day we need to make a decision on which ones to take. We could choose them randomly but we would need to run monte carlo simulations to get a better indication of the possible variations using this method. I prefer to add a simple ranking system to the strategy so stock selection is completely systematic.
The ranking strategy I’m going to use here is based on what I think the strategies strength is. I expect the strategy will perform best either just after a bear market or a period of consolidation, entering at the start of a new bull market or breaking out of consolidation and riding it higher. In this case, we’re going to try ranking by Rate of Change over the last 90 days, so the stocks with the smallest Rate of Change will have a higher priority than those with a large Rate of Change. Logically it makes sense but what do the results tell us?
Buy & Hold
Basic strategy
Basic strategy with Index filter
Basic strategy with Index filter and smallest ROC ranking
Annual Return (CAR)%
9.88%
11.83%
13.01%
13.82%
Max Drawdown (MDD)
-52.81%
-21.80%
-17.95%
-17.54%
CAR/MDD
0.19
0.54
0.73
0.79
Transactions
1
81
73
68
Win %
n/a
71.60%
64.38%
72.06%
Win/Loss Ratio
n/a
2.40
3.66
3.31
The ranking strategy produced a higher annual return, with lower drawdown, a lower number of trades and a higher win %. It may have not impacted too many trades so the addition of the ranking may not be statistically significant but it does provide a systematic method to choosing stocks when multiple opportunities present themselves.
The power of Compounding
So far we’ve seen the basic strategy slightly outperforms Buy & Hold but with considerably lower drawdowns. The inclusion of an Index Filter and ranking by smallest ROC has improved the strategy although the results aren’t outstanding.
Let’s see how compounding profits impacts strategy results:
Buy & Hold
Basic strategy
Basic strategy with Index filter
Basic strategy with Index filter and smallest ROC ranking
Basic strategy with Index filter and ROC ranking & profits compounded
Annual Return (CAR)%
9.88%
11.83%
13.01%
13.82%
20.20%
Max Drawdown (MDD)
-52.81%
-21.80%
-17.95%
-17.54%
-21.93%
CAR/MDD
0.19
0.54
0.73
0.79
0.92
Transactions
1
81
73
68
60
Win %
n/a
71.60%
64.38%
72.06%
73.33%
Win/Loss Ratio
n/a
2.40
3.66
3.31
3.33
Update 27/4 – As requested by Rick, here is a histogram of distributions, with the majority of trades in the -25 to +70% range and a few trades with 100% and higher:
With compounded profits we now have a strategy that produces more than double the returns of Buy & Hold with only half the drawdown. The win rate of 73.33% and win/loss ratio of 3.33 are also good for a trend following system.
It appears the strategy has some potential and warrants further investigation. Some areas of consideration could be:
- The length of the Bollinger Bands,
- Different market filters,
- More adaptive trailing stops,
- Ranking based on other metrics,
- Suitability to other markets.
Like a copy of the AmiBroker code?
Want to get the latest updates automatically?
The best way to get notified when new stuff is released is to sign up to the email list below and we’ll be sure to let you know:
[mc4wp_form]
Dear,
Thanks for the very interesting article “Blast Buy & Hold with this simple Bollinger Band strategy”. I’m using Amibroker as well. Is it possible to post (or send me) the code of this system?
Thanks in advance.
Kind regards,
Hans van der Helm
Hi Hans, I’ve just emailed you the AFL code, hope it helps.
Regards,
Andrew
Andrew- Thanks for the write up. I am interested in the afl. Appreciate your work on this.
Thanks Derrick, I’ve emailed you a copy of the AFL.
Regards,
Andrew.
Thanks for the great information. Could you please email the afl? Thanks.
Sure, AFL sent!
Regards,
Andrew.
This strategy is stocks only strategy?
Hi Casey, I’ve only tested it on stocks however it may work on futures/forex etc.
I can provide the AmiBroker code if you want to test it for yourself?
Regards,
Andrew.
Andrew,
Nice article. Can you please send the AFL code?
Thanks.
Thanks Bob, I’ve just sent you the AFL code.
Cheers,
Andrew.
Hi Andrew
Thanks for that interview with Nick and the analysis of his Bollinger Band system.
Looking forward to the AFL code.
Very interesting.
Cheers
John
Cheers John, I’ve just sent you the AFL code.
Regards,
Andrew.
Hi Andrew,
Really enjoying the podcasts and the great information you provide. Could you please send through the AFL code.
Thanks
Thanks Paul, glad you’re enjoying the podcast.
I’ve just emailed you the AFL.
Cheers,
Andrew.
Good article, I really enjoyed it. Could I also have the AFL to play with?
Best.
Hi Rick, the AFL code is on its way.
Regards,
Andrew.
Thanks a lot, got it!
Two things: (a) Could you post results from index start? Although there is a downtrend, the chose period has two uptrends.
(b) What was the contribution of AAPL and GOOG in the results? If you were to remove those companies from the index, what would be the result? I’m saying this because it is unlike;y to have similar companies in the near future. To what degree are your results influenced by a few outliers?
Best.
Hey Rick,
Great point about considering the outliers.
I checked the trade results and the trades with the highest returns weren’t actually AAPL or GOOG. In fact, the strategy didn’t take a trade in GOOG at all and AAPL was only the 3rd highest, here are the top 5:
GILD: +213.98%
BIDU: +137.33%
AAPL: +107.10%
EXPE: +103.48%
QVCA: +98.10%
If I remove all the AAPL trades, the Annual Return is 18.43% and DD is -23.60% so the returns are slightly lower but who’s to know what will happen in the future – AAPL may continue higher, another stock could take over, this strategy may fail miserably tomorrow, we just never know.
Regards,
Andrew.
Thanks! Still I am concerned about outliers. I would be nice if you could add to the blog a histogram of returns per stock traded, maybe at least the top 30 ones. Then it will be clear if the performance was due to a few random outliers or due to the method. Apologies for the request but I do not have the data to do it, otherwise I would.
Hi Rick, I’ve added a chart showing the returns. The bulk of the trades are in the range of -25 to +70%, with a few +100% or higher. I hope that answers your questions.
Please keep in mind that this research is not a complete trading system, it is just a starting point. The purpose of the research was to determine if the strategy that Nick mentions in the podcast has potential in other markets. It appears it may but further investigation obviously has to be completed before taking it further.
If you can I highly recommend getting some data and running some of these tests yourself, I’m sure the strategy could be improved so I’d be interested to hear your results.
Regards,
Andrew.
Great write up. It’s amazing what a a simple system with just a few tweaks can do. I’d appreciate a copy of the AFL code so I can see if I can make a few other tweaks that might help. Thanks.
Hey Gav, glad you enjoyed it.
Yes, I’ve found the simple systems are often the best, I look forward to hearing what you uncover in your testing.
The AFL is on its way.
Regards,
Andrew.
Nice methodology! I’d love to get a look at the strategy’s code, please 🙂
Hi Ran, have just sent you the code.
Regards,
Andrew.
Nice article, can u please mail me the code so i can test it on instruments i trade.
thank you
mandeep
Cheers Mandeep, just sent you the code.
Regards,
Andrew.
Hello Andrew, Thank you for the great Information and Podcasts. I also enjoyed the interview with Cesar Alvarez. I´m looking forward for more Podcasts with real Traders. Could you please send through the AFL code.
Thanks Juergen, I’ve just sent you the AFL code.
Keep an eye out for the next few episodes, we have some awesome traders coming – Kevin Davey, Gary Stone, Rob Hanna, Howard Bandy and more.
Cheers,
Andrew.
Hi Andrew,
Simple works best and that’s what this system is. I like many of the concepts used in this system.
Some of my concerns or ideas for improvement are:
1) The high winning percentage. I would expect this to come down over time and be closer to 50%.
2) A sample size of 60 isn’t really enough to draw too many wide ranging conclusions.
3) Also having a max of 6 open trades is a bit on the risky side for me. It really doesn’t provide enough protection against specific risk.
4) Dividing capital equally among the 6 open positions could be improved to something along the lines of fixed fractional or volatility adjusted position sizing to help control risk better.
Love the website and podcasts. Keep up the great work!
Could you send me the AFL code?
Thanks,
Gregg
Hi Gregg,
All valid concerns which need to be investigated further, I’ve sent you the code.
Keep in mind that Nick Radge uses this strategy on the ASX and it produces better results than the results in this test, which tells me the strategy is robust. If you want more details I highly recommend you check out his book Unholy Grails.
Regards,
Andrew.
Hi Andrew. Loving the podcasts! I’d like to hear some more about your own background and trading style in a future podcast.
Can you please send me the AFL. I’m a huge fan of Nick’s work
Thanks,
Ashley
Hey Ashley, glad you’re enjoying the podcast.
You can read a little about my background and trading in the About page on the website or in podcast episode 000 available in iTunes but it’s a good idea to include it in a future podcast episode so I’ll do that too.
I’ve just emailed you a copy of the AFL code.
Regards,
Andrew.
Andrew,
Good Work. Please send the AFL code
Hey Emil, have just emailed you the AFL.
Regards,
Andrew.
Hi Andrew, your doing an excellent job with the podcasts and I’m really enjoying them, keep up the great work and when you have a chance could you please send me the AFL code.
Thanks Glenn, glad you’re enjoying the podcasts, I just emailed you the AFL code.
Regards,
Andrew.
I’d like the AFL code too please. Just getting started with AFL and need all the good sample code I can read.
I’m especially interested in your thoughts on the 100 day moving average as a long-term bull-bear indicator… do you have any other long-term bull-bear-sideways indicators that you use, or have references to others using?
Hi Paul, I’ve just sent you a copy of the AFL code.
If you’re just getting started in AmiBroker, I recommend you take a look at the AmiBroker book by Howard Bandy here, it’s a free download for personal use.
If you’re more interested in a course, check out the AmiBroker course by Cesar Alvarez here. Cesar has offered to open his AmiBroker Backtesting 101 course to Better System Trader podcast listeners. The course will teach you how to program strategies from beginning to end and even provides you with a strategy that averages 20%+ returns per year. The offer is only valid until May 20th and numbers are limited so get in quick.
As for ways to determine bullish/bearish conditions, I’ve found simple methods are the most effective, like moving averages, volatility indicators etc. Keep an eye out for the podcast interviews we release on May 18th and May 25th where we discuss more about this.
Regards,
Andrew.
Nice article, I’d like to see the Amibroker code too. Thanks.
Thanks Barry, I’ve just emailed you the code.
Cheers,
Andrew.
Very impressive results for such a basic system. Certainly not over-optimized.
I’m interested. Could you please send me the AFL code.
Cheers,
Peter
Hi Peter, have just sent you the AFL code.
Regards,
Andrew.
I know I’m a pain but I insist that you remove from the list the top 4-5 stocks
GILD: +213.98%
BIDU: +137.33%
AAPL: +107.10%
EXPE: +103.48%
How does CAR change?
Hi Rick, if I remove all GILD, BIDU, AAPL and EXPE trades the CAR has reduced as expected, down to +15.57% with -23.60% drawdown. It still beats Buy & Hold of +9.88% CAR with -52.81% drawdown but there is obviously more scope for improvement.
I encourage you to use this strategy as a starting point only, it is by no means a complete strategy and I’m sure there are many ways it can be refined.
Regards,
Andrew.
Thanks. I( agree. Good work!
Nice podcast
Could yo sent met the AFL Code
Thanks
Thanks JanWillem, just sent you the code.
Regards,
Andrew.
Hi Jan, your spam filter is blocking the email so I cant send to you, can you fix or email me andrew@bettersystemtrader.com with another email address and I’ll resend.
Cheers,
Andrew.
Ok sorry
I have sent you my gmail address by seperate mail
thanks again
Hi Andrew, thanks for the podcast. Really appreciate your effort. Could you help with the code. Also wondering have you tried a long/short variation.
rgds, Vivek
Hey Vivek, glad you like the podcast.
I haven’t tried a long/short variation, please let us know how you go if you test it yourself.
Have just sent you the AFL.
Cheers,
Andrew.
Hi Andrew,
I’m learning Amibroker and find it helpful working through other peoples code and understanding how the logic has been coded. Would love a copy of your AFL code for this system.
Thanks
Just sent you the code.
Regards,
Andrew
Andrew,
Nice article. Can you please send the AFL code?
Thanks.
Hi Miro, have sent you the code.
Cheers,
Andrew.
Many thanks for this interesting article. Would it be possible to have a copy of the Amibroker code?
Have a good one!
Stephane
Hi Stephane, glad you liked it, have just sent you the AFL code.
Regards,
Andrew
Could you please send me the afl code. I am interested in further studies.
Best regards
Stefan
Hey Stefan,
I’ve just sent you the code.
Cheers,
Andrew.
Interesting idea 🙂
Is it possible to get the AFL code?
Thanks,
Nir
Hi Nir, click the blue ‘Download the FREE Bollinger Band code for AmiBroker’ button at the bottom of the article to download the code.
Regards,
Andrew.
Thanks for the strategy. I have seen so many promising strategies that trade only LONG. I am yet to see a strategy trading profitable both LONG and SHORT. This would be a one up for your site if you could get an expert to write up an article on such a strategy. Regards.
Hi Perry, thanks for the comment.
Check the blog next week, Rob Hanna provides a simple trading idea that does exactly that!
Regards,
Andrew.
Hi Andrew,
I’m really enjoying your podcasts and blog. May I please have a copy of,the AFL for this post.
Best regards
Hey Growbuck, click the Blue download button just above the comments section to download the AFL code.
Cheers,
Andrew.
Great post, i’m learning the amibroker to develop the trading strategy. Lucky to see your website. May i get the afl code for deep studying? Thanks.
Hi, click the blue download button on the page to get the AFL code.
Cheers.
May I please have a copy of,the AFL for this post
Hey Phil, click the blue Download button just above the comments to get a copy of the code.
Cheers,
Andrew.
Andrew,
Just found your podcast and this was the first one I listened to – GREAT stuff. Thank you!
Simon
Thanks Simon, glad you enjoyed it.
Andrew.
Hi Andrew,
thanks for this great post. I would like to use the code to learn how to program an efficient strategy. Please send me the AFL code.
Thanks:
Philipp
Hi Philipp, click the blue Download button just above the comments to get a copy of the code.
Regards,
Andrew.
Dear Mr Andrew Swanscott
Can you please send me the AFL code for this as I am using Amibroker and would like to back test the same
Regards
Ashok
Hey Ashok, click the blue download button to get the AFL code.
Cheers,
Andrew.