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

[amibroker] Re: Problem in portfolio backtest: jumps in number of contracts traded



PureBytes Links

Trading Reference Links

Hi

After some day I figured it out. The size of the position is also 
affected by the  backtester settings. For example,  only x% of the 
volume of the entry bar can be longed/shorted.

regards/ huanyan




--- In amibroker@xxxxxxxxxxxxxxx, "huanyanlu" <joesan99@xxx> wrote:
>
> Hi, 
> 
> In portfolio backtest of a futures symbol, I apply a simple  
> antimartingale way of position sizing  by indicating  < 
> positionsize= -50; >  There are about 400 historical trades. 
> 
> When looking at the tradelist of the portfolio backtest, I found 
that 
> in the beginning one hundred trades or so, the number of the 
contract 
> traded changes nicely according to the result of the individual 
> trades plus the effect of the sizing algorithm , increasing or 
> decreasing by one contract at some point co-defined by the margin 
> requirement of the contract.  Thus the contract traded increased 
from 
> 5 contracts to 11 contracts. Then something strange happens:  after 
a 
> small losing trade, according to the cum profit ,the initial equity 
> and the margin requirement, the number of contracts to be 
> bought/shorted in the next trade should remains at 11 contracts, 
but 
> in the  backtest only 9 contracts are traded. And from that point 
> on , the number of contracts traded in the backtest do not conform 
to 
> the theoretical value ( which is correct bcz it goes with the 
sizing 
> definition ) from time to time, and in the latter half of the 
> tradelist , I would see adjacent 10 numbers of contracts traded 
> as "27,27,29,25,13,30,17,25,26,30"   Till this point , I believe 
> something must go wrong here, because the result of these ten 
> individual trades should never cauze such big jumps in the number 
of 
> contracts traded.
> 
> 
> 
> I want to know if some one have met this before in the portfolio 
> backtest for a sample of more than a couple of hundreds trades. And 
> what may be the possible cause & solution to the problem.
> 
> Thanks for any hint  and Happy new year to all !
> 
> huanyan
>



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

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

*********************
TO GET TECHNICAL 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/