Home / ETF Rotational System

ETF Rotational System

ETF Rotational System V1.0, Part 4 – Updated

Part 1

Part 2

Part 3

In Part 3, we examined the effect of weighting two different RSI lengths, and using those weights to rank ETFs. After backtesting, the resulting statistics and equity curve appeared to be curve fit, and I acknowledged that the weights chosen were optimal. I ended part 3 by noting that the next step is to test a moving average filter vs. using short side ETFs. We will examine those two factors in this installment.

First, a note about the ETF portfolio. I began tweaking the portfolio a bit based on the recommendations made by a reader in the comments section here. I think his recommendations are important because the portfolio has some redundancies. The redundancies will mean that it is possible to be over-weighted in certain sectors or countries. For example, if the system chose [[EWZ]] and [[ILF]] , it would have 50% of its capital invested in highly correlated ETFs. For this reason, I believe it is necessary to weed out highly correlated ETFs. I also propose removing [[USO]] and [[UNG]] due to the contract rollover shenanigans.

In terms of adding ETFs, there are more that could be added to give broader exposure.

The point of this discussion is that the portfolio is almost as important as the factors of the system itself. After making changes to the portfolio, the results dropped fairly significantly from what was reported in Part 3 (another sign of curve-fitting?) I decided for purposes of continuity and consistency to use the same portfolio in Part 4 as in Part 3 so that we could have an apple to apples comparison of the moving average filter, but I think we should spend more time refining the portfolio. My gut feeling is that it is too large, and because of that, it makes it more difficult to isolate what effects (if any) the factors have on performance.

On to the tests…

Lets Remove the Short ETFs

I removed [[SH]] , [[PSQ]] , [[DOG]] , and [[RWM]] and then ran the test with the system using the same parameters as in Part 3. Here are the results:



The Annual Return % drops over 3% and the Max System % Drawdown increases ~2% when the short ETFs are removed.

Add Short ETFs Back to Portfolio and Add a Moving Average Filter

Now I will add the four short ETFs back to the portfolio and add a 200 day simple moving average filter. The filter will not let the system rotate into new positions if the SPX has closed beneath its 200 day SMA. As soon as the SPX closes above the 200 day SMA, the system will jump in long on the next open.

Note that the 200 day moving average filter does not allow the system to rotate into the short ETFs, so even with the ETFs added, we  have an apples to apples comparison of the system without the short ETFs versus the system with a moving average filter.

The Results:




We now see that the performance without short ETFs is very similar to the performance with a 200 day SMA filter, in terms of the compound annual return. However, the max system drawdown is ~7% less when using the moving average filter. That is a ~20% improvement in the drawdown.

The moving average filter also improves other metrics, such as average trade, profit factor, and the Sharpe ratio. And since the filter means the system makes fewer trades, if commissions were added, there would be even greater improvement shown in the moving average filter results vs. no filter and no short ETFs.

A Few More Thoughts…

I ran an optimization to determine the best moving average length for the filter. I graphed two metrics, Compound Annual Return (CAR) and CAR/Maximum System Drawdown (CAR/MDD). The results show that there are many moving average filter lengths that will work, but it appears that lengths greater than 170 bars give fairly smooth results with lengths greater than 220 resulting in improved performance.


What Have We Learned?

I’m not sure. There are still a lot of variables here, with portfolio composition being a formidable one. I would say that short ETFs helped results more than I thought they would, and I am always surprised how well a simple moving average filter performs. I have learned that RSI seems to be sub-par as a ranking tool, compared to Rate of Change. More than anything, these tests have created more ideas for future tests. Ultimately, I hope to be able to synthesize all that I have learned into a robust rotational system. I do not believe that this system is a good final product and therefore I will take the good, leave the not-so-good, and push forward.

Where Do We Go From Here?

Long story short, I’m done messing around with RSI as it was used in the tests as a tool for ranking ETFs in a rotational system. I’m positive that Rate of Change is a better ranking tool. However, I am interested in using RSI in a different way, based on the comments left by Ruschem:

