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

Re: [amibroker] TJ:back-testing makes bad assumption (or my coding!?)



PureBytes Links

Trading Reference Links

Hello,

Indeed there is some (conceptual) problem with this and
is caused by the fact that backtester does not really know when exactly the stop was triggered. Without intraday data backtester
does not know when exactly during the day given price level is reached. Of course you are right - open price is the first one and
therefore this trade
should be exited at open but... this is not that obvious for the backtester. Why? Except two cases (open and close) the price itself
does not imply
the time when given price is reached. Simply imagine that you specify the sellprice as:
sellprice = Open + 0.01;
In this case no one can really tell when this price level during the day is reached. I may add a special case for exactly buyprice
== open but
anyway there is no fully general solution to this problem.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: "dwjukagr" <djsiewert@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, July 15, 2002 3:15 AM
Subject: [amibroker] TJ:back-testing makes bad assumption (or my coding!?)


> In comparing paper trading results on a potential system with AB back-
> test results, I've found a discrepancy that I haven't seen noted on
> this board.
> When using both Applystop and the
> Buy = ExRemSpan(Cond1,Out);
> Sell = Ref(Buy,-Out); (with sell price=Open)
>
> code together, in the situation in which the Sell condition and the
> Applystop-profit target condition are both true, AB assumes the
> Applystop condition, even though the system really would have sold at
> the Open, and the profit target could not have been hit.
> In the same vein, if both Applystop - stop loss and Applystop -
> profit target conditions are hit on the same day, the profit target
> is always used in the backtesting results. Not necessarily an error,
> but something to keep mind when testing in very volitile
> conditions/stocks.
>
>
> DW
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>