Inspiration

We're Bavariance: Erik Eremenko, Berk Erdemoglu, and Alessandro Kronast-Reichert. At hackaTUM 2025, we worked on IMC's challenge with Bavariance IMCity. We combined ML forecasting with trading on Munich city data. Erik also builds PolySimulator outside of hackathons. It's a paper-trading simulator that fills orders against live Polymarket order books. When we saw Optiver's challenge at hackaTUM 2026, we knew we wanted to try it.

What it does

Optibook has 8 stocks. Of those, 3 follow other stocks. SNDK follows NVDA, NBIS follows AVGO, and CRWV follows MU. The followers move 0.5 to a few seconds later.

Our bot runs in Python on Optiver's client. We make money two ways.

  1. Pick-offs. When a leader jumps, we send one order to take stale quotes on the follower at the fair price we calculate. We use a measured ratio, like 0.30 for NBIS. Once the follower catches up, we close the position.
  2. Taking mispriced team quotes. Optiver posts large market-maker orders of 1,000-3,000 lots at a fixed distance around a hidden price. If another team leaves a quote on the wrong side of the midpoint of those orders, we take it and sell back at fair.

Before sending an order, the safety layer checks the position limit with resting orders included. It also checks outstanding lots and the 25 msgs/s cap. A supervisor watches the connection and reconnects as soon as the exchange lets us back in after a reset.

How we built it

We did the research before writing most of the trading code. We recorded books and trades and saw that Optiver's orders update once per exchange second. The followers move half a second later. We used the recordings to build a replay backtester and ran live A/B tests to compare changes. Our experiment log went past 100 entries. It helped to have the dead ends written down too.

We spent a lot of time on latency. At first we polled every 200 ms. Then we switched to event-driven wake-ups and added a fast path that checks for pick-offs first. We saved more time by making the decision on the client's network thread. We also found that Optiver's Python client decodes a whole burst of messages before sending any order. A small wrapper around that part of the client took our slowest pick-offs from 19 ms to 11 ms.

Two numbers we kept track of:

  • Leader jump to our first fill. We started at 117 ms with polling every 0.2 s and now we're at about 14 ms. That's the median for the first order of each pick-off, measured on the exchange clock.
  • Exchange publish to order exit. Our order now leaves our machine about 1.3 ms after the exchange publishes the jump.

We worked with AI coding agents throughout the build. We had a deployment agent on the exchange machine, and other agents worked on code and review. We also did one long research run across all our data. To keep the live bot working through changes, we wrote over 1,000 tests and ran a short live test for every change.

Challenges we ran into

Each team gets one exchange connection. That made it awkward to compare ideas live. About 20 teams reach a stale quote within 20 ms, so we had plenty of competition for those fills.

Optiver reset the exchange, and the market went through calm periods and wild ones. We made those shifts harder to read. Early on we were far too cautious. We stayed flat while the top teams held big positions. Later we switched versions too often and gave ourselves much too little time to judge them.

Accomplishments that we're proud of

We connected our research to the live bot and logged every decision, so we could go back and see what the bot did. So far we've had zero exchange limit breaches.

After a reset, we're trading again within about 2 s of the exchange letting us back in. We send our first order 40 ms after the first price update.

We're glad we had the code reviewed independently. The review caught a bug that was silently dropping our largest CRWV pick-offs. We fixed it within the hour.

What we learned

We needed speed to compete for stale quotes. At about 14 ms, we could get in on those trades. The fastest team needed about 3 ms. Top teams also made a lot by holding positions tilted toward the prices Optiver returns to after resets.

We learned to give strategies hours before judging them. For the config, we prefer one short, readable version to juggling forty variants.

What's next for Optiver x Bavariance

We want to pare the bot down to one clean core config. Then we want to build a strategy around leaning our inventory and give it proper risk limits. We also want to start using the new counterparty data.

Built With

Share this project:

Updates

Submission history