I was thinking about your approach to ranking ETFs. While I like RSI based system (RSI is one of my favorite indicators) there are a few points that I am not quite sure about. First, using blended RSI(65) and RSI (30) is somewhat redundant because the entire RSI (30) set of data is already included in RSI(65). Adding RSI(30) to RSI(65) simply adds some more weight to the last 30 days regardless in what proportion the two are used. Instead, I suggest using three independent periods. For example, X*RSI(21) today + Y*RSI(21) 22 days ago + Z*RSI(21) 43 days ago. In all, this system will use 65 days worth of data but split into three independent (or almost independent because of the way RSI is calculated) periods. What it does, it measures the consistency of outperformance or underperformance in each of the last three months. I did RSI ranking both ways (yours and mine). Most numbers were very close but there were notable differences as well. I didn’t run the backtest because I don’t have good backtesting software and lack skills to do it in excel.

Another problem that I see with RSI ranking is that it’s a measure of the internal strength and it really doesn’t tell the whole story. As a result, an ETF may have a high RSI rank but only a very low absolute return. This is why it seems that some kind of a combined RSI and ROC ranking should do the best. Ideally, I would filter ETF pool using RSI ranking (maybe 8 best) and buy four with the highest ROC out of these eight. What do you think?”

I will begin playing around with Ruschem’s idea, to see if it has any merit.

I also want to dig deeper in the following areas:

1. Portfolio construction

2. Shorter minimum hold times

3. Better weighting and smoothing of the ranking metric

Thanks for reading and contributing ideas.

Comments »

ETF Rotational System V1.0, Part 3

Read Part 1 and Part 2

In the comments of Part 2, Jeff Pietsch suggested running the system over the Fidelity Select Fund portfolio used in this series of tests to gain some insight on how the system would perform over a longer time frame. Not a bad idea, and simple to test. Long story short, with every setting, parameter, etc. the same as Part 2 except run over the Fidelity Select Fun portfolio, the system does a CAGR of 12.03%, with a pretty equity curve. It does suffer from drawdowns bigger than I would like, but would easily be improved with the addition of a moving average filter. The FSF portfolio generates its first trade in 1985, and by 1987, the system is fully diversified across four different funds.

The point of all this is was determine if our settings of RSI(65) and a minimum hold time of 65 days, are robust. (Return to Part 1 how these settings were determined). I do not think that I am able to say without a doubt that the settings are robust, but it is safe to say that they work very well using the 40 Fidelity Select Sector funds. I’m not sure why the FSFs tend to work better than ETFs, but my go-to suspicion in these kinds of circumstances is that funds that are priced once a day are not as likely to have the edge traded out of them.

Using 2 RSI Calculations and Weighting them…

In Part 2 I discussed using a technique which uses a longer and a shorter RSI calculation, weighting each differently, and then summing them to create our ETF rank.

I decided to use RSI(65) for our longer length and RSI(30) for our shorter length.

How do we weight them? I used a higher weight for the longer RSI length and a lower weight for the shorter length, so that the calculation looks like this: Rank=(RSI(65)*.6)+(RSI(30)*.4)

I have some thoughts about the weighting process, but I’ll save them for the summary/caveats.

Results with 2 Weighted RSI Calculations



Summary of Results:

Using 2 weighted RSI calculations to rank the top 4 ETFs improves results, doubling the compound annual rate vs. the previous version. All metrics, including maximum system percentage drawdown, have improved versus using a single RSI(65) calculation to rank the ETFs.


If the parabolic equity curve has suggested curve-fitting, then consider yourself astute. Indeed, the .6 and .4 weights are near optimal. It is pure accident that I started with .6 and .4. I was simply looking for a greater weight for the longer RSI length. Using weights of .7 and .8 for the longer length and .2 and .3 for the shorter length result in CAGRs similar to using RSI(65) on its own, but with slightly improved drawdowns.

