What does Order Books, Hawkes Processes and Toxic Flow conclude, in numbers, about “Information Asymmetry and the Bid–Ask Spread: Glosten–Milgrom and Kyle”?

Answer: Part of the spread is the cost of trading with the informed. In the Glosten–Milgrom model the spread comes entirely from adverse selection; with a prior of one-half it equals the informed share times the difference in values, and it narrows as trading reveals information. The dealer's gains from noise traders exactly offset her losses to the informed, and underestimating the informed share brings systematic losses. In Kyle's model the insider hides his orders in the noise; the price-impact coefficient of the continuous auction, \(\sqrt{\Sigma_0}/\sigma_u\), is twice the one-period value, and information enters the price linearly. The name in the author's framework has been corrected to Glosten.

Scope of the numbers: Why does a market maker quote a spread? Why do orders arrive in clusters? Can "toxic" order flow be measured from trade data? This book presents mathematical models for teaching and research and is not investment or trading advice. Marked boxes separate published evidence, runnable Python calculations (16 programs), classical sources and the author's models and hypotheses; all data in the book are fictional or simulated.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python only

spread at the prior (pi1/2) equals mu x (V_H - V_L):
mu bid ask spread
0.0100.000 100.000 0.000
0.199.900 100.100 0.200
0.399.700 100.300 0.600
0.599.500 100.500 1.000
0.999.100 100.900 1.800
60 trades, true value V_H, 20,000 sessions per row (dealer knows mu):
mean spread at trade P(pi_60 dealer P&L per trade
mu t1 t=10 t=30 t=60 > 0.99) informed noise total
0.10.200 0.183 0.153 0.120 0.012 -0.0698 +0.0694 -0.0003
0.30.600 0.307 0.092 0.018 0.930 -0.0526 +0.0526 +0.0001
0.51.000 0.169 0.006 0.000 1.000 -0.0234 +0.0232 -0.0002
dealer underestimates toxicity (true mu 0.3; V_H and V_L equally often):
dealer's mu 0.30: P&L per trade -0.0001 (s.e. 0.0002)
dealer's mu 0.20: P&L per trade -0.0216 (s.e. 0.0002)
dealer's mu 0.10: P&L per trade -0.0761 (s.e. 0.0002)
dealer's mu 0.05: P&L per trade -0.1494 (s.e. 0.0003)

Key formula

\[a = E[V \mid \text{买}] = \frac{\pi\,(\mu + \tfrac{1-\mu}{2})\,V_H + (1-\pi)\,\tfrac{1-\mu}{2}\,V_L}{\pi\mu + \tfrac{1-\mu}{2}}, \qquad b = E[V \mid \text{卖}] .\]
Show the full program
# Glosten-Milgrom (1985) sequential-trade model. The asset is worth V_H = 101 or V_L = 99
# (prior 1/2). Each period one trader arrives: informed with probability mu (buys if V_H,
# sells if V_L) or uninformed (buys or sells with probability 1/2 each). A competitive,
# risk-neutral dealer sets ask = E[V | buy] and bid = E[V | sell] and updates her belief.
import random, statistics

VH, VL = 101.0, 99.0

def quotes(pi, mu):
    pbh, pbl = mu + (1 - mu) / 2, (1 - mu) / 2          # P(buy | V_H), P(buy | V_L)
    pb = pi * pbh + (1 - pi) * pbl
    ask = (pi * pbh * VH + (1 - pi) * pbl * VL) / pb
    psh, psl = 1 - pbh, 1 - pbl
    ps = pi * psh + (1 - pi) * psl
    bid = (pi * psh * VH + (1 - pi) * psl * VL) / ps
    return bid, ask, pi * pbh / pb, pi * psh / ps          # posteriors after buy / sell

def session(rng, mu, mu_dealer, n=60, v=VH):
    pi, pnl_inf, pnl_noise, spreads = 0.5, 0.0, 0.0, []
    for _ in range(n):
        bid, ask, pi_b, pi_s = quotes(pi, mu_dealer)
        spreads.append(ask - bid)
        if rng.random() < mu:                              # informed trader
            side, who = (1 if v == VH else -1), "inf"
        else:
            side, who = (1 if rng.random() < 0.5 else -1), "noise"
        gain = (ask - v) if side == 1 else (v - bid)        # dealer's gain on this trade
        if who == "inf":
            pnl_inf += gain
        else:
            pnl_noise += gain
        pi = pi_b if side == 1 else pi_s
    return spreads, pnl_inf, pnl_noise, pi

if __name__ == "__main__":
    print("spread at the prior (pi = 1/2) equals mu x (V_H - V_L):")
    print("   mu     bid      ask    spread")
    for mu in (0.0, 0.1, 0.3, 0.5, 0.9):
        b, a, _, _ = quotes(0.5, mu)
        print(f"  {mu:.1f}  {b:7.3f}  {a:7.3f}  {a - b:6.3f}")
    rng = random.Random(1985)
    print("60 trades, true value V_H, 20,000 sessions per row (dealer knows mu):")
    print("            mean spread at trade        P(pi_60    dealer P&L per trade")
    print("   mu    t=1   t=10   t=30   t=60   > 0.99)  informed   noise    total")
    for mu in (0.1, 0.3, 0.5):
        S, I, N, P = [], [], [], []
        for _ in range(20_000):
            sp, pi_, pn, pf = session(rng, mu, mu)
            S.append(sp); I.append(pi_ / 60); N.append(pn / 60); P.append(pf > 0.99)
        m = [statistics.fmean(s[t] for s in S) for t in (0, 9, 29, 59)]
        i, nn = statistics.fmean(I), statistics.fmean(N)
        print(f"  {mu:.1f}  " + "  ".join(f"{x:.3f}" for x in m)
              + f"   {statistics.fmean(P):.3f}   {i:+.4f}  {nn:+.4f}  {i + nn:+.4f}")
    print("dealer underestimates toxicity (true mu 0.3; V_H and V_L equally often):")
    for md in (0.3, 0.2, 0.1, 0.05):
        tot = []
        for k in range(20_000):
            v = VH if k % 2 == 0 else VL
            _, pi_, pn, _ = session(rng, 0.3, md, v=v)
            tot.append((pi_ + pn) / 60)
        se = statistics.stdev(tot) / len(tot) ** 0.5
        print(f"   dealer's mu {md:.2f}: P&L per trade {statistics.fmean(tot):+.4f}"
              f" (s.e. {se:.4f})")

Single source and citation

Fan, Y. (2026). High-Frequency Limit Order Book Microstructure, Hawkes Self-Exciting Point Processes and Adverse-Selection Flow Toxicity (Version 1.0.0), Chapter 1: Information Asymmetry and the Bid–Ask Spread: Glosten–Milgrom and Kyle. 5D Library. https://doi.org/10.5281/zenodo.23828065

DOI: 10.5281/zenodo.23828065 · Read the monograph · 5DL-B-045 · v1.0.0 · CC-BY-NC-ND-4.0

BibTeX
@book{fan2026045,
  author    = {Fan, Yafu},
  title     = {High-Frequency Limit Order Book Microstructure, Hawkes Self-Exciting Point Processes and Adverse-Selection Flow Toxicity},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.23828065},
  url       = {https://doi.org/10.5281/zenodo.23828065}
}

Other chapter answers in this book