Hanson's Logarithmic Market Scoring Rule (LMSR) #
Robin Hanson's market scoring rule (MSR) turns any proper scoring rule S into a sequential
automated market maker: a trader who updates the market's reported distribution from p₁ to p₂
receives net payoff S.score p₂ ω - S.score p₁ ω when outcome ω occurs
[Hanson2003; PennockSami2007, §26.4.1, pp. 663–664]. Sequential payoffs telescope across any chain
of updates, so the market maker's net loss depends only on the initial and final distributions.
For the logarithmic scoring rule scaled by liquidity parameter b > 0, Hanson's Logarithmic
Market Scoring Rule (LMSR) is equivalent to a cost-function automated market maker with cost
function
lmsrCost b q = b * Real.log (∑ ω, Real.exp (q ω / b))
and instantaneous price vector given by the softmax distribution
lmsrPrice b q ω = Real.exp (q ω / b) / ∑ ω', Real.exp (q ω' / b)
[Hanson2007; PennockSami2007, §26.4.1, pp. 663–664].
Main definitions #
Cslib.GameTheory.PredictionMarket.msrStepPayoff: net payoffS.score p₂ ω - S.score p₁ ωof a single market scoring rule update.Cslib.GameTheory.PredictionMarket.msrTotalPayoff: cumulative payoff acrossTsequential MSR updates.Cslib.GameTheory.PredictionMarket.lmsrCost: Hanson's LMSR cost functionb * log (∑ ω, exp (q ω / b)).Cslib.GameTheory.PredictionMarket.lmsrPrice: the instantaneous softmax price vectorexp (q ω / b) / ∑ ω', exp (q ω' / b).Cslib.GameTheory.PredictionMarket.lmsrTraderPayoff: net payoff(q₂ ω - q₁ ω) - (C(q₂) - C(q₁))to the trader (equivalently, the market maker's net loss) when moving fromq₁toq₂and outcomeωoccurs.Cslib.GameTheory.PredictionMarket.lmsrCondCost,Cslib.GameTheory.PredictionMarket.lmsrCondPrice,Cslib.GameTheory.PredictionMarket.lmsrCondUpdate: conditional LMSR cost functionC_ψ, Bayes-rule conditional security priceP(φ | ψ), and post-trade share update for purchasingδshares of conditional securityS_{φ|ψ}[PennockSami2007, Exercise 26.3, pp. 674–675].
Main results #
Cslib.GameTheory.PredictionMarket.msrTotalPayoff_eq_sub: telescoping of sequential MSR payoffs.Cslib.GameTheory.PredictionMarket.msrStepPayoff_expected_lt: myopic truthfulness of a strictly proper market scoring rule.Cslib.GameTheory.PredictionMarket.lmsrPrice_mem_openProbSimplex: LMSR instantaneous prices always lie in the open probability simplex.Cslib.GameTheory.PredictionMarket.hasFDerivAt_lmsrCost,Cslib.GameTheory.PredictionMarket.hasDerivAt_lmsrCost_update: the gradient (and coordinate partial derivatives) oflmsrCost bequals the softmax price vectorlmsrPrice b q[PennockSami2007, §26.4.1, pp. 663–664].Cslib.GameTheory.PredictionMarket.lmsrCost_bregmanDivergence_eq,Cslib.GameTheory.PredictionMarket.convexOn_lmsrCost: original mathematical companions proving the exact KL-divergence Bregman identity forlmsrCost band global convexity oflmsrCost bonℝ^Ω.Cslib.GameTheory.PredictionMarket.lmsrTraderPayoff_eq_msrStepPayoff,Cslib.GameTheory.PredictionMarket.sum_lmsrTraderPayoff_eq_msrTotalPayoff,Cslib.GameTheory.PredictionMarket.exists_shares_lmsrTraderPayoff_eq_msrStepPayoff: pointwise and sequential equivalence between LMSR cost-function trading and Hanson's logarithmic market scoring rule [PennockSami2007, §26.4.1, pp. 663–664].Cslib.GameTheory.PredictionMarket.lmsrTraderPayoff_zero_le,Cslib.GameTheory.PredictionMarket.lmsrTraderPayoff_zero_seq_le,Cslib.GameTheory.PredictionMarket.exists_lmsrTraderPayoff_zero_gt: worst-case market-maker loss starting from zero shares is at mostb * log |Ω|, and this bound is tight [PennockSami2007, §26.4.1, pp. 663–664; Hanson2007].Cslib.GameTheory.PredictionMarket.integral_lmsrCondPrice_eq_sub_lmsrCondCost,Cslib.GameTheory.PredictionMarket.lmsrCost_lmsrCondUpdate_sub,Cslib.GameTheory.PredictionMarket.lmsrTraderPayoff_lmsrCondUpdate,Cslib.GameTheory.PredictionMarket.lmsrPrice_lmsrCondUpdate_of_notMem: integrating the Bayes-rule conditional price ofS_{φ|ψ}from0toδrecoversC_ψ(q + δ · 1_φ) - C_ψ(q), andlmsrCondUpdategives the exact post-trade quantity vector refunding cost outsideψwhile leaving prices outsideψunchanged [PennockSami2007, Exercise 26.3, pp. 674–675].
References #
Net payoff S.score p₂ ω - S.score p₁ ω to a trader who updates the market scoring rule from
distribution p₁ to p₂ when outcome ω realizes
[Hanson2003; PennockSami2007, §26.4.1, pp. 663–664].
Cumulative payoff across T sequential updates reports 0 → reports 1 → … → reports T under
market scoring rule S.
Sequential MSR payoffs telescope: the net transfer from the market maker across any chain of updates depends only on the initial and final distributions [PennockSami2007, §26.4.1, pp. 663–664].
Myopic truthfulness of a strictly proper market scoring rule: a trader with true belief q ∈ P
strictly maximizes expected net MSR payoff by updating the current report p₁ to q
[Hanson2003; PennockSami2007, §26.4.1, pp. 663–664].
Net payoff (q₂ ω - q₁ ω) - (C(q₂) - C(q₁)) to the trader moving the LMSR state from q₁ to
q₂ when outcome ω occurs. By zero-sum accounting, this equally equals the market maker's net
loss on that transition.
At zero shares, the LMSR price is uniform over Ω.
Log-inversion of softmax: for any strictly positive distribution p ∈ openProbSimplex Ω, the
share vector ω ↦ b * log (p ω) induces price vector p.
Coordinate partial derivative of lmsrCost b: ∂C / ∂q_ω = lmsrPrice b q ω
[PennockSami2007, §26.4.1, pp. 663–664].
Convexity, KL-divergence Bregman identity, and monotonicity #
Mathematical identity (original to this formalization): the Bregman divergence
bregmanDivergence (lmsrCost b) (lmsrPrice b) q₂ q₁ equals b times the KL divergence (expected
log-score gap) between the induced softmax distributions lmsrPrice b q₁ and lmsrPrice b q₂.
Global convexity of lmsrCost b on ℝ^Ω (original mathematical companion deduced from
lmsrCost_subgradient_le and convexOn_of_forall_add_le).
Equivalence with sequential logarithmic market scoring rule #
Single-step LMSR / MSR equivalence [PennockSami2007, §26.4.1, pp. 663–664]: the net
payoff of moving the cost-function market maker from q₁ to q₂ equals the payoff of updating
Hanson's scaled logarithmic market scoring rule from lmsrPrice b q₁ to lmsrPrice b q₂.
Sequential LMSR / MSR equivalence [PennockSami2007, §26.4.1, pp. 663–664]: across any
finite sequence of share updates qs 0, …, qs T, cumulative cost-function trading payoffs equal
cumulative logarithmic MSR payoffs (and telescope to lmsrTraderPayoff b (qs 0) (qs T) ω).
Bounded worst-case market-maker loss and tightness #
General worst-case LMSR market-maker loss bound from an arbitrary initial state q₀: for every
final share vector q and every outcome ω, the market maker's net loss is at most
-b * log (lmsrPrice b q₀ ω).
Worst-case LMSR market-maker loss bound
[PennockSami2007, §26.4.1, pp. 663–664; Hanson2007]: starting from zero initial shares (q₀ = 0,
uniform initial prices), for every final share vector q and every outcome ω, the market maker
loses at most b * Real.log |Ω|.
Sequential form of the worst-case LMSR loss bound: starting from qs 0 = 0, the cumulative
market-maker loss over any number T of trades and any outcome ω is at most
b * Real.log |Ω| [PennockSami2007, §26.4.1, pp. 663–664].
Tightness of the b * log |Ω| worst-case loss bound: for every outcome ω and every
ε > 0, there exists a share vector q causing market-maker loss strictly exceeding
b * Real.log |Ω| - ε.
Conditional LMSR securities (Exercise 26.3, pp. 674–675) #
Instantaneous Bayes-rule price of conditional security S_{φ|ψ}: the price of S_{φ∧ψ}
divided by the price of S_ψ [PennockSami2007, Exercise 26.3, p. 674].
New LMSR share vector after a trader purchases δ shares of conditional security S_{φ|ψ}:
states in φ ∩ ψ gain δ shares, states in ψ \ φ stay unchanged, and states outside ψ gain
C_ψ(q + δ · 1_φ) - C_ψ(q) shares so the cost is refunded when ψ does not occur
[PennockSami2007, Exercise 26.3(b), p. 675].
Bayes-rule conditional price simplifies directly to the restricted softmax ratio over ψ.
Derivative of t ↦ C_ψ(q + t · 1_φ) equals the instantaneous conditional price of S_{φ|ψ}
at q + t · 1_φ [PennockSami2007, Exercise 26.3(a), p. 674].
Exercise 26.3(a) ([PennockSami2007, p. 674]): integrating the Bayes-rule instantaneous
price of S_{φ|ψ} from 0 to δ equals the conditional cost difference
C_ψ(q + δ · 1_φ) - C_ψ(q).
Exercise 26.3(b), total cost identity ([PennockSami2007, p. 675]): updating the LMSR
share vector from q to lmsrCondUpdate b φ ψ q δ increases the full LMSR cost C(q) by
exactly the conditional cost C_ψ(q + δ · 1_φ) - C_ψ(q).
Exercise 26.3(b), conditional security payoff ([PennockSami2007, p. 675]): moving the LMSR
state from q to lmsrCondUpdate b φ ψ q δ delivers exact conditional-security net payoff:
δ - cost when ω ∈ φ ∩ ψ, -cost when ω ∈ ψ \ φ, and 0 (cancelled and refunded) when
ω ∉ ψ.
Exercise 26.3(b), price invariance outside ψ: purchasing δ shares of conditional
security S_{φ|ψ} leaves the instantaneous price of every outcome outside ψ unchanged.