A local IMC Prosperity 4 backtester for standard Python Trader.run(state) submissions. It reads the CSV files in data/, simulates fills, writes reusable run artifacts, prints PnL reports, and serves a local browser dashboard.
python -m pip install -e ".[dev]"
p4bt inspect data
p4bt run examples/noop_trader.py --days 2 3 4 --out runs/noop
p4bt report runs/noop
p4bt serve examples/simple_market_maker.py --days 2 --start 0 --end 5000If the user-level Python scripts directory is not on PATH, use python -m p4bt.cli ... with the same arguments.
p4bt inspect datalists discovered rounds, days, products, row counts, and schemas.p4bt run <trader.py>executes a standard ProsperityTraderclass and writes artifacts.p4bt report <run-dir>prints aggregate and per-product PnL.p4bt serve <trader.py>runs a backtest if needed and opens a local visualizer. The dashboard can also browse to any Python strategy file on your machine, run it with days/timestamp/matching options, and refresh the PnL views from the browser.
Run p4bt <command> --help for options.