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

TJ:back-testing makes bad assumption (or my coding!?)



PureBytes Links

Trading Reference Links

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