Backtest Processor Interfaces for Orders, Market Events, and Latency
Summary
The document defines interfaces for a backtesting system that processes historical market events and order interactions. A local processor can submit, modify, and cancel orders, expose positions and state values, report market depth and recent trades, and provide feed and order latency timestamps. A general processor interface handles event visibility, event processing, order receipt, and the next scheduled send or receipt time.
These interfaces outline how a simulator can distinguish what is observed locally from events generated remotely, and how it can coordinate order messages with historical time. The code also exports multiple local and exchange processor implementations, including models that differ in partial-fill behavior. This is software architecture rather than a trading strategy: it gives no fill-model details, calibration evidence, or discussion of market impact. Users would need to inspect the specific implementations to understand execution assumptions and their effect on simulated results.
Key ideas
- The local processor interface covers order submission, modification, cancellation, and local state access.
- Processors expose timestamps for feed latency and order request, exchange, and response events.
- The general processor interface coordinates historical events with order receipt and dispatch timing.
- Several local and exchange implementations are exposed, including alternatives with different partial-fill behavior.
- The interface alone does not explain fill assumptions or validate simulation accuracy.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.