How jmerle/imc-prosperity-3-backtester works
– The algorithm file (e.g., user’s trading code) and other runtime arguments (round and day selections, merge options, etc.)
▪ Data Loader reads CSVs from the Resources component.
▪ The Order Matching module processes orders against order depths and market trades using the logic provided in several modules.
▪ Intermediate objects/data models (from “datamodel.py” and “models.py”) represent trading state.
• Output paths:
• A side panel for the Environment and Configuration layer, indicating how runtime variables and configuration files affect the system.
Architectural Patterns and Design Principles
• Modular Design: The project is broken into dedicated modules for data handling, simulation logic, and I/O which lends itself to a clean separation of concerns.
• Extensibility: The use of resource directories with CSV files and various command-line options demonstrates that the system is designed to be easily updated for new rounds/days or extended with additional data sets.
• CLI Application Structure: The __main__.py file points to a pattern where the application is modular, allowing both pip-based installation and local development (noting the development instructions in the README).
Technologies, Frameworks, and Libraries
• Python as the primary programming language.
• Standard modules for file I/O and CSV reading.
• GitHub Actions (via .github/workflows) for CI/CD.
• Environment management using uv (as mentioned for development).
• Integration with external applications like the Prosperity 3 Visualizer.
Specific Elements
• Component Labels:
– The CLI / Runner
– Core Backtesting Engine (with submodules: Data Processing, Order Matching)
– Data Loader / Resource Manager
– Configuration & Environment Variables (pointing to PROSPERITY3BT_ROUND, PROSPERITY3BT_DAY)
– Output / Logging (with optional Visualizer integration)
– Show the flow from input → processing → output.
• Visual Distinctions:
• Annotations:
– Brief notes on how the order matching works (priority of order depths over market trades, configuration options from the README).