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

[amibroker] Re: Position sizing in backtest



PureBytes Links

Trading Reference Links

One way to do it would be to write custom backtester code to iterate through the Signal objects and override the PosSize property to not exceed whatever value you consider to be a reasonable maximum.

Mike

--- In amibroker@xxxxxxxxxxxxxxx, "kevinkee20" <kevinkee20@xxx> wrote:
>
> Hi,
> 
> I have a beginner's question on position sizing.  
> 
> In some of my backtests, using a fixed risk per trade of, say, 2.5% of the capital, the initial capital grew from $100k to more than $10 millions.  This means my risk per trade also grew from $2k to $200k per trade in monetary term.  Is it possible to set the position size to be of certain percentage of the capital, but to an absolute monetary amount if the capital exceeds certain number ?
> 
> I tried the following but it didn't seem to work.
> 
> Capital = 100000;
> PositionSize = IIf(Capital < 800000, -2.5, 20000);
> SetOption( "MaxOpenPositions", round(Capital*0.9/PositionSize) ); 
> 
> Thanks in advance.
> 
> Kevin
>




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

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

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

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/