Skip to content
All library documents

Latency Models for High-Frequency Trading Backtests

Article Stratmill research code

Summary

The document explains why a high-frequency trading backtest should account for delays between exchange activity and a trader’s system. It separates latency into feed latency, order-entry latency, and order-response latency, distinguishing when market data arrives, when an order reaches the matching engine, and when its acknowledgement or fill reaches the local system.

It describes three ways to model order latency: fixed delays, interpolation from observed order-latency records, and artificial estimates derived from feed latency when live order data is unavailable. The interpolation approach relies on sufficiently fine-grained measurements, which can be collected by regularly submitting orders that cannot execute. The document also notes that users can implement a custom model. It provides no benchmark results or detailed guidance on choosing parameters, and the quality of data-based estimates depends on the availability and resolution of relevant latency observations.

Key ideas

  • Feed latency measures the delay between exchange events and their receipt by the local system.
  • Order-entry latency affects when an order reaches the exchange, while response latency affects when acknowledgements and fills arrive.
  • A constant model represents delays with fixed values, while interpolation uses measured order-latency data.
  • Feed latency can serve as the basis for artificial order-latency estimates when live order data is unavailable.
  • Custom latency behavior can be implemented, and model accuracy depends on the quality of available measurements.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.