How roq-trading/roq-algo works
Project type and purpose
• From the README and file tree, “roq-algo” is a C++ API and reference implementation for algorithmic and high-frequency trading (HFT).
• It provides:
• Interfaces for trading strategies
• Exchange matching simulation
• Simulation reporting
• Reference implementations (arbitrage, matcher, reporter, simulator, strategy, tools)
File structure
• Top-level:
• CMakeLists.txt and cmake/ → build system
• /roq/algo → public headers, subdivided by component (arbitrage, matcher, reporter, simulator, strategy, tools)
• src/roq/algo → implementation matching the include layout
• benchmark/ → performance tests
• test/ → unit/integration tests
• scripts/, conda/ → environment and tooling
• Pattern: modular library with layered components and reference executables under src/roq/algo/main.cpp.
README for additional insights
• Emphasis on “interfaces” → clear separation between abstract API and concrete implementations.
Elements
• Clear labels for all components (use the same names as the headers: “Simulator”, “Matcher”, etc.)
• Green for support/tools (position tracker, time checker)
• Orange for external interfaces (configs, data feeds, outputs)
Detailed capture of essential architecture
• Configuration paths (config files → factory → component)