Glosten-Milgrom Market Maker — Patch Update
Audit / Issue Found
The strategy was posting a single buy order and a single sell order each cycle, each at the full target size adjusted for the bot's inventory skew. On a strong directional move, the full target could be filled in one go, defeating the whole point of the Bayesian-spread model — which assumes informed traders bleed the maker over MANY small fills, not one big one.
Before the patch
If the market spiked into the ask, the bot could sell all of its intended size at the first price and miss the rest of the move up. If the market dumped into the bid, the bot bought its entire target inventory at the very top of the dump and had nothing left to average down with. The asymmetric sizing from the model worked but the placement was lump-sum.
After the patch
The buy and sell sizes computed by the Glosten-Milgrom model are now spread across a stack of four orders per side, spaced ten basis points apart by default. The model's asymmetry is preserved: the total committed quantity on each side still equals exactly what the math says it should — it is just distributed across rungs rather than dropped at a single price. Only the top rung fills on a single tick. Deeper rungs fill if the market continues into them, which improves the average fill price in either direction.
You can adjust the number of rungs and the width of the rung band per pair. Setting rungs to one restores the previous behaviour.
Bottom line
The strategy now behaves like it actually models, many small adversely-selected fills that average out, instead of betting the full size on a single tick of the market.
Follow-up correctness audit, same day
One real issue was found and fixed in a deeper review of the new laddered placement.
The balance check that decides whether to place orders was only looking at the size of a single rung, not the size of the entire stack. With the Bayesian inventory skew enabled, the ladder on one side can be significantly bigger than a single rung would suggest. The old check could let the loop start placing four rungs while only having enough cash or holdings for one or two. The fix raises both gates so they look at the full ladder, the total cash needed for all bid rungs combined, and the total holdings needed for all ask rungs combined. If you do not have enough for the whole ladder, the loop does not start, and the strategy waits for the next cycle.
Seven other findings were checked and confirmed as documentation suggestions or false positives. No code change was needed for those.