Skip to content

GauravS11112003/IMC-Prosperity-4-PythonBacktester

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prosperity 4 Backtester

Screenshot 2026-04-30 050357

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.

Quick Start

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 5000

If the user-level Python scripts directory is not on PATH, use python -m p4bt.cli ... with the same arguments.

Commands

  • p4bt inspect data lists discovered rounds, days, products, row counts, and schemas.
  • p4bt run <trader.py> executes a standard Prosperity Trader class 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.

Releases

No releases published

Packages

 
 
 

Contributors

Languages