Backtesting: Combining Relative Strength With A Moving Average Filter

Jan 11, 2011 in Backtest | moving average | Relative Strength

We have added an optional moving average (MA) filter feature to the RS backtest app.  With the recently expanded date start and stop functionality, the applications continue to get more versatile.  

Combining a long-term moving average within the construct of relative strength has been highly requested and we wanted to discuss one idea when considering whether to use it (note that you can just leave it set to ‘off’ as well).  

If you build a relative strength list of say 10 ETFs and you are choosing the top 2,  you could protect your portfolio by including 2 bond funds.   You don’t need a moving average filter because the bond funds will naturally be the ones with the relative strength when equity markets are dropping.   This method actually can get more interesting because you can make better use of more type of ETFs.   Rather than just use cash-like bond funds, you might want to extend the potential holdings to an intermediate bond fund like IEF (7-8 year duration) or others. You don't HAVE to restrict yourself to just stocks and cash.   

Another way to test is by using a moving average.   If you do it this way, then you will inherently be out of ETFs as they go into extended downtrends.  You don’t have to proportionally keep X number of bond funds in your list if you do it this way.    

But a lot of indexes can go above or below a long-term moving average and still not really be a source of market leadership and enhance your return.   Moreover, you may save a lot of money between the time ETFs lose relative strength and the time they actually cross below the moving average.   For these reasons, we believe adding relative strength to a MA strategy will generally be more robust.   Adding MA to a RS strategy is optional -- and you may find works better or worse than your existing method.   Continuous testing leads to better decisions.




Follow us on Twitter:


Comments (9) -

Jan 11, 2011 15:42 #

Hi Chris,

So I understand this correctly... If the MA filter is switched on, the MA is applied to each ETF in the list... If the top selection falls below its MA, then the backtest will ignore that selection and default to a Cash ETF or similar...

Also, can a switch be added to save the MA filter setting...?


Joe United States

Jan 11, 2011 17:02 #

Yes, that is right.    If all the ETFs in your list are in steep downtrends, then it will hold the default ETF -- such as a short-term bond ETF (SHY).    

Regarding saving the MA filter setting question --- do you mean saving it to always be on?  That is not an option currently.    We do want to stress that there is really no feature we can add that can replace good construction of ETF portfolio lists from which the techniques choose.  

Chris United States

Jan 11, 2011 19:38 #

I was one of the people who asked for a moving average filter added to relative strength. I must say I've been surprised at how little value moving averages add to RS. They just seem to reduce gains and add to volatility. As you point out, using bonds or treasuries in an RS portfolio is a much more effective approach at protecting from downside trends. A simple RS portfolio like (DBC, EFA, ICF, IEF, SPY), using default RS settings, yields annual gains of 26.6% with a max draw down of only 7.5% from 2006-2010 (the longest time period for which all portfolio members were active). Just having that single IEF treasury in the portfolio enabled the momentum strategy to sail right through the worst bear market in 80 years without a hitch.

Jim United States

Jan 13, 2011 02:51 #

Hi Chris, thanks for adding the MA filter to the Portfolio Relative Strength Backtest. That is particularly helpful when choosing e.g. the top 10 (out of 25). By adding the MA filter one can reduce the volatility/drawdown considerably.    

But what would be even more interesting to add this MA filter in (1 portfolio of) your Tactical Asset Allocation - Relative Strength:
Portfolio I (conservative/diversified): 80% weight with e.g. the top 10 (out of 25) and adding the MA filter and
Portfolio II (aggressive): 20% weight with holding e.g. the top 3 relative strength ETFs .  

hugos Germany

Jan 14, 2011 04:13 #

I read a blog recently which mentioned an academic paper whose results may be of interest.  The author of the paper claims that in the short term, significant predictive power is found by creating a ratio of a sort-term moving average with a long-term moving average.  A relative strength strategy can be created by ranking a universe of stocks or ETFs tested in this manner.  Could the data used to power ETF Replay also be manipulated to produce such a ratio?  The result would be an outstanding complement to the relative strengths strategies that can be constructed on the current site.  I enjoy your service -- keep up the good work!  

