Support Board
Date/Time: Mon, 20 Jan 2025 11:24:33 +0000
Post From: Error in backtest for target order when trail stop is used
[2018-05-17 13:48:06] |
User470516 - Posts: 78 |
Dear SC Team, I have written a trading strategy that uses attached orders defined on the trade window. I am using the DAX Future. I backtest this strategy using (i) replay backtest and (ii) bar based backtest. I use a target limit order offest equal to 30 ticks and a stop or trail stop with an offset also equal to 30 ticks. (i) When using the replay backtest or the replay, it appears that he P&L of a winning trade regularly exceeds the 30 ticks limit and is equal to 31 ticks which is impossible. Also sometimes the trade activity log reports runups or drawdowns in excess of 1000 Dax Future points! I am aware of the documentation "Notes about Runup, Drawdown, Maximum Open Position Profit/Loss, Entry Efficiency, Exit Efficiency, Total Efficiency fields". It says: "If you are performing simulated trading and a Trade has spanned both a replay and real-time data, this can definitely cause inaccuracy with the Runup, Drawdown, ..." Although I do not undestand what is meant by "a Trade has spanned both a replay and real-time data" (could you explain please?), I would like to check with you if you believe that such errors fall into the category of inaccurate calculations dealt with in those Notes of the Documentation? (ii) when using the bar based back test and a stop and target, backtesting calculation are fine except for the above mentionned runup and drawdown errors. However if I use a trailstop instead of a plain stop, almost 100% of the winning trades enjoy a profit that by far exceeds what is technically possible with the target set at an offset of 30 ticks. Would you have hints about what is happening or is it an misfunctionning? Thank you for you support. Regards, Laurent |