[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Rotational Trading and Position Sizing Problem



PureBytes Links

Trading Reference Links

I am trying to do a very simple rotational trading backtest where I am
testing using the below code.  However, the position sizing is very
messed up.  For example, I have the initial equity setting set at
$100,000 and the first 8 trade of a series (all with the default of
one position only and Buy/Close delays set at 0) taking positions of
less than $10,000.  I've tried different toggling of the the allow
position size shrinking and use previous bar for position sizing to no
avail. Even fixing position size at a small value doesn't seem to help.

Help! 

A2 and B2 code here

Score = ((A2*.5) + (B2*.5))+10;//add 10 to prevent shorts

SetBacktestMode( backtestRotational );

WRH = Param("Worst Rank Held", 1, 1, 5, 1); 
SetOption("WorstRankHeld",WRH);

HMB = Param("Hold Min Days", 7, 1, 21, 1);//or min bars
SetOption("HoldMinDays", HMB);

PosSize = Param("Position Size", 1, 1, 5, 1 );
//PosSize = Optimize("Position Size", 1, 1, 5, 1 );

SetOption("MaxOpenPositions", Possize ); 
SetPositionSize( 100/PosSize, spsPercentOfEquity ); 
//SetPositionSize( 10000, spsValue ); 

PositionScore = Score;
//ApplyStop( 3, 1, 21, 1, volatile = False, ReEntryDelay = 0 );



------------------------------------

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/