Lecture 5: Solving the Glosten-Milgrom Market Making Model
A practical series for the discerning retail trader and the quantitative alchemist on Market Microstructure
🕯️Greetings, esteemed reader!
In the previous post, we introduced the Glosten-Milgrom market-making model, which makes the difference between informed and retail (noise/liquidity) traders very clear.
A main conclusion is a proof of why a Market Maker doesn’t want to trade with informed traders, and if we do that, we need to have enough noise traders cover the loss we take trading with informed professionals.
There was a link to the repo to get into some charts and code to play with - do that if you haven’t yet!
In today’s post, I’d like to define the market-making task and explicitly solve the equilibrium in the Glosten-Milgrom model step-by-step in 3 steps. I’d like to keep such a framework to apply to a more sophisticated MM models later.
The Task
Find equilibrium bid and ask prices that yield zero expected profit conditional on each trade side.
Why zero profit? Because in perfect competition, any deviation from zero expected profit would be arbitraged away by competitors.
Solution
Step 1: Conditional Probabilities
Let's derive the MM's posterior probability that a trader is informed given the observed trade direction.
For a Buy Order
An informed trader buys only if . So, the probability the trader is informed, conditional on seeing a buy order, is (the previous lecture explains this formula):
For a Sell Order
Similarly,
Step 2: Conditional Expected Values
The MM sets prices based on expected fundamental values, conditional on trade direction.
If a buy order is observed, MM revises upward (see previous lecture for the explanation):
If a sell order is observed, the MM revises downward:
Note that’s derived using Bayes’ theorem:
Step 3: Equilibrium Spread
This spread directly compensates the MM for adverse selection risk.
Higher informed-trader probability means wider spread and larger uncertainty also means wider spread.
Thus, the equilibrium is neatly defined by these explicit formulas.
That’s it!
As usual, a quick sanity check for the solution - add it to your ide and play around with numbers to get a feel of how it works.
import numpy as np
def equilibrium_prices(q, v_H, v_L, mu):
E_v = q * v_H + (1 - q) * v_L
pi_buy = (mu * q) / (mu * q + (1 - mu) / 2)
pi_sell = (mu * (1 - q)) / (mu * (1 - q) + (1 - mu) / 2)
ask = pi_buy * v_H + (1 - pi_buy) * E_v
bid = pi_sell * v_L + (1 - pi_sell) * E_v
spread = ask - bid
return bid, ask, spread
# Example:
bid, ask, spread = equilibrium_prices(q=0.5, v_H=101, v_L=99, mu=0.15)
print(f"Bid: {bid:.3f}, Ask: {ask:.3f}, Spread: {spread:.3f}")
It gives equilibrium quotes consistent with our 3-step theory.
✨ Practical Implications
Once again, in a competitive market, MMs do not profit directly from informed flow! The spread is purely compensatory. Real-world MMs earn profits from fees, rebates, latency advantages, inventory management, and superior toxicity estimation.
The GM equilibrium is a baseline against which to measure real-world profitability.
Stay informed and may alpha be ever in thy favor! 🚀