Monthly Sector Rotation

Markets: FCYIX, FDFAX, FIDSX, FSCPX, FSDPX, FSENX, FSPHX, FSPTX, FSTCX, FSUTX

This system trades the monthly close ranked by the average ROC of 3, 6, and 12 months and divided that by average ATR of 1, 2, and 3 months (risk-adjusted measure). Hold the top 3 funds and drop off rank is 5. Also, an market timing aspect was included, (faber style), simple 10month SMA.

Performance

Amibroker  Code

#include <kpi.afl>;
SetOption("CommissionAmount",0.0);
SetOption("InitialEquity", 100000);
SetOption("MaxOpenshort",0);
MaxPositions = 3;

SetOption("MaxOpenPositions", MaxPositions  );
SetPositionSize( 100 / MaxPositions, spsPercentOfEquity );
SetBacktestMode(backtestRotational);
EnableRotationalTrading();
SetOption("WorstRankHeld",5);
SetTradeDelays( 1, 1, 1, 1 );
BuyPrice 	        = Open;

/////////////////////////////////////////////////
rscore 			= ROC(Close, 3);
rscore1 		= ROC(Close, 6);
rscore2 		= ROC(Close, 12);
ATR1			= ATR(1);
ATR2			= ATR(2);
ATR3		        = ATR(3);

/////////////////////////////////////////////////

averagescore1		= (rscore + rscore1 + rscore2)/3;
averageatr		= (ATR1+ ATR2+ ATR3)/3;
averagescore 		= averagescore1 / averageatr;

Condition1		= IIf(C>MA(C,10), True,False);
PositionScore		= IIf(Condition1, 10000+averagescore, 0);
Advertisements

2 comments

    1. Hello Dardeen,

      I don’t Amibroker anymore but from my memory, it should be a file with custom performance metric. I remember getting the file from Frank Hassler of Engineering returns. Go check out his blog as I think it may be uploaded there.

      Mike

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s