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

[amibroker] Tomasz, comments please - Re: portfolio backtest - I get different results



PureBytes Links

Trading Reference Links


Larry,

Check archives

http://www.amibroker.com/listarchive.html



--- In amibroker@xxxxxxxxxxxxxxx, "onelkm" <LKMCD1@xxxx> wrote:
> 
> Tomasz
> Could you comment pleae? I assume I made a simple mistake, but 
after 
> reviewing posts related to this problem and looking all through 
the 
> manual ..... I'm stumped!
> Thanks Larry
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "onelkm" <LKMCD1@xxxx> wrote:
> > 
> > Terry
> > Thanks for the input. I checked out your comments, but they 
don't 
> > seem to apply here because my "PositionSize" is always 100% of 
> > portfolio equity and I am only trading one fund at a time. Other 
> > curious observations: Both systems chose the same ticker for the 
> > first 2 trades and the buy/sells are on the same days. Then, for 
> the 
> > third trade, when Position Size Shrinking is ON, the third trade 
is 
> > made on the same day as the sell, but with Position Size 
Shrinking 
> > off, the trade is taken the next day, yet the buy delay and sell 
> > delay =1 for both cases. The third trade selected the #2 ranked 
> fund 
> > instead of the top ranked fund when Position Size Shrinking is 
ON; 
> > with Position Size Shrinking off, the correct top ranked fund 
was 
> > selected. Activate stops immediately and Allow same bar exit 
boxes 
> > are not checked.
> > 
> > Any additional help by you or anyone else would be most 
appreciated.
> > Larry
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, Terry <MagicTH@xxxx> wrote:
> > > (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 --------------------~--> 
Has someone you know been affected by illness or disease?
Network for Good is THE place to support health awareness efforts!
http://us.click.yahoo.com/Rcy2bD/UOnJAA/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/