The backtester will close out all open positions before calculating its 
statistics.

Run your backtest again with the AA Report settings set to display the trade 
list (see Report tab here: http://www.amibroker.com/guide/w_settings.html).

If you see many trades listed as "Open Long", then they will skew your results. 
If this proves to be your problem, then the solution is to write custom 
backtest code that calculates the statistics using only the trades found in the 
closed trade list, ignoring trades found in the open position list (see 
http://www.amibroker.com/guide/a_custombacktest.html)

Mike

--- In [email protected], "MD" <dimensi...@...> wrote:
>
> Hi,
> i am trying to do something that i think is rather simple, but having a heck 
> of a time doing so in Amibroker.  Basically i want to figure out the historic 
> percentage of the market closing 1 OR 2 days after any given day. the code is 
> below:
> 
> FixedDollarAmount = 1000;
> SetBacktestMode( backtestRegularRawMulti ); 
> buy = c; 
> sell = c > valuewhen(buy, c);
> applystop(stoptypeNBar, stopmodeBars, 2);
> PositionSize = FixedDollarAmount;
> 
> The system should buy EVERY day, and sell the next day if it's a higher close 
> or always exit on the 2nd day.
> 
> I want this to run as a backtest so i can see the percentage of win vs loss.  
> The problem is, it runs fine, but the percentages are way off when tested 
> against Yahoo's data from 1/1/1999 to current day.  I know the historic odds 
> of a close 1 or 2 days later is around 68%, however my backtest is returning 
> 51%.
> 
> Can anyone tell me see any issues with my script or what may be going on here?
> initially i thought the system may be running out of cash, as it uses the 
> default 100,000.  But that does not seem to be the case.
> 
> thank you.
>


Reply via email to