To gain understanding of the influence of the weights, I ran a walk-forward optimization on the weight parameters, allowing each weight to be anywhere from .1 to 1, adjusting them in increments of .05. The results were very promising and showed that the optimal weighted values consistently maintain their edge long enough into the future that the out-of-sample results are comparable to the in-sample results.

But there was something more interesting about the walk-forward results, and that is that the weights seem to adjust according to the market regime and volatility. While I haven’t thoroughly testing this premise yet, it seems that we need a higher weight for the longer RSI length and a lower weight for the shorter RSI length when the market is demonstrating a medium to low volatility uptrend, while the shorter RSI length needs a stronger weight than the longer length during periods of high volatility. Anyway, in the future, I may try to quantify this so that the weights are switched automatically based on the market regime.

Next, we will take this 2 factor system and add another factor, the moving average filter. We want to determine which is better for mitigating drawdowns: Inverse ETFs in the portfolio, or a moving average filter.

Comments »

ETF Rotational System V1.0, Part 2

Well its time to take a look at how this thing actually performs.

But if you are new to this series, you might want to take a look at Part 1.

To recap:

System Specifics

The system will calculate the momentum/strength of each ETF in the portfolio, and then based on that metric, rank the ETFs. Version V1.0 will use RSI as the proxy for momentum.

  • The top 4 highest ranked ETFs will be bought on the next open after the signal to rotate.
  • Each ETF will be held for a minimum number of trading days.
  • At the end of the minimum hold time, the ETF portfolio will be ranked and re-balanced, with all sells taking place at the close.

Version 1.0 will be using only 2 factors, which are RSI(65) and the minimum number of trading days to hold the ETFs, which is also 65. Again, review Part 1 to see why those inputs were chosen.

The Results:




SPY has a compound annual rate of 5.34% over the same time period, so V1.0, once commission and slippage is accounted for, has probably not done any better than a buy-and-hold strategy.

Obviously, the system has a propensity for large drawdowns, and that issue must be addressed. That will be an easy fix/test, and not very much fun since it is so easy. Therefore, we’ll make improving V1.0 a little more challenging. What I will do for V1.1 is use two different RSI calculations, weighting both of them differently, and then summing them to get our ETF rank. Any of you who read the comments section here have probably seen Jeff Pietsch of Market Rewind fame mention this method a couple of times. Using two different period settings and weighting them should be more interesting than applying the old moving average filter to deal with the drawdowns, and will keep the system simple 2 factor model, for now.

One other thing to mention is that there were not but a few ETFs trading back in the middle 1990s. Because the system is requiring 4 ETFs, you’ll notice that some of the early trades are held for a few years, because there were simply no other ETFs to rotate in to. This issue disappears after a few years and other ETFs come on board. You can explore all this by viewing the trades, which I’ve linked to below.

View all the trades here: ETF Rotational System V1.0 All Trades

Comments »

ETF Rotational System V1.0, Part 1

For history on how we got here…

Thinking About a 4 Factor ETF Rotational System

More Thinking About Factors

Proposed ETF Portfolio for Rotational System

The first runs will test a very basic system as I want to be able to see if adding any more complexity to the system improves it (and how it improves it) in any way over simpler versions.

System Specifics

The system will calculate the momentum/strength of each ETF in the portfolio, and then based on that metric, rank the ETFs. Version V1.0 will use RSI as the proxy for momentum.

  • The top 4 highest ranked ETFs will be bought on the next open after the signal to rotate.
  • Each ETF will be held for a minimum number of trading days.
  • At the end of the minimum hold time, the ETF portfolio will be ranked and re-balanced.

Version 1.0 will be using only 2 factors, which are RSI(x) where x represents the periods, and the minimum number of trading days to hold the ETFs, represented by y.

Lets take a look at how these factors play together, using AmiBroker’s 3D Optimization graph.



