Global algorithmic trading competition
IMC Prosperity 4
A solo entry in a global algorithmic trading competition. I built a backtester that copies the exchange's fill rules, then used it to test market-making and arbitrage strategies before each submission.
- Python
- pytest
Key numbers
- Top 100
in the US, solo team
How it works
- Round dataorder books and trades
- Backtesterthe exchange's fill rules
- Strategiesmarket making, arbitrage
- Traderright strategy per product
- One submitted filestate kept between ticks
- Submission logsresults of each run
Decisions that matter
Fills are not assumed to be favorable
A resting order queues behind others, and the data cannot say where. The backtester has three passive-fill modes, including a cautious one that skips any trade at exactly my price. The matching modes come from a public community backtester.
A limit breach cancels the whole order set
If a product's orders would push its position past the limit, the exchange cancels all of them, not just the excess. The backtester does the same, so a strategy cannot count on being trimmed to fit. Orders with float prices or non-integer sizes are rejected before any fill.
One bad product cannot stop the rest
Each product runs inside its own error guard. If one strategy fails, that product sits out the tick and every other product keeps trading.
The right strategy for each product
Products are sorted by how they behave. A product with a fixed fair value gets market making with inventory flattening. A basket gets arbitrage on the gap between its price and the sum of its parts.
Limits
The rank is my peak, through round 3. The code also holds strategies for later rounds, such as conversion arbitrage and flow signals.
