imc-prosperity-3
The complete strategy code of the Asian League team in the IMC Prosperity 3 Trading Competition, involving over 12,000 teams.
Introduction
This writeup shares our algorithm and insights that brought us to 2nd place globally in IMC Prosperity 3 (2025). Outperforming (almost) all other 12,000+ teams, we achieved a final score of 1,433,876 SeaShells but unfortunately we didn't win the 10,000$ prize for it as we had already earned prize money in last year's competition :)
Marvin Schuster*only mental support in Prosperity 3
After countless requests, we decided to share our final algorithm along with all of our insights to give back to the Prosperity 3 community. We believe that sharing our code advances the competition itself — ensuring that more participants start on the same page for future iterations, and encouraging innovation on IMC’s side. While Prosperity 3 already introduced many new products and trading styles, there is still a lot of untapped potential — especially in designing bot behaviors that create deeper and more exploitable opportunities for highly advanced teams. We realize that fellow or future participants have varying levels of experience with quant and algorithmic trading, so we tried to make this write-up as detailed and accessible as possible. Some topics are just too deep to explain in a short paragraph, so we included links to external resources that less experienced readers should carefully study.
This report goes far beyond just presenting our final strategies. We not only break down those strategies and insights that worked for us, but also share the thought processes and decisions behind them. That said, this document is mainly intended for fellow or future Prosperity participants, since it focuses specifically on Prosperity 3. If you're more interested in how we consistently stayed at the top across multiple competitions — and want general advice on how to compete against thousands of teams — check out our separate blog post:
How to (Almost) Win Against Thousands of Other Teams in Competitive Environments
IMC Prosperity 3
IMC Prosperity 3 (2025) was a global algorithmic trading competition that ran over five rounds and fifteen days, with 12,000+ teams participating worldwide. The challenge tasked teams with designing trading algorithms to maximize profits across a variety of simulated products — replicating real-world opportunities such as market making, statistical arbitrage, scalping, and locational arbitrage.
The competition was gamified: each team represented an "island" trading fictional products like Kelp, Squid Ink, Picnic Baskets (an ETF analog), and Volcanic Rock Vouchers (an options analog), using SeaShells as the in-game currency. It started with just three products in Round 1 and progressively expanded to 15 products by the final round.
In each round, teams submitted an updated version of their trading algorithm, which was then independently evaluated against a marketplace of bot participants. Teams could study and optimize their algorithms by analyzing bot behaviors and interactions (e.g., predictable quoting or trading patterns) as well as statistical patterns in the price series themselves — both within a single product and across multiple related products (such as deviations between an ETF and its underlying constituents). The profit and loss (PnL) from this evaluation determined each team's standing relative to all others on the global leaderboard.
In addition to algorithmic trading, each round featured a manual trading challenge. Although these accounted for only a small fraction of total PnL, they were a fun aspect of the competition, often involving optimization under uncertainty, game-theoretic decision-making, or news-based trading tasks.
For full documentation on the algorithmic trading environment and more competition context, please refer to the Prosperity 3 Wiki.
Structural Overview
- Tools
- Algorithmic Challenge
- Round 1: Market Making
- Round 2: ETF Statistical Arbitrage
- Round 3: Options Scalping
- Round 4: Location Arbitrage
- Round 5: Trader IDs
- Manual Challenge
- Round 1: FX Arbirage
- Round 2: Containers
- Round 3: Reserve Price
- Round 4: Suitcases
- Round 5: News Trading
- FAQ
- What is the Wall Mid and why did we use it?
- How to properly backtest?
- How to break into quant trading?
- Is the Discord Channel useful?
- What was going on with all the hardcoding in the first two rounds?
- What else did we try?
Tools
Having the right tools prepared before the competition is critical for maximum efficiency during the competition itself. Prosperity 2’s data was publicly available, allowing teams to familiarize themselves with the data formats, set up the tutorial environment early, and test their algorithms and logging infrastructure well before the official start of Prosperity 3.
Backtester
For backtesting, we mainly relied on our own forked version of Jmerle’s open-source backtester alongside the Prosperity website’s own backtesting functionality. Each served different, specific purposes in our workflow — for a detailed explanation of how we approached backtesting, please refer to the Backtesting Section.
Dashboard
We developed our own dashboard as a preparation for Prosperity 2, and further updated and improved it before Prosperity 3 — adding features that we didn’t have time to implement during the first competition. Since this dashboard will be heavily referenced when we explain our strategies and insights across all products, we’ll first give a detailed description of it here.
Prosperity — like real-world trading — puts strong emphasis on market microstructure. A proper, intuitive order book visualization tool is essential for building the deep intuition necessary to recognize and exploit profitable patterns.
Unlike many standard trading dashboards, we designed ours completely from scratch, based on what was actually most useful for this particular competition. Aesthetics were never our priority — everything was optimized purely for functionality and speed during use. (Please keep that in mind — we know it’s ugly!)
In the main plot, you can see price levels:
Markers represent trades:
Each numbered section in the dashboard corresponds to a specific functionality:
- Hoverable Tooltip Displays who traded, how much, and at what price at the hovered timestamp.
- PnL Panel Shows the profit and loss for the currently selected product.
- Position Panel Displays the net position for the selected product over time.
- Log Viewer Parses our own logger outputs into a clean, timestamp-synced view. Always matches the time currently hovered over in the main plot.
- Selection Controls Allows selecting:
- The log file.
- The product (e.g. Kelp).
- Specific logged indicators to overlay onto prices.
A powerful feature here is the normalization dropdown: By selecting an indicator (e.g., WallMid — our proxy for the "true price"), all prices can be normalized relative to it. This is extremely useful for visualizing strategies like mean reversion (When having PICNIC_BASKET1 selected normalizing by the sum of its constituents perfectly demonstrates the mean reversion of the basket's premium still maintaining the orderbook plotting style).
- Trade Filtering and Visualization Controls what types of trades and order book elements to display:
- Toggle order book levels.
- Toggle all trades, specific trader groups or specific traders:
- M (maker)
- S (small taker)
- B (big taker)
- I (informed trader)
- F (our own trades)
- Set quantity filters to only show trades within a specified size range, especially helpful when trader IDs still unknown.
- Performance and Downsampling Controls Adjusts dynamic downsampling and visibility thresholds to prevent lag when visualizing large datasets.
Notes:
- We intentionally avoided any existing known dashboard styles; instead, we focused purely on designing what helped us most during analysis or checking of our algorithm during intense rounds.
- The visualization choice (scatter plot as order book depth representation) was made based on the specific structure of Prosperity markets — where products typically have only 1–4 meaningful price levels.
Round 1: Market Making
Rainforest Resin
Rainforest Resin was the simplest and most beginner-friendly product in Prosperity 3, perfectly suited to teach the fundamentals of market making. The product’s true price was permanently fixed at 10,000, meaning there were no intrinsic price movements to worry about. This setup clearly demonstrated the roles of makers and takers: takers would cross the true price by either buying above 10,000 or selling below it, while makers posted passive orders hoping to be matched. The only thing that mattered for profitability here was the distance between the trade price and the true price — commonly referred to as the "edge." In short, the further you could buy below 10,000 or sell above 10,000, the better.
A key insight not just for Rainforest Resin but for all Prosperity products was understanding how the simulation handled order flow. At the start of every new timestep, the simulation first cleared all previous orders. Then, it sequentially processed new submissions: first some deep-liquidity makers, then occationally some takers, then our own bot’s actions (take or make), followed by other bots — usually more takers. This structure meant that speed and order cancellation were irrelevant: you had a full snapshot of the book and could submit any combination of passive or aggressive orders without racing against anyone. For Rainforest Resin, this confirmed that all focus should be on carefully optimizing the edge versus fill probability trade-off.
Figure 1: Rainforest Resin Orderbook over Time
Snippet of orderbook over time for Rainforest Resin. Black stars are our quotes. Orange crosses are fills we got, profitable opportunities we immediately took, or trades at 10,000 we used to unwind inventory.
Final Strategy
Our final strategy for Rainforest Resin was straightforward. Each timestep, we first immediately took any favorable trades available — buying below 10,000 or selling above it. Afterward, we placed passive quotes slightly better than any existing liquidity (existing orders in orderbook): overbidding on bids and undercutting on asks while maintaining positive edge. If inventory became too skewed, we flattened it at exactly 10,000 to free up risk capacity for the next opportunities. No sophisticated logic or aggressiveness was needed due to the stable true price and the clean snapshot-based trading model.
Anyone could have come up with this approach by carefully studying the competition's matching rules and observing the environment during the tutorial round. Realizing that the true price was constant, fills were processed sequentially, and that orders only lived for one timestep simplified the problem dramatically. Having a basic visualization of price levels and logging fill quality would have made it even more obvious. Rainforest Resin alone consistently contributed around 39,000 SeaShells per round to our total PnL.
Kelp
Kelp was very similar in nature to Rainforest Resin, with the only major difference being that its price could move slightly from one timestep to the next. Instead of a fixed true price like Rainforest Resin, Kelp's true price followed a slow random walk. However, this movement was minor enough that the basic structure of the problem remained unchanged. Buyers and sellers still interacted as takers when crossing the fair price, and makers earned profits based on how far their trades deviated from the true price at the moment of execution.
The critical insight for Kelp was recognizing that, despite small movements, the future price was essentially unpredictable. Once teams realized that takers lacked predictive power and that the next true price could not be systematically forecasted, it became clear that the best available estimate for the true price was simply the current one. In fact, while there was a minor technical edge — stemming from the fact that the true price was internally a floating-point value and orders could only be posted at integer levels (creating slight mean-reversion tendencies after ticks) — this effect was too small to materially alter strategy. Just like with Rainforest Resin, the optimal approach was to treat the WallMid as the fair price and quote around it.
Figure 2a: Kelp Orderbook over Time (Raw)
Same as Figure 1, but showing Kelp's price movement over time.
Figure 2b: Kelp Orderbook over Time (Normalized)
Same as Figure 2a, but with prices normalized by the Wall Mid indicator to make the series stationary. Notice how it resembles Rainforest Resin, but with a tighter bid-ask spread.
Final Strategy
Our final strategy for Kelp was nearly identical to that for Rainforest Resin. At each timestep, we first immediately took any favorable trades available relative to the current wall mid, then placed slightly improved passive orders (overbidding and undercutting) around the fair price. If inventory became too large, we neutralized it by trading at zero edge relative to the current price estimate. No major changes were needed compared to the first product.
Teams that approached Kelp correctly would have first verified whether takers or the market exhibited any predictability, either through simple empirical analysis or by observing that naive strategies (like quoting around the current price) worked well. Realizing that there was no meaningful adverse selection risk meant that treating Kelp identically to Rainforest Resin was the optimal path. On average, Kelp generated around 5,000 SeaShells per round, primarily limited by the tighter spreads compared to the first product.
Squid Ink
Squid Ink differed from the previous two products mainly in that it had a tighter bid-ask spread relative to its average movement, combined with occasional sharp price jumps. This made pure market-making less attractive, not because of systematic losses, but because it introduced higher variance in realized PnL. In other words, fills could swing more widely in value depending on unpredictable price jumps, even if there was no predictable adverse selection in the classic sense. Officially, the product was described as mean-reverting in the short term, suggesting that mean-reversion strategies might work. However, after investigating the market dynamics more carefully, we discovered an entirely different and more reliable opportunity.
Our main insight was that one of the anonymous bot traders consistently exhibited a strikingly predictable pattern: buying 15 lots at the daily low and selling 15 lots at the daily high. We observed this behavior early on, without initially knowing who the trader was. It was only in the final round — when trader IDs were temporarily visible — that we learned this trader was named Olivia. Anticipating this kind of behavior and designing logic to detect it gave us a clear edge. Without revealing our exact identification method (to avoid encouraging blind copying), the general approach involved tracking the daily running minimum and maximum. When a trade occurred at a daily extreme — and in the expected direction relative to the mid price — we flagged it as a signal and positioned accordingly. False positives were managed by monitoring for corresponding new extrema that contradicted earlier signals.
Figure 3a: Squid Ink Prices with Informed Trader
This plot shows that Olivia bought exactly at the daily minimum and sold exactly at the daily maximum.
Figure 3b: Squid Ink Prices with Anonymous Trades
This plot filters all anonymous trades to only show trades with quantity = 15, as it appeared during early rounds. Careful teams could have spotted this pattern and identified Olivia's behavior during Rounds 1–4.
Final Strategy
Our final strategy for Squid Ink focused purely on following this daily-extrema trading behavior, dynamically updating our positions based on detected trades and resetting when invalidations occurred. No active market making or mean reversion trading was used for this product. The result was a low-risk, high-reliability PnL contributor that did not rely on predicting price moves directly.
Anyone who carefully analyzed historical Prosperity 2 data or public write-ups — such as Stanford Cardinal’s or Jasper's — could have anticipated similar behaviors and prepared detection logic in advance. We also discovered and executed this strategy on another product in Prosperity 2 without having participated in Prosperity 1. Early identification of this behavior consistently netted us on average 8,000 SeaShells per round, providing a stable and important edge in Round 1.
Round 2: ETF Statistical Arbitrage
Picnic Baskets
In Round 2, three new individual products — Croissants, Jams, and Djembes — were introduced alongside two new baskets: PICNIC_BASKET1 (6x Croissants, 3x Jams, 1x Djembes) and PICNIC_BASKET2 (4x Croissants, 2x Jams). Each basket represented a combination of different quantities of the three products, but crucially, it was not possible to directly convert baskets into their underlying constituents. This setup clearly simulated a basic ETF (Exchange-Traded Fund) structure: linked assets that normally move together, but which might temporarily deviate, creating statistical arbitrage opportunities. In quantitative trading, finding and exploiting such linkages — when the synthetic price of a basket diverges from the sum of its parts — is a classic technique.
<