Companion demo to On a Simple Relationship Between Order Imbalance, Skew and Width in Over-The-Counter Trading (Cotton; work completed around 2015).
Three dealers respond to the same stream of sealed-bid enquiries against the same competing quotes, so every difference in outcome is policy. Customers are sellers with probability q; the best competing quote is exponential with mean w = 1; inventory costs c(x) = c₂x² per period. The optimal dealer quotes from the solved indifference cost and knows the flow. The CWLS dealer keeps a constant width and skews linearly in inventory, calibrated to the balanced problem, with no flow term: the benchmark policy of the literature. The no-skew dealer quotes a constant width around fair value.
Two of the paper's claims are visible here. The optimal dealer's edge over CWLS is the flow term: a shift of the quote midpoint by δ = (w/2) log(q/(1−q)) plus a slightly wider quote, worth a few percent of profit at moderate imbalance. The no-skew dealer illustrates the corollary that imbalance acts as a carrying cost: her inventory drifts to the position limit and the carry bleeds her, even though she wins plenty of trades.
All dealers face the same random draws (common random numbers). Position limit ±14. Solver: mm_core.js. Source: github.com/microprediction/inventory.