The imbalance symmetry
Companion demo to On a Simple Relationship Between Order Imbalance, Skew and Width in Over-The-Counter Trading.
A dealer faces sealed-bid enquiries that are sellers with probability $q$ and buyers with probability $1-q$. The theorem states that the imbalanced problem is the balanced one in disguise: solve the balanced problem with carrying cost multiplied by $M(q) = 1/(2\sqrt{q(1-q)})$, tilt the indifference cost by $\delta = \tfrac{w}{2}\log\tfrac{q}{1-q}$ per unit, and widen the non-discretionary width by $\gamma$. Below, both problems are solved numerically and independently.
Look for: the dots landing on the line. That coincidence is the theorem, and the “max deviation” readout is its size — solver precision, not approximation.
Model and solver: exponential best-competitor with width w = 1, grid x = −10…10, Levenberg–Marquardt on the steady-state consistency equation (mm_core.js).