Login Page - Create Account

Support Board


Date/Time: Fri, 03 May 2024 23:43:16 +0000



Post From: Accurate backtest not accurate under specific conditions

[2016-06-06 12:16:08]
phaedonk - Posts: 350
There are conditions under which this statement ( Accurate Replay Duration | Post: 79634 ) is not true.
I use two formulas:
AV3=IF(($J$41-$J$42)>10/86400,1,0)
AW3=IF(($J$41-$J$43)>10/86400,1,0)
for the sole purpose to use them as a toggle (0 to 1) to force the Sell and Buy entries to temporarily change state, in order for new orders not to be ignored. Got this idea to create an event from tomgilb.

Essentially, for 10 seconds after trade entry or exit I want the Entries to become zero (I'm using the result of the above formulas in the entry formulas) and then they can go back to 1.
When I replay the chart at a fast speed (more than 300, with Accurate option enabled) the spreadsheet does not realize that the formula's result is now 0, and so skips the next orders. When I reduce the replay speed everything works fine.

I have found a temporary solution in using 30 seconds in the above formulas, because I need fast backtesting for multiple symbols. With 30 secs I can choose a very high speed (10000) and everything runs fine. But it is not optimal and could potentially create problems in very fast markets.

So, it seems that under these conditions the speed of the replay plays a role in how accurate the backtest is.

PS. By the way, the sole reason I'm creating a toggle like this is because I'm forced to cancel all orders on Exits (and not just the attached orders of the position, see Spreadsheet Trading- Open/Close order type (and CancelAllWorkingOrdersOnExit))
Date Time Of Last Edit: 2016-06-06 17:22:53