Comparing Level-3 and Level-2 Queue Models in a Grid-Trading Backtest
Summary
This example compares a grid market-making strategy in HftBacktest using CME market-by-order Level-3 data and Level-2 depth reconstructed from that same feed. Quotes are arranged around a reservation price that shifts with inventory, with position limits, fixed spacing, and periodic order maintenance. The Level-3 simulation uses direct queue information, while the Level-2 simulation applies a probabilistic queue-position model. The example plots their resulting equity paths to illustrate how data granularity and queue assumptions can affect simulated outcomes.
The comparison is a demonstration, not a general estimate of Level-2 error or proof that either simulation predicts live results. Its setup uses a particular instrument, sample period, latency, fee model, and simplified fill assumptions; the provided text does not report numerical performance findings. It also notes that the Level-3 depth omits implied orders. Queue models should be checked against live trading, especially when only Level-2 data is available, and backtests should be validated against live outcomes.
Key ideas
- The example runs the same inventory-skewed grid strategy on Level-3 data and reconstructed Level-2 data.
- Level-3 data provides order-level queue information, while Level-2 relies on an estimated queue model.
- Equity curves are compared to show that queue assumptions can affect backtest results.
- The comparison is specific to its instrument, sample, and simulation assumptions.
- The Level-3 feed omits implied orders, and simulated results still require validation against live trading.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.