August 23, 2017

Sector trading using the 200-day moving average – Part 2

Several readers asked for additional tests to be done on the strategy on Sector trading using the 200-day moving average. We will be testing allocated 11% per ETF instead of 10%, using asymmetric number of days and adding IEF to the SPY MA200 10 day test.

SPY MA200 10 day

Buy Rule: Buy SPY when it is above the 200-day MA for 10 or more days. Sell IEF.

Sell Rule: Sell SPY when it is below the 200-day MA for 10 or more days. Buy IEF.

Instead of being in cash when the SPY is under the MA200, buying IEF adds to the CAR and helps MDD. This is a good modification to the strategy.

 

Asymmetric Days

If the Select Sector SPDR ETF (XLY, XLP, XLF, XLE, XLV, XLI, XLB, XLK, XLU) is above its 200-day moving average for the last X (1, 5,10,15,20) days, then buy 10% of that ETF. If it is below the 200-day moving average for the last Y (1, 5,10,15,20) days, then sell it and allocate to IEF, iShares 7-10 Year Treasury Bond.

The first 5 rows are the top results of the test. The bottom row (rank 7) is the 10/10 row which is the original test. A very small improvement in CAR and MDD. It is not worth the complication. But it shows that the strategy is robust on this parameter.

11% Allocation

Instead of allocating 10% per Sector ETF, we will now allocated 11% per ETF. If all sector ETFs are a buy we will have 0% in IEF. We will also do asymmetrical days.

The first 5 rows are the top results of the test. The bottom row (rank 8) is the 10/10 row which is the original test. We have another small improvement in CAR but in this case the MDD gets little worse. Again, it is not worth the change.

 

Spreadsheet

Fill the form below to get the spreadsheet to see the results of these tests. I tested very large range of moving average lengths for the “11% allocation” test.

Update on Machine Learning Articles

I had an overwhelming response to write these articles. I hope I have not set expectations too high. I will be investigating how I can write these articles to be of value to you and not simply something you can find elsewhere. A beginner’s viewpoint would be good. But this also sets up that I will likely make incorrect statements. I don’t want to mislead people with bad information. I know these articles would be beneficial for me but I want to them to be beneficial to you too.

Final Thoughts

These tests did not really improvement the original results. I find often that my original test is the best and everything I try afterwards is a marginal improvement.

As always send me your ideas and if I get enough, I will test them and share the results.

Backtesting platform used: AmiBroker. Data provider: Norgate Data

Good quant trading,

Fill in for free spreadsheet:

spreadsheeticon

Click Here to Leave a Comment Below

Leave a Reply: