I've been trying to duplicate the results in this CXO article:

http://www.cxoadvisory.com/blog/internal/blog12-22-09/

It's a rotational system that trades the top fund from the SPDR Select series 
based on a 6 month return as long as it is above the 10 month SMA.

I'm not testing it monthly, but here's the daily code I've come up with:

SetBacktestMode(backtestRotational); 
SetTradeDelays(0,0,0,0); // everything delayed 1 day 
SetOption("UsePrevBarEquityForPosSizing", True); 
SetOption("MinShares", 10); 
SetOption("AllowPositionShrinking",True); 
SetOption("AccountMargin",100); 
 
Totalpositions = 1;

MAFilter = C > MA(C,200);
PositionScore = MAFilter * ROC(C,120); 
PositionSize = -100/Totalpositions; 
 
SetOption("WorstRankHeld", Totalpositions + 1); 
SetOption("MaxOpenPositions", Totalpositions ); 
 
m = Month();
newMonth = m != Ref( m, -1); 
PositionScore = IIf(PositionScore < 0, 0, PositionScore); // Long only
PositionScore = IIf(newMonth, PositionScore, scoreNoRotate);

My portfolio consists of the nine SPDRs - XLF,XLE,XLP,XLY,XLI,XLK,XLV,XLB,XLU

I've been unable to duplicate anything close to their results - anybody have 
any idea of what, if anything, I'm doing wrong?

Reply via email to