Back

Simple Global Market Rotation Strategy

Hey all,

Since I'm fairly new here, and to the algotrading field in general, I've decided to start by coding some simple strategies to get myself warmed up. This is my attempt at implementing the strategy originally described here.

I'm sure that there are many things I could improve, and even things that I might not have completely understood from the description of the strategy itself. Any feedback would be welcome, and maybe this simple project could help other newbies get started as well.

Best,
Tomer
Update Backtest








Update: I've made a simple change to the algorithm, so that if it decides to invest in the same ETF it doesn't bother liquidating and re-buying. It improves the results slightly, bringing the loss rate down to 31%, the CAGR up to 23.893%, average win up to 10.41%, the number of trades down to 52, etc...
2


Thanks Tomer, I'm new here on QC but excited to try this one out, have been following Frank Grossman and playing with GMR-like rotations for the last month or so.
-Paul
0

@Tomer I too have been looking at Grossman's work and have been getting daily and minute data on his 238 ETFs from Google Finance to try out some GMR algos. I am definitely cloning your work and starting to fiddle with it.

-Nick
0

I got a runtime error using this algo
0

Got it to work by changing the start date SetStartDate(2008, 1, 1); Didn't look into the real reason of the error though.
0

Its work

Adam
www.signalstrading.net
0

I've really enjoyed exploring your script Tomer. it's approachable in its simplicity and sound logic from a portfolio manager's perspective.

I'm just learning how the coding is done. In this section of the code, is it returning the price % change from the number of actual days ago or the number of trading days (price bars)?


}

public decimal getReturn(){
decimal start = prices[0];
decimal end = prices[prices.Count - 1];
return (end-start)/start;
}

0

@dime - in the code provided, the momentum indicators are updated at the beginning of each day using the closing value from the first bar of the day. So the return provided via getReturn will be based on trading days, not calendar days.

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.


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