Inspiration
Optiver's brief for this year was "Research to Trade": eight stocks, no historical data, and "multiple sources of edge and no one will tell you where to look". So we treated the weekend as a research project with a trading bot attached. We recorded the market ourselves, looked for rules in the recordings, and let the bot trade only on what survived measurement.
What it does
Our bot trades all eight stocks on Optibook on its own, for hours at a time. It earns in three ways:
- Jumps. Three stocks follow three others: CRWV follows MU, NBIS follows AVGO, SNDK follows NVDA. When a leader jumps, the follower's large resting orders stay at the old price for about half a second (2.5 to 3.5 seconds in SNDK). The bot computes the follower's new fair value from the leader, trades against the stale prices up to the position limit, and works its way out as the follower catches up.
- The pull to a base price. Every stock drifts back towards a fixed price, by about 2% of the distance per minute (pooled t-statistic of 10 over 219 minutes). The bot leans its positions that way.
- Quoting. Between jumps it quotes just in front of the exchange's large orders, and pulls those quotes as soon as they start to come apart.
By our accounting of one two-hour stretch on Sunday morning, the first two sources are about 90% of the money available to all teams, and market making about 10%.
How we built it
Record, find, test, trade. The bot writes down what it sees and does, and everything below comes from those recordings:
- The followers obey simple laws. CRWV is worth about 10.49 × MU^0.6, and the exchange's large orders there (its "ladder") close half of the remaining gap every second. SNDK copies NVDA 2.5 or 3.5 seconds later, with no preference for either. NBIS switches its exponent between 0.6 and 0.9, about 90 minutes after a restart, so the bot detects which one is in force.
- The market keeps a clock. All 809 moves of the liquid stocks' ladders that we first timed fell 2 to 33 ms into a second, and all 199 of the followers' came half a second later.
- A jump shows itself milliseconds ahead, though its direction does not. In 21 of 23 recorded jumps, the old ladder started to come apart 5 ms or more before the new one was complete. That is when we pull our quotes.
A simulator to test on. It implements the exchange's rules and a market tuned to our recordings, and runs five minutes of trading in about 20 seconds. We ran the larger changes there first, to catch broken builds and not to predict profit. Some small ones we tested live. A second benchmark replays the race against other teams' bots at a jump, and fails unless we are first half the time.
Speed where it mattered. The bot decides and sends its jump orders on the exchange client's own network thread. Through Optiver's real client, on a stand-in exchange, that cut the median reaction from 553 to 299 microseconds over 150 jumps per version.
We came with last year's bot and a first version of the simulator. Last year's bot did not fit this market and we deleted it. The trader, the research and the 2026 market models were made during the event, with Claude Code as our coding and analysis partner. The trader is one Python file, and the project has over 1,000 tests.
Challenges we ran into
- Breaking a rule disconnects you. It happened to us live in three different ways. A self-trade slipped past our check because the exchange's 148.2 arrived as 148.20000000000002. Once, a fill reached the order list before it reached our position, and the next order went past the limit of 100. Once, an order was too far from the last trade. We never found out why that one was sent, so every order is now checked against the price band.
- Being first. In the early hours of Saturday we were at a median fifth place over 37 measured jumps. Reacting to the first side of the new ladder instead of the whole of it, and sending orders without waiting for earlier ones, moved us to a median second, behind a single team.
- Noise. In Saturday's mock competition, one AVGO jump cost us 1,418, and AVGO was almost all of the gap to the two teams just ahead of us. A change that looks good for ten minutes usually means nothing.
- Our own mistakes. On Sunday morning a setting that had looked fine in a calm half hour carried us to 98 long in AMD when we wanted to be 98 short. We were 20th of 37 teams ten minutes after that restart. We traced it, fixed it and tested the fix.
Accomplishments that we're proud of
- Fourth place in Saturday's 30-minute mock competition, and third in the half hour after Sunday's midnight reset.
- The highest average profit from taking stale prices at a jump (140) of the teams we compared, over 197 jumps on Saturday; the next was 119.
- Less risk for the same return. Sizing each position by what a jump in that stock would cost cut the spread of half-hour results by about 18% (from 1,365 to 1,113) on 52 recorded half hours, for nearly the same average (1,562 to 1,518).
- A bot that ran overnight, reconnects after a lost connection, checks its worst-case position before it sends an order, and stops itself at a loss limit.
- [FINAL: placing and PnL in the graded session - fill in or delete this line]
What we learned
- Some things cannot be predicted. We tested 17 signals on 554 jumps. The strongest had a t-statistic of 2.3, about what chance gives with 17 tries. Jump timing has no memory either. Knowing that kept us from trading on patterns that were not there.
- At a jump, the position limit matters more than speed. Everyone fast ends up at 100 shares. What counts is having room before the jump, and how you get out after it.
- Among good teams, a half hour is mostly decided by luck at a few jumps. What a position earned at jumps hardly repeated from one half hour to the next (rank correlation 0.12). So we tried to judge changes on many half hours and on risk, not on the leaderboard.
- Write down what failed. Our log records what we tried and dropped as well as what we kept, so that three people and several AI sessions would not repeat the same dead ends.
What's next for WallStreetBets
- Understand the remaining gap to the best teams, which is largely in the small price steps between jumps: they react sooner there, and their quotes fill more often.
- Read the exchange's feed directly, since each message ahead of ours costs 40 to 50 microseconds in the standard client.
- Make the simulator harder. Other teams adapted all weekend, and a market model tuned to yesterday is too kind.
- Try the same method (record, find the law, test it out of sample, trade it) on a market we have not seen before.
Built With
python, optibook, asyncio, cap'n-proto, docker, ruff, claude-code