Back

How to test this ETF rotation strategy?

New member here, trying to come up to speed on learning how to use the platform.

I'd like to test the system described here:

http://www.the-lazy-trader.com/2015/01/etf-rotation-systems-to-beat-market-American-Equities.html

I found the GlobalRotation strategy and played with it, but can't figure out a couple of things (at least a couple!):

1. How to pick the top 3 ETFs, rather than just the top 1 ETF? I see there is a "First" method but how to pick ETF(2) and ETF(3) in the ranking array?

2. How to implement the volatility criteria to make a ranking decision. I'm not yet clear on how to use any criteria to make buy/sell decisions. 

I know this is basic stuff, but I've got to start somewhere and would appreciate some pointers on how to do this.

 

Thanks!

 

Dave

Update Backtest








Hi Dave,
I attached an ETF Global Rotation Algorithm as a working example for you to build on.
Answering your questions:
1. Using the code below to select the top 3 ETFs:

var bestGrowth = orderedObjScores.First();
var ETF = orderedObjScores.Range(0,3);
// ETF[0] equals best growth ETF, same as bestGrowth
// ETF[1] is the second best growth ETF
// ETF[2] is the third best growth ETF

2. You can add a volatility criteria using the standard deviation indicator like this:

var oneMonthVolatility = STD(symbol, 30, Resolution.Daily);

After you include this indicator in your code, you can pass it to the SymbolData object and include it in the ObjectiveScore member with the weights you define with some optimization process. This score is your ranking criteria. You can use this criteria to buy the ETF with the highest score (like we do in this algorithm), you can sell the ETF with the lowest score, you can buy the top half and sell the bottom half, etc...

I hope I could help.

P.S.: I suggest you to use this algorithm as a starting point. You could change the symbols to reflect that article, change the indicators (use ROCR - RateOfChangeRatio instead of MOM - Momentum) and modify the weights.

0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Hi Alexandre!

Thank you very much for your assistance. I'll review and give your suggestions a try.

Much appreciated!

0

Update Backtest





0

The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.


Loading...

This discussion is closed