In a default backtest the fill happens at the exact price where the signal fired. Live, the order has to leave the machine, cross the network, get processed and then fill, which can take anywhere from tens to a few hundred milliseconds depending on the setup. In a quiet market that gap costs nothing. In a fast move it can cost a pip.
A simple model: add a delay parameter, say 200 ms, and fill at the first tick after signal time plus delay. This only works on real tick data; on minute bars the idea has no meaning. Then add adverse slippage on market entries, since momentum entries chase price as it runs away. Try 0.1, 0.3 and 0.5 pip and plot net profit against slippage.
A system that dies at 0.3 pip has no margin. One that survives 0.5 pip has some room. Model stops worse than targets, because a limit target fills at the price or better while a stop turns into a market order and can slip.
Then compare the model with real fills from a live log and adjust the numbers until the test resembles what actually happens.
What latency and slippage figures do you put in your tests, and how did they compare with live fills?
Modelling latency and slippage before blaming the broker
-
Amanhasnoname
- Posts: 1506
- Joined: Fri Oct 30, 2026 9:45 am