Chuck United States

Jan 14, 2011 19:26 #

Academic question: I sometimes investors label a RS strategy which selects a large set of ETFs (say 10 out of 25) as conservative, and one that selects a small set (say 2 out of 25) as aggressive. But if we define conservative as the portfolio with the highest Sharpe Ratio, I have found the so-called aggressive strategies provide a much higher Sharpe Ratio than the so-called conservative approaches. It may be counter-intuitive, but it seems holding a lot of ETFs in hopes of reducing risk through diversification doesn't work very well. Same with moving average systems being more conservative than RS systems. Moving average systems rarely come in with Sharpe Ratios much above 1.3 to 1.4, where RS systems which select just 2 or 3 top performers can have Sharpe Ratios above 2.0.  Or am I missing something?

Jim United States

Jan 15, 2011 07:36 #


We would agree with your conclusion --- that RS methods get the highest sharpe ratios.   And we agree with idea that the sharpe ratio should be your #1 long-term focus.

I wouldn't equate S.R. as a measure of conservatism though.   This is just an opinion but I would gauge conservatism by the size of the expec]ted drawdowns vs the overall market.    Silver (SLV) had a 1-year 2010 sharpe ratio of 2.10 --- ( ) but at ~30% volatility it is certainly capable of very large drawdown.  It is already down -9% this year.  

I agree with your conclusion about 'diworsification'  (Peter Lynchs term for buying too many things  just for the sake of diversifying).    I think that I would like to separate 2 ideas though.   The newer TAA app we did allows you to segregate your portfolio into 2 pieces.   Your tactical, aggressive, very performance-oriented portfolio  --- and set that at X%.   But then you can also have a core portfolio at Y% which ensures that you are staying true to the actual realities of your personal situation (time-horizon, liquidity needs, tax issues etc...).    You could do these at 50/50 or 20/80 or any %'s as the application is quite flexible.   This mental framework will fulfill your desire to compete and go for performance ---- but also allow you to think through a 'sanity-check.'       We will do more to develop this approach.      

Hugos & Chuck:

We continue to fill out the application suite and your ideas are being heard.   Be aware that we do build things and then find they add no real incremental value so they never appear on the site.   We stay busy though and we will continue to have new applications up on the site.    The sites functionality has been on a very steep climb vs 3 months ago.    



Chris United States

Jan 16, 2011 17:17 #

In his excellent book Way of the Turtle, Curtis M. Faith describes a risk factor he invented which is more robust than the common ones, being less sensitive to starting and ending points, as well as accounting for the depth, frequency, and duration of draw downs. The numerator of the formula is named the Regressed Annual Return percent or RAR, which is the percent slope of the linear regression line through the set of returns. The denominator is the product of (the average of the five worst draw downs) and (average days to recover from the five drawdowns / 365). So let's say the regression line has a slope of 10 percent. And let's say the average of the worst five draw downs is 5 percent, with the average time to recover (gain back the draw down losses) is 45 days. Then the risk factor would be 10/(5 * 45 )/ 365)). Curtis Faith's book shows some tests comparing this to the Sharpe Ratio, and his new risk factor does seem to do a much better job of assessing risk. I realize this is a bit out of the mainstream for you guys to consider, but it might be worth a look. I'm currently using a simpler but similar method to assess my own portfolios' safety, by computing the average of the worst five draw downs as one safety rank, and the Sharpe Ratio as the other safety rank, and then computing the final rank as the average of the other two ranks.

Jim United States

Feb 06, 2011 00:33 #

Chris, you mentioned that you have built things which added no real value, and therefore did not make it to the site. It would be of value to your subscribers if you could share with us what these things were, since this would enhance our own knowledge about the subject at hand, and help us avoid pursuing avenues which are not worth our time.


Paul Belgium

Comments are closed

Follow ETFreplay