Link to Part 1
In this post, we’ll look at the components of the system, and then optimize the variables and plot the results. What we hope to find is that each variable has a wide range of settings from which to choose. What we don’t want to find is that making a slight change to a particular variable has a significant impact on performance. If a slight change has a significant negative impact on performance, it is likely that the results are not robust.
The system:
- Uses momentum measured by Rate of Change (ROC) to rank the Fidelity Sector Funds (FSFs).
- Punishes volatility by dividing into the ROC calculation a simple measure of volatility.
- Uses moving averages to set 3 levels of position sizes: 100%, 50%, or Cash.
- Uses a shorter ROC to ensure the top-ranked funds have not been recently downtrending.
- Holds each FSF for a minimum of 30 calendar days before rotating out of it (This is a requirement from Fidelity. Executing a round trip trade within 30 calendar days will result in penalties).
- The system can hold between 1 and 10 FSFs. (Because Fidelity wants a minimum of 2.5K in each fund, holding more than a few funds may not be practical for smaller accounts).
To run the optimizations, I’ve set the inputs to be exactly the same as version 1.3 of the system. The only difference is this: Instead of a completely binary moving average filter where if $SPX is below the 50 day moving average it does not rotate into a new fund, I’m using two moving averages. If $SPX is below the first moving average, any new FSFs will be invested at 50%. If $SPX falls below the first and second moving average, then the system will go to cash and will not rotate into a new fund. This is a technique that Michael Stokes wrote about here, except he uses six moving averages to set the position sizes.
Okay, with that out of the way, here are the variables and inputs used to run the optimizations:
- ROC setting is 90.
- Volatility lookback period is 252 days
- The two moving average periods used to set the position sizes are 50 and 100.
- The shorter ROC setting is 21.
- The system will hold a maximum of 3 FSFs.
I’m testing using the funds listed here on Fidelity’s site. Most of the FSFs were available to be traded before the start date of the test.
Using these inputs, let’s examine the graphs created by optimizing each variable, one at a time. First up is the ROC length.
This is perhaps my favorite graph. We can see that momentum is present across all ROC lengths. It appears the sweet spot has been somewhere between 25 and 85.
The graph above has reduced the time period of testing to just over 2 years. It is evident that the shorter ROC lengths have performed better. My theory on this is that it is due to the volatility of the last 2 years. This time period has been characterized by spikes in volatility and volatile range-trading. A longer ROC length is not able to capture an accurate measure of momentum due to the up and down trading while a shorter ROC length can catch new momentum just after it begins.
Next we will optimize the volatility look-back period. This calculation is used to lower in rank the more volatile FSFs.
Shorter is better for smaller drawdowns, while longer lengths improve CAR. Overall, the volatility look-back length can be set to just about whatever one pleases with little chance of curve-fitting.
Over the last two years, a shorter look-back has provided higher returns while not having a negative effect on drawdowns. I believe the length can be shortened (currently at 252) to improve performance.
Next, we’ll optimize the second moving average length. I am going to leave the first moving average set at 50 days. That decision reflects personal preference coupled with the knowledge that the system performed well in previous tests using the 50 day average.
There are several things to discuss about the above graph. First, if the second moving average length is set to 50, then the system goes completely to cash whenever $SPX is beneath this average. We can see that this gave the highest CAR, but also led to the highest drawdown. If the second moving average length is less than 50, then the system would go to 50% position-sizing whenever $SPX is less than the average and would go completely to cash once it dropped beneath the 50 day average. Using a 30/50 combination yields good results, but there is not a lot of room on either side of the 30 before either drawdowns increase or CAR decreases. The optimum setting looks to be somewhere between 110 and 155.
Over the past 2 years, a simple 50 day average filter has performed very well. However, we see there is still a generous sweet spot between 125 and 160. The 50/100 moving average filter could be adjusted to use a longer length.
Now let’s look at the second ROC length. This input is used to ensure that the top ranked FSFs have not been falling over the near term.
We are only concerned with the results from 5 to 41. Anything longer than that begins to weigh heavily on the ranking procedure, since the FSFs are ranked based on a 90 day ROC.
It looks like my choice of a 21 day ROC was lucky. I took a look at the greater than 30% drawdowns, and almost without exception they are all the result of one period in time when the system’s equity curve went from a nice steady uptrend to an almost straight-up surge. When the surge ended, it resulted in a large drawdown from peak equity, although the equity never actually drew down much past the pre-surge amount.
The graphs above show a similar pattern favoring short lengths over the past 2 years. A setting between 10 and 25 would probably work well.
Finally, let’s optimize the maximum number of FSFs held at one time.
The graph above shows that adding positions decreases both CAR and Max Drawdown. The best setting is likely between 2 to 5 funds. Holding 5 funds means that the portfolio would consist of approximately the top 10% of the 40 available FSFs.
Over the last two years, we would have been better off holding only 1 or 2 funds.
Well there you have it, a veritable menu of settings available. Keep in mind that every adjustment made will introduce unknowns and unintended consequences into past and future performance. The best we can do is choose robust settings and trade the system diligently and faithfully. At times it will outperform and other times it will under-perform, but over the long haul, it should beat buy and hold with reduced drawdowns.
Some of you may wonder why I put together all of this for the blog. It does take a significant amount of time. I create the graphs for my own use, and writing about them solidifies my thinking as well as sparking the creative juices. In fact, I have likely discovered a simple way to make the ROC length adaptable to market conditions, and I think it will improve results. I do not believe I would discovered this had I not written this post.
Finally when designing a system to trade for years into the future, it is important to know the system inside and out, how each variable affects the other variables, and so on. A complete understanding of the system’s intricacies builds trust and faith which will be necessary to draw upon when the system hits the inevitable rough patch.
Part 3 will present the “finished” system.
Comments »