The most obvious feature of these graphs is that they are peaky. This is not a good thing. You know you have a robust interplay of factors when rather than looking like some crags in Switzerland, the graph looks like a nice grassy knoll.

I’ve circled the area that looks the most promising. We’ll be optimistic and call it the grass knoll. You can see that on either side of this area, performance begins to roll off.

So how do we choose the figures for x and y to plug into our factor calculations? Initially, I tend to eyeball things. I look for the area that seems to fall in the middle of the grassy knoll. If we choose a number near the edge of the knoll, it means that any change in the market may serious affect the system.

To my eyes, this looks like a value of near 65 for x and 65 for y. Even as I’m writing this, I haven’t tested those values, but I like them because they correspond nicely to 3 calendar months (approximately 22 trading days in a month). Keep in mind that if we choose the highest peaks for our x and y value, we will likely have curve fit the system.

Come Back for Part 2

In Part 2, we’ll backtest our x and y values over our ETF portfolio, take a look at the statistics and equity curve, and decide what we might do to improve performance.

Comments »

Proposed ETF Portfolio for Rotational System

I have to say that I’m very thankful that I asked for the collective wisdom of the blogosphere. The comments were very helpful and have absolutely solidified my thinking in how to approach this next ETF rotational system.

Okay, so the final step before we jump into this system is to decide the portfolio of ETFs on which to test.

My thoughts about this portfolio are simple. The ETFs should be liquid, cover the S&P500 sectors, contain some country specific ETFs, some commodities, and some inverse ETFs. I do not want leveraged ETFs and ideally we are looking for more than 5 years of trading.

I believe the list meets my goals, except the inverse ETFs are not quite as liquid as I hoped for and some of the ETFs have only been trading for a few years.

If there are any ETFs that you believe should be added or subtracted, please let me know in the comments section.



Comments »

Thinking About a 4 Factor ETF Rotational System

Thinking about what kind of ETF rotational system I would like to trade prompted me to ruminate a while upon which factors ( constituent or element that brings about certain effects or results) should be included. I want to keep things simple, which for me means not using more than four factors.

For an ETF system, we need to be able to assign some measure to the ETF in order to compare its performance relative to all of the other ETFs in the universe. I will call this factor 1.

Factor 1: This particular factor is often a measure of strength or weakness, perhaps Rate-of-Change, as we explored in the Fidelity Select system. The factor could be a moving average, or combination of moving averages, or the slope of a linear regression line.

For this next system, we will use RSI for factor 1.

Factor 2: Our next factor concerns how long the ETF will be held before it is rotated. Perhaps not rotating until after a specific amount of trading days have passed is an unnecessary waste of a factor. In that case, we could scan the ETF universe nightly to update the ranks for factor 1, and then rotate the next day into the ETFs that have moved into the top ranking.

As I believe that time exits have the tendency to be curve-fit, I want to make sure that we have a factor 2 that is robust, or else we will discard it and simply update the ETF rankings once a day.

Factor 3: The more I learn about trading and the markets, the more I realize the important role of volatility in affecting returns. For this reason, factor 3 will incorporate some measure of volatility. Will we use volatility to penalize the ranking mechanism, as we did in the Fidelity Select System, or will we seek to trade higher volatility ETFs? This will remain to be seen.

Factor 4: When I think about building a system that I could trade confidently for years at a time, factor 4 necessarily becomes some sort of drawdown protection. Factor 4 might only need to be something as simple as a moving average filter. Perhaps the moving average filter is replaced with inverse ETFs, and we instead diversify among a number of ETFs.

Other considerations, which I classify as filters rather than factors, concern how we decide which of the ETFs to exclude from our universe. Perhaps we only want ETFs that are liquid or perhaps we just want to include the S&P500 sectors. I have often wondered if these things that I consider filters are actually factors. This issue would make for an interesting discussion. Anyway, for now, I will not consider how we filter the universe to be a factor.

Next we will look at the basic ETF rotational system. I will outline the initial factors to be tested and will likely discuss my rationale for using them.

Comments »