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

Re: [amibroker] portfolio backtest - I get different results



PureBytes Links

Trading Reference Links

(Without checking your data below)... This means you have a losing trade 
somewhere that takes your equity below your starting value. When Allow 
Position Size Shrinking is ON the trade will be taken with whatever 
capital you have left. If it's not checked, the trade will be skipped 
because you don't have enough money.

Terry

onelkm wrote:

>I can't figure out why this happens – When I run a portfolio  
>backtest I get different results depending on whether the "Allow 
>position size shrinking" box is checked in  "Backtester Settings" yet 
>I am only trading one fund at a time. I looked through the help files 
>but found nothing. Here is a simple example of the code:
>
>pos        = Optimize("pos",             1,     1,     4,     1); 
>SetOption("MaxOpenPositions", pos ); 
>per1       = Optimize("per1",           43,     5,    60,     1); 
>gain=(C-Ref(C,-per1))/Ref(C,-per1); 
>amt1       = Optimize("amt1",           45,     1,    60,     1); 
>amt2       = Optimize("amt2",        0.044,  0.01,   0.3, 0.001); 
>Buy =gain>amt2; 
>Sell=0; 
> 
>PositionSize = -100/pos; 
>PositionScore = 10000+ ROC(C,amt1) ;  
>trail      = Optimize("trail",         2.6,   0.5,     6,   0.1); 
>ApplyStop( stopTypeTrailing, stopModePercent, trail, True ); 
>Loss       = Optimize("Loss",          0.3,   0.1,     3,   0.1); 
>ApplyStop( stopTypeLoss, stopModePercent, Loss, True ); 
>
>Also, when the "Allow position size shrinking" box is checked, the 
>fund selected is not the highest ranked fund according to the 
>criteria used in the "Positionscore" equation. However, when the box 
>is not checked, the highest ranked fund is selected.
>Any clues why this happens???
>Thanks
>Larry
>
>
>
>
>
>
>
>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 other support material please check also:
>http://www.amibroker.com/support.html
>
> 
>Yahoo! Groups Links
>
>
>
> 
>
>
>
>
>  
>


------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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 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/

<*> 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/