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

[amibroker] portfolio backtest - I get different results



PureBytes Links

Trading Reference Links


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






------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/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/