Latency and Queue-Aware High-Frequency Trading Backtests
Summary
This document describes a Rust framework for developing high-frequency and market-making strategies in backtests and live trading. Its replay approach uses tick-level market data and reconstructed order books, including both market-by-price and market-by-order feeds. The framework models feed and order latency and estimates fills using order queue position, with built-in or custom models for those effects. It also supports multi-asset and multi-exchange simulations.
The same algorithm code can be used for backtesting and a live bot, which the document says is available for Binance Futures and Bybit. An example applies the framework to a Binance Futures grid strategy. The document provides no performance results or validation evidence for the framework’s simulations. It cautions that the project is in early development, breaking changes may occur, and the live bot has not been comprehensively tested. Results from a replay therefore depend on data quality and the assumptions in the latency and fill models; live deployment carries additional uncertainty.
Key ideas
- Tick-level replay can incorporate feed latency, order latency, and queue position when simulating fills.
- The framework reconstructs order books from both market-by-price and market-by-order feeds.
- Users can supply custom latency and fill models alongside the provided models.
- The same strategy code can be used for historical simulation and supported live trading.
- Early development and limited live-bot testing constrain confidence in production use.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.