Skip to main content

Unified CLI for IMC Prosperity: backtest, visualize, and submit

Project description

prosperity-cli

Unified CLI for IMC Prosperity 4 trading competition: backtest, visualize, and submit algorithms.

Prerequisites

  • Python 3.11+

Install

pip install prosperity-cli

This also installs imc-p4-bt (the backtester) as a dependency — no extra cloning needed.

Or for development:

cd prosperity-cli
pip install -e .

Configure

Run the interactive setup to save your credentials:

prosperity config

Enter your IMC email and password when prompted.

Note: Credentials are stored in ~/.prosperity/config.json with restricted permissions (600).

Commands

prosperity backtest

Run the backtester on your algorithm:

prosperity backtest trader.py 1
prosperity backtest trader.py 1 2 3 --vis --merge-pnl

Options:

  • algorithm — Path to your trader.py file
  • rounds — Round numbers to backtest (e.g. 1, 1 2 3, 1-0)
  • --vis — Open the visualizer after backtest
  • --merge-pnl — Merge PnL across rounds
  • --print — Print trader output to console
  • --out <file> — Write output to file
  • --no-out — Suppress output files

prosperity visualize

Open the visualizer in your browser:

prosperity visualize
prosperity visualize result.log

Opens https://imc-prosperity-4-visualizer.vercel.app/ — paste or load your log file there to analyze results.

Options:

  • log_file — (Optional) Prints the log path as a reminder to load it in the UI

prosperity submit

Submit your algorithm to IMC Prosperity, wait for results, and open visualizer:

prosperity submit trader.py
prosperity submit trader.py --no-vis

This command:

  1. Authenticates with IMC Prosperity
  2. Uploads your algorithm
  3. Polls for results
  4. Downloads the log file to backtests/
  5. Opens the visualizer

prosperity config

Configure your credentials:

prosperity config          # Interactive prompts
prosperity config --show  # Show config path

Countdown Timer

prosperity shows a countdown panel on every command during active rounds or intermission:

╭───────────────────────────────────╮
│  Intermission ends in  2d 05h 12m 43s │
╰───────────────────────────────────╯

Contributing

  1. Fork the repo
  2. Install in dev mode: pip install -e .
  3. Run tests: pytest tests/ -v
  4. Submit PR

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

prosperity_cli-0.1.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

prosperity_cli-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file prosperity_cli-0.1.0.tar.gz.

File metadata

  • Download URL: prosperity_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prosperity_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 128c84ac7d9ed8b0cd4ecfb894064407ca41c05b0a5858130b81c692cec8a105
MD5 e262ac0816c71a9a651aac967b7353a4
BLAKE2b-256 451a4f3bc751b6aa7a6b02de1cd57b896c1c1b6fd672b0f0b6225c8201bca9a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for prosperity_cli-0.1.0.tar.gz:

Publisher: publish.yml on rkothari3/prosperity-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file prosperity_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: prosperity_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for prosperity_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eb5a66e4b56a398146e4ee6790420ead9a1b50503187144c88057faa96fa89e
MD5 738805dad7ae6a250f8fdf8e8a716173
BLAKE2b-256 89e3e1280b5a9c08699d2156b17de2b68115a606054e19d625f0213e81752901

See more details on using hashes here.

Provenance

The following attestation bundles were made for prosperity_cli-0.1.0-py3-none-any.whl:

Publisher: publish.yml on rkothari3/prosperity-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page