Fidelity Select Sector Rotation Strategy: Wrap Up
This post serves primarily to serve as one link point for this series of posts, but I have included some additional testing results.
In Part 4, it was suggested in the comments section that it might be helpful to perform an analysis on the effect of start date on system performance. I agreed.
Although the data goes back to 1985, the volatility calculation needs 252 bars to make its calculation, so the first trade didn’t take place until 6/20/1986. I updated the fund data tonight, so the ending date is today.
The start date skips around a bit due to the 50 day moving average filter kicking in and keeping the system in cash for almost a month in July and early August.
Changing the start date did not make much difference in the annualized return. I also kept an eye on max system drawdown, and it also varied little. Honestly, I expected more variation in both measures. I’m not sure exactly what to make of the lack of variation. I’m willing to entertain any ideas from the community in the comments section.
On to the next system!!!





Hi wood,
could you please email me AFL code and the trades. Would like to study.
thanks
Bill
Dumb question, but what’s an AFL code?
AmiBroker Formula Language = .afl
Wood,
can you please email me afl code and list of transactions
billrider321 at yahoo.com
thanks
I believe the similar CAGR’s with the different start dates are an outcome of the moving average filter. Once each backtest “run” hits a time period where the system is in cash for longer than 30 days, each run will re-enter the market at the same time and have the same trades going forward.
Specifically, I think each run went to cash during the Sept.’86 crash, and all runs re-entered 10/29/86 (SP500 back above 50MA) after which time, each run probably had the same buy / cash signals. I quick spot check of the specific trades for each start time would let you know. Probably only the first one or two trades are different.
I agree and that was one of the first thoughts/suspicions that I had too.
Well, I sure didn’t mean to send you astray with my warning about start date. Eman points out that depending on how you treat the 50MA filter, you could be synching up no matter what the start date. My findings were based on a strict 30-day trading period, in cash or in funds.
Another point: how many selects were active in 1986? Yahoo provides data for most of the selects only back to 1/1987 (FSUTX goes back to 6/1985, some others start after 87).
In any case, there are many ways to look at this relative strength model, and all show large returns relative to the market, and the effect has persisted after it became well known.
Great work. Thanks!
Astray? Nah, I do this for fun!
Before I employed the MA filter, I noticed some variations based upon the start date. And furthermore, adding the 252 bar lookback alters the start date itself, which may be more of the reason that penalizing volatility helped with returns. What I mean is that it may be the 252 bar adjustment that made the difference, more than penalizing volatility. No doubt the equity curve was smoother due to the penalty, but without more testing, hard to say if it was the reason that CAGR increased.
I have only FSUTX showing up in the backtesting in 1986 and FBIOX starting in 1987. It looks like that in 1988 many more funds became available.
Oh, and to anyone else, it should be considered pure luck that a 50day MA filter mitigated the 1987 crash. We would not expect us to be so lucky next time.
Just for reference, what was the CAGR of the S&P 500 since 1986? Anyone?
from 6/1/86 to 1/20/09: 5.78% with a max DD of -56.45%
Isen’t having such little variation in performance when changing a variable that should’nt change the underlying efficacy of the system actually prove its worth? It is always worrying when you have a system and you can dramatically change its performance by changing what should be unimportant components.
e.g. if I have a system that trades in a mutliweek cycle and I alter that cycle to coincide with the cycle of the moon and peformance jumps 12% then, unless I can fully explain why this is the case, I have just cast doubt over my system since it apears to have a high chance of just being a bunch of variables that are optimized from backtesting but cannot provide even romotely accruate forecasts.
I agree…
Hi Wood,
What were the results of running the test based on end of month seasonality, as Zack suggested? I was going to suggest a similar test idea.
Thank you for an insightful and helpful blog -
t., thanks, glad you have enjoyed the blog.
I think that it was Thomas that suggested that. Right now I do not have any plans to test it, mainly because I have projects coming out of my ears
Just doing some triage in terms of time. Its a good idea though, and if I get around to it, I’ll post the results.
Thanks, Wood! I hear you re projects coming out of your ears, I mistakenly thought you already tested it.
Woodrow..Have you had a chance to email out the .afl file for this? Tell me to simmer down if I am being too impatient here.
Johnny, sorry, I got about 10 requests for the .afl and I must have missed yours. No problem, I’ll send it to you this evening.
Hi Wood,
Nice work.
Wonder if a fairly loose daily stop (perhaps ATR stop) would help drawdown without penalizing returns too much. Or whether picking the top 2 funds would help.
Would you kindly email the rotation AFL code and transaction list?
Thanks in advance,
Gary
Gary, thanks.
I have not tried a loose daily stop, as it would not be able to be used until after the 30 day min hold time has been met. I would rather leave $$ in the fund and use the MA filter or the normal rotation action to switch up.
Wood
Although I didn’t disclose my specific algorithm for a variety of reasons, I’ll happily submit (again) that weighting multiple time frames and smoothing the subsequent result does wonders to such methodologies. Furthermore, I suggest forcing some level of diversification along the sector, style and country spectrums, and that “sliding right” into new signals may also help (surfers will understand). Excellent series. All the best, Jeff P a.k.a Mrkt_Rwnd
Thanks for the ideas Jeff! Glad you enjoyed the series. Of course you know that your series on rotational systems is what prompted me…
By the way, I grew up surfing, but can’t figure out what you mean about sliding right into new signals.
Wood, Could you add me to the list for the AFL code on this idea.
Thanks, Jim
Am I on the right track here…I am new to AB and for sure not a programmer (So jealous of you that are). Anyway, is this how I run this puppy?
Wait for SPX to cross above 50 DMA…the load .afl code into AB. Run Exploration against the Fido Select List. Choose highest ROC Fido fund on that day. Wait 30 days repeat (as long as SPX is above 50 DMA).
Sound Correct?
Johnny, I’m not much of a programmer. Like anything else, it is a learned skill.
Load the FSF watchlist.
Run the exploration.
Sort by “score” to get the volatility penalized rank.
Sort by “rocx” to get the raw ROC score
If SPX closed above the 50 day average, then you will take the FSF with the highest “score”.
Wait 30 days, and repeat.
After 30 days, if the SPX is below the 50 day, sell and go to cash.
last question I promise. Why do the scores and ranks change when I change the range/date? I get different results depending on the number of days or date range I explore on? Any suggestions?
I’ll have to try when I get home. Can you be more specific?
The simple answer probably is that the ROC and volatility will change when using different dates, but I might be misunderstanding your question.
Sure.
1. N=100 days
http://www.screencast.com/users/geckoman/folders/Jing/media/02ac523c-5318-4138-92af-917a9a2a220f
2. N = 300 days: Notice the results/scores change.
http://www.screencast.com/users/geckoman/folders/Jing/media/c427ea76-74f0-4a48-916c-6b045bd10ff3
3. Using a long date range.
http://www.screencast.com/users/geckoman/folders/Jing/media/839ff532-0ff6-4879-b68f-59bc5c8b3007
Does that help?
The simplest, quickest answer is that you are using the “explore” function in a way that it is not really designed to be used. Read the AmiB literature on what an exploration does.
Start with N=1 and see if that doesn’t make sense. Then sort the column by clicking on “score.”
Thanks for taking the time. I know it’s not easy replying to really remedial questions but I sure do appreciate it.
Did that help? I was at work and couldn’t write much.
Basically, when you have n=1, the exploration will cycle through all of the FSFs, and will calculate all the metrics for that day, using whatever lookback periods were necessary to calculate that day’s metrics.
When you use more than n=1, then you are calculating metrics for this day, and the day before, and the day before that, and so on.
Using more than n=1 can be helpful, especially if you forgot to run the exploration for a day or so. Then run it for n=2 or 3, and look back to see what the metrics were.
I hope that is clear.
Here is what it looks like with N=1. ROC values aer zero. Is it run properly now?
http://www.screencast.com/users/geckoman/folders/Jing/media/8d91bcd4-0cd3-489a-bed8-11b6b1319d3d
Johnny, did you update your data before running it?
Please elaborate on updating data. I am using IQ feed eod feed that updates daily.
Actually looks better today right? Maybe data feed updated like you said?
http://www.screencast.com/users/geckoman/folders/Jing/media/b707496a-5e71-4cb6-aa5a-12a2a0b2fb1c
follow me on twitter: geckojb
Greetings –
You have a very nice site, with good information.
When you have a chance, please send me a copy of the afl for your rotational system.
Thanks,
Howard
Howard, thanks for stopping by and thanks for the compliments. They mean a lot coming from you.
How coincidental that you stopped by here today. I was outside today cleaning out my car, and under the front seat I found your business card which you had included in the last book I ordered from you. I almost threw it away with the rest of the junk under the seat, but kept it as a reminder to see how your newest book is progressing.
Serendipity, maybe?
I’ll send you the AFL today.