LMSR: the logarithmic market scoring rule, derived and simulated
From a scoring rule to a market#
A scoring rule pays a forecaster according to their reported probability and the outcome. The logarithmic rule pays when outcome occurs. Hanson's construction is a relay: each trader changes the standing forecast from to and is paid the difference in scores,
The sponsor pays only the first forecaster's score relative to the initial report and the last one's, because all intermediate terms telescope. Hanson showed this is equivalent to an automated market maker selling contracts that pay $1 on each outcome, priced by the cost function
where is the number of shares on outcome sold so far. Prices are a softmax of outstanding shares, are always positive and always sum to one.
The cost of a trade#
For a binary market, write , so that . Buying Yes shares costs . Expressed in prices:
Two practical consequences:
- Price impact is linear in log-odds. The number of shares needed to move the price by one unit of log-odds is always . Moving from 50% to 73% (log-odds 0 to 1) takes as many shares as moving from 73% to 88% (1 to 2).
- The average price paid lies between start and end. Moving 50¢ → 60¢ with buys 40.5 shares for $22.31, an average price of 55.0¢.
Why the loss is bounded by b ln n#
Let the market start at with uniform prices. If outcome occurs, the sponsor pays and has collected . The loss is
because . The bound is reached only in the limit where the price of the winning outcome is driven to 1. Equivalently, : the sponsor's loss is exactly the log score of the final price, shifted. A sponsor who wants sharper final prices pays more, by an amount set entirely by .
Choosing b: a simulation#
Large means deep markets and a large subsidy. Small means a cheap market whose price any single trader can push around. We simulated 6,000 binary markets per value of :
- true probability , outcome drawn from it;
- 60 traders arrive in sequence, each with belief , ;
- each trades toward their belief but spends at most $10.
| b | Mean |final price − π| | Brier of final price | Brier of true π (floor) | Mean subsidy | Worst case |
|---|---|---|---|---|---|
| 10 | 0.1075 | 0.2050 | 0.1844 | $0.95 | $6.93 |
| 25 | 0.0874 | 0.1934 | 0.1790 | $3.12 | $17.33 |
| 50 | 0.0734 | 0.1926 | 0.1845 | $6.24 | $34.66 |
| 100 | 0.0673 | 0.1896 | 0.1840 | $13.26 | $69.31 |
| 200 | 0.0621 | 0.1870 | 0.1810 | $27.29 | $138.63 |
| 400 | 0.0645 | 0.1879 | 0.1824 | $53.88 | $277.26 |
The interior optimum has a clear explanation. When is small relative to traders' budgets, every trader can move the price all the way to their own noisy belief, so the final price is roughly the last trader's opinion rather than an average. When is large, each budget moves the price only a little and 60 traders are not enough to get it to the truth. The sweet spot puts at around 10–20 times the typical trader's budget. In this setting a sponsor pays roughly $13–27 per market for most of the achievable accuracy.
Worked example: a three-outcome market#
Three outcomes (A, B, C), , so the sponsor's worst case is = $54.93. Each trade costs the change in equation (2); prices always sum to 100¢.
| Trade | Cost | Price A | Price B | Price C | Cumulative paid |
|---|---|---|---|---|---|
| start | – | 33.3¢ | 33.3¢ | 33.3¢ | – |
| Trader 1 buys 40 shares of A | $17.13 | 52.7¢ | 23.7¢ | 23.7¢ | $17.13 |
| Trader 2 buys 25 shares of C | $7.14 | 45.7¢ | 20.5¢ | 33.8¢ | $24.27 |
| Trader 3 buys 60 shares of B | $19.47 | 30.9¢ | 46.1¢ | 22.9¢ | $43.73 |
| Trader 4 sells 30 shares of B | −$11.67 | 39.1¢ | 32.0¢ | 28.9¢ | $32.06 |
Outstanding shares end at A 40, B 30, C 25. The sponsor's net result if each outcome occurs is A: −$7.94, B: +$2.06, C: +$7.06 (a positive figure is a gain for the sponsor). Every one of those is within the $54.93 bound, as equation (4) guarantees. Note trader 4: selling shares is buying the other outcomes, and it is always possible. LMSR never runs out of liquidity.
Extensions and their costs#
Liquidity sensitivity. Fixed means the market is as deep after $1m of volume as after $10. Othman, Pennock, Reeves and Sandholm (2010) proposed a liquidity-sensitive variant in which grows with volume. It loses the strict bound in exchange for depth that scales with interest.
Many outcomes. The bound grows only as , so a 100-outcome market costs about 6.6 times as much to subsidise as a binary one, not 50 times. This is LMSR's decisive advantage over running 100 separate order books.
Fees. Adding a fee per trade recovers part of the subsidy but breaks the clean scoring-rule interpretation: traders no longer move the price all the way to their belief. That is visible as a no-trade band, the same effect fees create in order books (see fee arithmetic).
# LMSR binary, in full
import math
def price(qy, qn, b): return 1 / (1 + math.exp(-(qy - qn) / b))
def cost(qy, qn, b): return b * math.log(math.exp(qy / b) + math.exp(qn / b))
def buy_yes(qy, qn, b, d): return cost(qy + d, qn, b) - cost(qy, qn, b)
buy_yes(0, 0, 100, 100 * math.log(1.5)) # 22.31: moves 50c -> 60c
Questions#
What is the logarithmic market scoring rule?
An automated market maker proposed by Robin Hanson that prices outcomes as a softmax of outstanding shares, C(q) = b ln Σ e^(q_j/b). It always offers to trade, and its total loss is bounded by b ln n for n outcomes.
How do you choose the LMSR liquidity parameter b?
Larger b gives deeper markets at higher subsidy. In our simulation accuracy was best when b was roughly 10–20 times the typical trader's budget; above that, traders could not move the price enough to aggregate their information.
What is the maximum loss of an LMSR market maker?
b ln n, where n is the number of outcomes. For a binary market with b = 100, that is $69.31.
References#
- Hanson, R. (2003). Combinatorial information market design. Information Systems Frontiers, 5(1), 107–119.
- Hanson, R. (2007). Logarithmic market scoring rules for modular combinatorial information aggregation. Journal of Prediction Markets, 1(1), 3–15.
- Othman, A., Pennock, D. M., Reeves, D. M. and Sandholm, T. (2010). A practical liquidity-sensitive automated market maker. Proceedings of the 11th ACM Conference on Electronic Commerce (EC '10), 377–386.
- Chen, Y. and Pennock, D. M. (2007). A utility framework for bounded-loss market makers. Proceedings of UAI 2007.
DisclosureThis note is research and education. It is not investment advice or an offer to trade, and nothing in it describes the firm's own results. Code and outputs: research/amm.py in our research repository, reproducible with a fixed seed.