What does Prediction-Market Prices and Arbitrage conclude, in numbers, about “The Logarithmic Market Scoring Rule: Softmax, KL Divergence and the Subsidy Cap”?

Answer: Chapter 2 checks the convex duality of Hanson's logarithmic market scoring rule: prices are a softmax, a trader's expected gain is exactly the liquidity parameter times a KL divergence (a Bregman projection), and the market maker's worst-case loss is exactly the parameter times the log of the number of outcomes, 69.31 with two; subsidy times price impact tends to a constant, 34.66.

Scope of the numbers: It is not investment, trading or betting advice; all data are synthetic, generated by its programs. Chapter 7 reads the Guanzi's "the clever gain tenfold" and the Shiji's Bai Gui, "what others discard I take, what others take I let go", as information rent and the cost of carry, marked as interpretation.

中文版

Data table

The numbers below are printed verbatim by the chapter's Python program and can be reproduced by running it. standard-library Python onlyprinted values that match the answer: 69.31

b = 100, q = [30.0, -10.0, -50.0]  ->  prices [0.4718, 0.3162, 0.212]
1. |C(q) - p.q - b H(p)| < 1e-9: True
2. buy [58.63, 11.08, 0.0] shares -> prices [0.6, 0.25, 0.15]; pay 34.587
   outcome 0: net  +24.042   b ln(p'_i/p_i)  +24.042
   outcome 1: net  -23.504   b ln(p'_i/p_i)  -23.504
   outcome 2: net  -34.587   b ln(p'_i/p_i)  -34.587
3. expected profit under p' 3.3614; b KL(p'||p) 3.3614; b Bregman 3.3614
4. worst case: start uniform, outcome 0 wins, price of 0 -> 1
   n =  2: loss at q_0 = 3000 is   69.31;  b ln n =   69.31
   n =  4: loss at q_0 = 3000 is  138.63;  b ln n =  138.63
   n = 10: loss at q_0 = 3000 is  230.26;  b ln n =  230.26
   n = 50: loss at q_0 = 3000 is  391.20;  b ln n =  391.20
Reading: the LMSR is the entropy-regularised market: its prices
are a softmax, a trader's expected gain is a KL (Bregman)
divergence, and the subsidy for that information is capped at
b ln n, reached only when the market becomes certain.

Key formula

\[C(\mathbf{q}) = b \ln \sum_i e^{q_i/b}, \qquad p_i = \frac{e^{q_i/b}}{\sum_j e^{q_j/b}} .\]
Show the full program
# Chapter 2. p04: Hanson's logarithmic market scoring rule (LMSR) and its
# convex dual. Outstanding shares q (one per outcome) cost
#     C(q) = b ln sum_i exp(q_i / b),   prices p = softmax(q / b).
# Four facts are checked numerically:
#   1. duality   C(q) = p.q + b H(p), H = entropy (so C is the convex
#                conjugate of -b H on the simplex)
#   2. payoff    moving prices from p to p' and then seeing outcome i
#                earns exactly b ln(p'_i / p_i)
#   3. Bregman   a trader who believes p' and moves the price to p'
#                expects b KL(p' || p); KL is the Bregman divergence of
#                negative entropy
#   4. bound     the market maker's worst-case loss is b ln n
import math

def cost(q, b):
    m = max(q)
    return m + b * math.log(math.fsum(math.exp((x - m) / b) for x in q))

def prices(q, b):
    m = max(q)
    e = [math.exp((x - m) / b) for x in q]
    s = math.fsum(e)
    return [x / s for x in e]

def entropy(p):
    return -math.fsum(x * math.log(x) for x in p if x > 0)

def kl(a, c):
    return math.fsum(x * math.log(x / y) for x, y in zip(a, c) if x > 0)

def bregman_negent(a, c):
    f = lambda v: math.fsum(x * math.log(x) for x in v if x > 0)
    grad = [math.log(y) + 1 for y in c]
    return f(a) - f(c) - math.fsum(g * (x - y)
                                   for g, x, y in zip(grad, a, c))

if __name__ == "__main__":
    b = 100.0
    q = [30.0, -10.0, -50.0]
    p = prices(q, b)
    print("b = 100, q = {}  ->  prices {}".format(
        q, [round(x, 4) for x in p]))
    gap = cost(q, b) - math.fsum(x * y for x, y in zip(p, q)) - b * entropy(p)
    print("1. |C(q) - p.q - b H(p)| < 1e-9: {}".format(abs(gap) < 1e-9))
    target = [0.60, 0.25, 0.15]
    dq = [b * (math.log(t) - math.log(x)) for t, x in zip(target, p)]
    dq = [d - min(dq) for d in dq]          # buy only; same prices
    q2 = [x + d for x, d in zip(q, dq)]
    paid = cost(q2, b) - cost(q, b)
    print("2. buy {} shares -> prices {}; pay {:.3f}".format(
        [round(d, 2) for d in dq], target, paid))
    for i in range(3):
        print("   outcome {}: net {:+8.3f}   b ln(p'_i/p_i) {:+8.3f}".format(
            i, dq[i] - paid, b * math.log(target[i] / p[i])))
    exp_profit = math.fsum(t * (d - paid) for t, d in zip(target, dq))
    print("3. expected profit under p' {:.4f}; b KL(p'||p) {:.4f};"
          " b Bregman {:.4f}".format(exp_profit, b * kl(target, p),
                                    b * bregman_negent(target, p)))
    print("4. worst case: start uniform, outcome 0 wins, price of 0 -> 1")
    for n in (2, 4, 10, 50):
        q0 = [0.0] * n
        qn = [3000.0] + [0.0] * (n - 1)
        loss = 3000.0 - (cost(qn, b) - cost(q0, b))
        print("   n = {:2d}: loss at q_0 = 3000 is {:7.2f};"
              "  b ln n = {:7.2f}".format(n, loss, b * math.log(n)))
    print("\nReading: the LMSR is the entropy-regularised market: its prices")
    print("are a softmax, a trader's expected gain is a KL (Bregman)")
    print("divergence, and the subsidy for that information is capped at")
    print("b ln n, reached only when the market becomes certain.")

Single source and citation

Fan, Y. (2026). Prediction Market Microstructure, Bregman Information Projection and Cross-Book Arbitrage Bounds (Version 1.0.0), Chapter 2: The Logarithmic Market Scoring Rule: Softmax, KL Divergence and the Subsidy Cap. 5D Library. https://doi.org/10.5281/zenodo.24090166

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

BibTeX
@book{fan2026059,
  author    = {Fan, Yafu},
  title     = {Prediction Market Microstructure, Bregman Information Projection and Cross-Book Arbitrage Bounds},
  year      = {2026},
  publisher = {5D Library},
  edition   = {1.0.0},
  doi       = {10.5281/zenodo.24090166},
  url       = {https://doi.org/10.5281/zenodo.24090166}
}

Other chapter answers in this book