Encapsulating Replay Tick Data and Diagnosing Service Slowdown
Summary
This installment refactors a market replay service so tick-file state and helper operations are more carefully hidden within the tick-handling class. It describes the class’s role in reading tick data, converting bars to simulated ticks, and building minute bars, while keeping public operations focused on loading and conversion. The changes aim to reduce internal state leakage and improve the service’s structure.
The article reports a substantial performance drop after the refactor, attributing it mainly to additional function calls and reduced direct variable use. It does not quantify the slowdown or provide a benchmark analysis; the demonstration is described as a video. The central engineering problem is left open for a later installment: optimize the event loop that generates and launches replay or simulation while retaining event- and buffer-based communication. This is software architecture guidance for market-data replay, rather than a trading strategy or evidence of market edge.
Key ideas
- Encapsulating tick state limits access to implementation details within the replay service.
- The tick handler reads tick files and supports conversion from bars into simulated ticks.
- The refactor increases function calls and is associated with a pronounced performance decline.
- The event loop is identified as the main target for future performance work.
- The article gives no quantitative benchmarks or trading results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.