Skip to content
All library documents

Generating Synthetic Order Latency from Market Feed Delays

Code Stratmill research code

Summary

This document describes a utility for creating synthetic order latency observations from market feed data. It keeps events that contain both exchange and local timestamps, resamples them at a configurable interval, and uses each interval’s last timestamps to calculate feed latency. Entry and response delays are then modeled as separate linear functions of that feed latency, each with its own multiplier and offset. The generated records contain request, exchange, and response timestamps, and can optionally be saved for later use.

The method provides a tunable input for trading simulations, including backtests that need assumptions about order arrival and acknowledgement timing. Its evidence is the implementation and parameter descriptions; it does not report empirical calibration, measured predictive accuracy, or strategy results. Synthetic delays inherit the feed’s timestamp characteristics and the chosen linear assumptions. The document does not discuss handling negative delays, validating parameter choices, or modeling latency variation beyond the resampled feed observations, so these outputs should not be treated as measured order execution times.

Key ideas

  • Feed latency is calculated as the difference between local and exchange timestamps.
  • Entry and response latency are modeled separately as linear functions of feed latency.
  • The method resamples events and uses the last timestamps within each interval.
  • Generated request, exchange, and response timestamps can be returned or saved.
  • The document offers no empirical validation of the synthetic latency model.

Tags

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