Inspiration
Second by second, the Optibook market looks random. It isn't: a few fixed rules build it, and each rule leaves an edge. So we recorded everything and measured what each rule pays.
The market
Eight stocks, position limit $\pm 100$ lots. Five leaders (NVDA, AVGO, AMD, MU, VRT) and three followers, each a delayed copy of one leader:
$$F_t = c \cdot L_{t-\Delta}^{\,\beta}$$
SNDK follows NVDA, CRWV follows MU, NBIS follows AVGO ($\beta$ switches between 0.58 and 0.90). Optiver runs two bots: one rebuilds the order-book walls every second, the other is a random taker sending 20 lots about every 5 s.
What we built
- Follower trade. When a leader jumps, the follower's old ladder briefly stands at the old price. We read the direction from the leader's first new wall and fire one IOC into that stale ladder.
- SNDK double. After big NVDA jumps we also rest an order in the gap above the emptied ladder, let late teams fill it, and buy back half a second later when Optiver refills the old ladder.
- Anchor. Leaders drift back to their start price $A$ (≈ 2 % of the distance per minute). We hold 100 lots against any leader at least 2 % from $A$ (MU 4 %, VRT 8 %), and hold its follower on the same side.
- Market making in NVDA, VRT and MU while the anchor wants no position there.
The bot runs on a Python orchestrator with a single exchange connection. Every order is checked against the rules that would disconnect the team. The final version is ported to C++ and matched order by order against Python in simulation.
What we learned
- Positioning beats speed. Our bot decides in about 6 µs, but in a jump second the exchange answers in about 9 ms, so we only rank mid-field on speed.
- The anchor's profit is drift; its risk is single jumps (one cost us 865).
- Most ideas failed (quotes picked off at the update, quotes fighting the anchor). Each failure became a rule.
Challenges
One connection per team, resets that drop it, orders that disconnect instead of failing, and the 10 ms after every jump where the fastest team takes the money.
Built With
- claude
- cpp
- python
