Quick Setup
-
Install uv if you haven't already:
curl -LsSf https://astral.sh/uv/install.sh | sh -
Clone and sync dependencies:
git clone <repository> cd <project> uv sync
-
Activate the virtual environment:
# macOS/Linux source .venv/bin/activate # Windows .venv\Scripts\activate
That's it—uv sync creates the venv automatically and installs all dependencies from pyproject.toml and uv.lock.
Fix your system path Alex: C:\Users\alexn\AppData\Local\Python\pythoncore-3.14-64\Scripts\uv.exe sync
algorithms.py— sample strategy library and utilities.stat_utils.py— statistics helpers used by analyzers.backtests/— stores log files from the official IMC backtester and logs from prosperity4btest.montecarlo_backtester/— modular Monte Carlo backtesting framework for Prosperity 4.rounds— stores all code and data for each round0-tutorial— example for how all future rounds should be setupdata— contains Prosperity 4 data packagestraders— has python scripts for backtesting and submissionexplore.ipynb— jupiter notebook to call helper functions from stats and algorithms to visualise and manipulate data for that round
-
log_visualiser- Visualises official Prosperity 4 logs and log files from prosperity4btest prosperity4btest a fork of jmerle's backtester for Prosperity 3
- To use just run
log_visualiser/dashapp.py
-
montecarlo_backtester/imc-prosperity-4- Uses 1st Place USA Chris Roberts backtester
- Full Monte Carlo backtester + data model (
prosperity4mcbt/) for stress-testing strategies. - Can implement models for assets for new rounds or clone from original repo if Cris Roberts keep updating
- Videos on the topic
- Backtester: https://www.youtube.com/watch?v=Mi-vVCZ0Vo4
- Prosperity Breakdown: https://www.youtube.com/watch?v=PI2lJ063sJ8
-
Install Rust toolchain (Cargo):
- Windows:
winget install --id Rustlang.Rustup -e --source wingetor https://www.rust-lang.org/tools/install - macOS/Linux:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Windows:
-
Install Node/npm:
- Windows:
winget install --id OpenJS.NodeJSor https://nodejs.org/ - macOS/Linux:
brew install nodeor package manager of choice
- Windows:
-
Run the Monte Carlo runner with a trader sample:
prosperity4mcbt example_trader.py --quick --vis --out /tmp/mc_run/dashboard.json
-
Read through backtester README for more info