LMSR Playground

Experiment with the logarithmic market scoring rule (LMSR). Adjust the liquidity parameter, configure outcomes, and simulate trades to see how prices and costs move under the LMSR cost function.

1. Configure the market

The market state is described by a share vector q. One entry per outcome counts the shares currently outstanding.

Higher b → prices move less for a given trade. Lower b → prices move more.

Outcome name Shares (qi) Current price pi Actions
LMSR keeps prices normalized via pi = exp(qi / b) / Σ exp(qj / b).

2. Market snapshot

Cost function C(q)
Normalization Σ exp(qi / b)
Instantaneous prices

    3. Simulate a trade

    Enter a positive number to buy shares (push price up) or a negative number to sell shares (push price down).

    How LMSR works

    The logarithmic market scoring rule (LMSR) is a cost-function market maker. It defines a potential function C(q) = b · ln(Σi exp(qi / b)) where q is the vector of outstanding shares for each outcome and b controls liquidity.

    The instantaneous price of outcome i is the gradient of the cost function: pi = exp(qi / b) / Σj exp(qj / b). Buying Δq shares of outcome i costs C(q + Δqi) – C(q). Selling shares (negative Δq) refunds that amount.

    Explore the excellent primer from Cultivate Labs for a deeper dive: How does LMSR work?.

    Ready to see LMSR inside Salesforce?

    HiveForecast applies this market-maker logic to Opportunity-level forecasting markets, then turns the resulting prices into auditable forecast signals.

    Book a demo