Home Markets News Equities Quantum Papers Microstructure About
Paper 09 Execution Backtest Market Impact Latency

Slippage and Latency Modeling in Backtesting

Backtests are usually too optimistic for one simple reason: they assume the market waited for you. This paper decomposes latency, models fill prices with market impact, and shows why PnL arises from signal after implementation.

Abstract

Backtest engines routinely overstate strategy performance by ignoring the mechanics of order execution. This paper presents a latency decomposition framework and fill-price model incorporating spread crossing, market impact via square-root law, and stochastic drift during the decision-to-fill interval. Realistic slippage modeling is shown to be inseparable from strategy definition itself.

Key Takeaways

  • Total latency decomposes into decision, queue, network, and venue components, each contributing to adverse price movement.
  • Fill prices should be modeled as the future midprice plus half-spread, market impact, and noise, not the current mid.
  • The square-root impact model calibrates execution cost as a function of volatility and participation rate.
  • A strategy with a 1.5 Sharpe in a frictionless backtest may collapse below 0.5 after realistic fill modeling.
  • PnL arises from signal after implementation. Slippage is part of the strategy definition, not a cost assumption.

Introduction

Backtests are usually too optimistic for one simple reason: they assume the market waited for you. Between the instant a signal is computed and the instant an order is filled, several things happen. Threads wake up, messages are serialized, risk checks run, gateways forward packets, the venue processes the order, and other participants move the book. By the time the fill occurs, the price you thought you traded may no longer exist.

Latency Decomposition

Latency Decomposition
$$\Delta t = \Delta t_{\text{decision}} + \Delta t_{\text{queue}} + \Delta t_{\text{network}} + \Delta t_{\text{venue}}$$

A practical fill model for a buy order (where \(M_t\) is the reference midprice at decision time):

Fill Price Model
$$P_{\text{fill}} = M_{t+\Delta t} + \frac{1}{2}S_{t+\Delta t} + I(q) + \epsilon$$

Market Impact

A commonly used specification for market impact uses a square-root law:

Square-Root Impact Model
$$I(q) = \eta \sigma \sqrt{\frac{q}{V}}$$

where \(\sigma\) is volatility, \(V\) is available volume, and \(\eta\) is a calibrated coefficient.

Python Fill Simulator

fill_model.py Python
import numpy as np

def simulate_fill(mid, spread, sigma, q, V, latency_ms, side, eta=0.1):
    # side: +1 for buy, -1 for sell
    impact = eta * sigma * np.sqrt(max(q, 1) / max(V, 1))
    noise  = np.random.normal(0, spread * 0.05)

    # latency drift: price can move during delay
    drift      = np.random.normal(0, sigma * np.sqrt(latency_ms / 1000.0))
    future_mid = mid + drift

    fill = future_mid + side * (0.5 * spread + impact) + noise
    return fill

# Example
for side in [1, -1]:
    f = simulate_fill(
        mid=100.0, spread=0.02, sigma=0.01,
        q=10_000, V=1_000_000, latency_ms=8, side=side
    )
    print(ff"Fill ({'buy' if side > 0 else 'sell'}): {f:.4f}")

Implications

A strategy with a 1.5 Sharpe ratio in a frictionless backtest may collapse below 0.5 after realistic fill modeling. Mean reversion strategies are especially vulnerable because edge decays quickly and costs are frequent. The broader lesson: PnL does not arise from signal alone — it arises from signal after implementation. Slippage and latency are not "cost assumptions." They are part of the strategy definition.

⚡ Daily Stock Signals Dashboard
180 liquid US equities scored against 30 technical signals after each close. Free, rules-based, research use only.
View Signals →

Assumptions

Robustness: what would change the conclusion

A single flat cost assumption is the most consequential modelling error in most backtests. Using a fixed number of basis points makes cost independent of size, volatility and liquidity — the three things it actually depends on — and the error grows with turnover, so it punishes exactly the strategies that look best gross.

Impact coefficients are regime-dependent. The constant in front of the square-root term is fitted, not universal. It widens in stress and differs by venue, sector and market-cap band.

Adverse selection sits outside this model. Spread plus impact plus delay does not capture the cost of being filled by better-informed flow. That component is what VPIN attempts to measure, and ignoring it biases cost estimates downward for passive strategies specifically.

QuantMedia has not validated these coefficients on its own executions. This site runs no execution and holds no fill data, so nothing here is calibrated against realised trading. The model is presented as the standard framework with its parameters exposed, not as a fitted result.

Limitations

References

QuantMedia research is independent and not peer reviewed. These references are the primary sources the analysis draws on; readers are encouraged to consult them directly rather than relying on this summary.

Research record

Author
Cemil Ertürk · QuantMedia Research
Published
February 20, 2026
Last material revision
August 16, 2026
Research version
1.1
Topic
Execution
Review status
Independent research. Not peer reviewed.

How to cite this research

Cemil Ertürk. "Slippage and Latency Modeling in Backtesting." QuantMedia, 2026. https://quantmedia.io/paper-slippage-latency-modeling.html

BibTeX

@misc{erturk2026slippage,
  author       = {Ert{\"u}rk, Cemil},
  title        = {Slippage and Latency Modeling in Backtesting},
  year         = {2026},
  howpublished = {QuantMedia},
  url          = {https://quantmedia.io/paper-slippage-latency-modeling.html},
  note         = {Accessed: <date>}
}
Get Research Updates
Daily pre-open briefing with market signals, research highlights, and quantitative analysis. Free, no spam.
No spam. Unsubscribe anytime. Privacy Policy