Documentation

CslibFrontier.GameTheory.PredictionMarket.DynamicParimutuel

Pennock's Dynamic Parimutuel Market (DPM) #

This module formalizes the share-ratio Dynamic Parimutuel Market (DPM) introduced by Pennock (2004) and presented in [PennockSami2007, §26.4.2, pp. 664–665].

Unlike market scoring rules (which pay a fixed $1 per winning share), a dynamic parimutuel market splits the entire wager pool C(q) equally among all q ω shares of the winning outcome ω, yielding a per-share winning payout dpmPayoffPerShare κ q ω = C(q) / q ω. The share-ratio cost function

dpmCost κ q = κ * Real.sqrt (∑ j, q j ^ 2)

with instantaneous price vector dpmPrice κ q ω = κ * q ω / Real.sqrt (∑ j, q j ^ 2) satisfies:

Main definitions #

Main results #

References #

noncomputable def Cslib.GameTheory.PredictionMarket.dpmCost {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) :

Pennock's share-ratio Dynamic Parimutuel Market (DPM) cost function: C(q) = κ * Real.sqrt (∑ j, q j ^ 2) [PennockSami2007, §26.4.2, p. 665].

noncomputable def Cslib.GameTheory.PredictionMarket.dpmPrice {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) (ω : Ω) :

Instantaneous DPM price function ∂C / ∂q_ω: p_ω(q) = κ * q ω / Real.sqrt (∑ j, q j ^ 2) [PennockSami2007, §26.4.2, p. 665].

noncomputable def Cslib.GameTheory.PredictionMarket.dpmPayoffPerShare {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) (ω : Ω) :

Parimutuel payoff per winning share of outcome ω at terminal share vector q: the total wager pool dpmCost κ q divided equally among all q ω winning shares [PennockSami2007, §26.4.2, pp. 664–665].

noncomputable def Cslib.GameTheory.PredictionMarket.dpmImpliedProb {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) (ω : Ω) :

Implied parimutuel probability of outcome ω: instantaneous price divided by winning payoff per share, p_ω(q) / (C(q) / q_ω).

noncomputable def Cslib.GameTheory.PredictionMarket.dpmTraderNetPayoff {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q₁ q₂ : Ω → ℝ) (ω : Ω) :

Net payoff to a trader moving the DPM from q₁ to q₂ and holding the acquired bundle q₂ - q₁ until outcome ω realizes at final pool state q₂.

noncomputable def Cslib.GameTheory.PredictionMarket.dpmMarketMakerLoss {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q₀ qT : Ω → ℝ) (ω : Ω) :

Net loss of a DPM market maker who initializes the pool with share allocation q₀ and subsidy C(q₀) when trading finishes at share vector q_T and outcome ω realizes [PennockSami2007, §26.4.2, p. 665].

@[simp]
theorem Cslib.GameTheory.PredictionMarket.dpmCost_apply {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) :
dpmCost κ q = κ * √(∑ j : Ω, q j ^ 2)
@[simp]
theorem Cslib.GameTheory.PredictionMarket.dpmPrice_apply {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) (ω : Ω) :
dpmPrice κ q ω = κ * q ω / √(∑ j : Ω, q j ^ 2)
@[simp]
theorem Cslib.GameTheory.PredictionMarket.dpmPayoffPerShare_apply {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) (ω : Ω) :
dpmPayoffPerShare κ q ω = dpmCost κ q / q ω
@[simp]
theorem Cslib.GameTheory.PredictionMarket.dpmImpliedProb_apply {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) (ω : Ω) :
dpmImpliedProb κ q ω = dpmPrice κ q ω / dpmPayoffPerShare κ q ω
@[simp]
theorem Cslib.GameTheory.PredictionMarket.dpmTraderNetPayoff_apply {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q₁ q₂ : Ω → ℝ) (ω : Ω) :
dpmTraderNetPayoff κ q₁ q₂ ω = (q₂ ω - q₁ ω) * dpmPayoffPerShare κ q₂ ω - (dpmCost κ q₂ - dpmCost κ q₁)
@[simp]
theorem Cslib.GameTheory.PredictionMarket.dpmMarketMakerLoss_apply {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q₀ qT : Ω → ℝ) (ω : Ω) :
dpmMarketMakerLoss κ q₀ qT ω = (qT ω - q₀ ω) * dpmPayoffPerShare κ qT ω - (dpmCost κ qT - dpmCost κ q₀)
theorem Cslib.GameTheory.PredictionMarket.dpmCost_smul {Ω : Type u_1} [Fintype Ω] (κ : ℝ) {t : ℝ} (ht : 0 ≤ t) (q : Ω → ℝ) :
dpmCost κ (t • q) = t * dpmCost κ q

Positive homogeneity of degree 1: scaling all shares by t ≥ 0 scales dpmCost κ by t.

theorem Cslib.GameTheory.PredictionMarket.dpmPrice_mul_eq {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) (j k : Ω) :
dpmPrice κ q j * q k = dpmPrice κ q k * q j

Share-ratio proportionality [PennockSami2007, §26.4.2, p. 665]: instantaneous DPM prices are proportional to outstanding shares (p_j * q_k = p_k * q_j).

theorem Cslib.GameTheory.PredictionMarket.dpmPrice_div_dpmPrice {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : κ ≠ 0) {q : Ω → ℝ} (hq : q ≠ 0) (j : Ω) {k : Ω} (hk : q k ≠ 0) :
dpmPrice κ q j / dpmPrice κ q k = q j / q k

Ratio form of share-ratio proportionality: p_j / p_k = q_j / q_k whenever κ ≠ 0, q ≠ 0, and q k ≠ 0 [PennockSami2007, §26.4.2, p. 665].

theorem Cslib.GameTheory.PredictionMarket.sum_mul_dpmPrice {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q : Ω → ℝ) :
∑ j : Ω, q j * dpmPrice κ q j = dpmCost κ q

Euler degree-1 identity for DPM: ∑ j, q j * dpmPrice κ q j = dpmCost κ q.

theorem Cslib.GameTheory.PredictionMarket.dpmImpliedProb_eq {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : κ ≠ 0) {q : Ω → ℝ} (hq : q ≠ 0) (ω : Ω) :
dpmImpliedProb κ q ω = q ω ^ 2 / ∑ j : Ω, q j ^ 2

Closed-form implied probability in a share-ratio DPM: dpmImpliedProb κ q ω = q ω ^ 2 / ∑ q², independent of κ ≠ 0.

theorem Cslib.GameTheory.PredictionMarket.dpmImpliedProb_mem_probSimplex {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : κ ≠ 0) {q : Ω → ℝ} (hq : q ≠ 0) :

Implied DPM probabilities form a probability distribution in probSimplex Ω (∑ ω, p_ω / (C(q) / q_ω) = 1).

Gradient and PDE uniqueness (§26.4.2, p. 665) #

theorem Cslib.GameTheory.PredictionMarket.hasFDerivAt_sum_sq {Ω : Type u_1} [Fintype Ω] (q : Ω → ℝ) :
HasFDerivAt (fun (x : Ω → ℝ) => ∑ j : Ω, x j ^ 2) (dotCLM fun (j : Ω) => 2 * q j) q

Fréchet derivative of the squared Euclidean norm x ↦ ∑ j, x j ^ 2 on Ω → ℝ.

theorem Cslib.GameTheory.PredictionMarket.hasDerivAt_update_of_hasFDerivAt_dotCLM {Ω : Type u_1} [Fintype Ω] [DecidableEq Ω] {f : (Ω → ℝ) → ℝ} {g q : Ω → ℝ} (hf : HasFDerivAt f (dotCLM g) q) (ω : Ω) :
HasDerivAt (fun (t : ℝ) => f (Function.update q ω t)) (g ω) (q ω)

Coordinate partial derivative from a dotCLM Fréchet derivative on Ω → ℝ.

theorem Cslib.GameTheory.PredictionMarket.hasFDerivAt_dpmCost {Ω : Type u_1} [Fintype Ω] (κ : ℝ) {q : Ω → ℝ} (hq : q ≠ 0) :

Gradient identity for DPM [PennockSami2007, §26.4.2, p. 665]: for q ≠ 0, the Fréchet derivative of dpmCost κ at q is v ↦ v ⬝ᵥ dpmPrice κ q.

theorem Cslib.GameTheory.PredictionMarket.hasDerivAt_dpmCost_update {Ω : Type u_1} [Fintype Ω] [DecidableEq Ω] (κ : ℝ) {q : Ω → ℝ} (hq : q ≠ 0) (ω : Ω) :
HasDerivAt (fun (t : ℝ) => dpmCost κ (Function.update q ω t)) (dpmPrice κ q ω) (q ω)

Coordinate partial derivative of dpmCost κ: ∂C / ∂q_ω = dpmPrice κ q ω for q ≠ 0 [PennockSami2007, §26.4.2, p. 665].

theorem Cslib.GameTheory.PredictionMarket.dpmCost_unique_of_shareRatio {Ω : Type u_1} [Fintype Ω] [Nonempty Ω] {C : (Ω → ℝ) → ℝ} {p : (Ω → ℝ) → Ω → ℝ} (hdiff : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → HasFDerivAt C (dotCLM (p q)) q) (hratio : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → ∀ (j k : Ω), p q j * q k = p q k * q j) (heuler : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → ∑ j : Ω, q j * p q j = C q) :
∃! κ : ℝ, ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → C q = dpmCost κ q ∧ p q = dpmPrice κ q

Uniqueness of the share-ratio DPM cost function [PennockSami2007, §26.4.2, p. 665]: any differentiable cost function C on the positive orthant U = {q | ∀ j, 0 < q j} whose gradient p(q) satisfies the share-ratio constraint p_j * q_k = p_k * q_j and the parimutuel Euler identity ∑ j, q_j * p_j = C(q) must equal dpmCost κ (with gradient dpmPrice κ) for a unique constant κ : ℝ.

theorem Cslib.GameTheory.PredictionMarket.dpmCost_unique_of_homog {Ω : Type u_1} [Fintype Ω] [Nonempty Ω] {C : (Ω → ℝ) → ℝ} {p : (Ω → ℝ) → Ω → ℝ} (hdiff : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → HasFDerivAt C (dotCLM (p q)) q) (hratio : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → ∀ (j k : Ω), p q j * q k = p q k * q j) (hhomog : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → ∀ (t : ℝ), 0 < t → C (t • q) = t * C q) :
∃! κ : ℝ, ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → C q = dpmCost κ q ∧ p q = dpmPrice κ q

Uniqueness of the share-ratio DPM from positive homogeneity C(t • q) = t * C(q) and share-ratio proportionality [PennockSami2007, §26.4.2, p. 665].

theorem Cslib.GameTheory.PredictionMarket.dpmCost_unique_of_impliedProb_sum {Ω : Type u_1} [Fintype Ω] [Nonempty Ω] {C : (Ω → ℝ) → ℝ} {p : (Ω → ℝ) → Ω → ℝ} (hdiff : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → HasFDerivAt C (dotCLM (p q)) q) (hratio : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → ∀ (j k : Ω), p q j * q k = p q k * q j) (hCne : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → C q ≠ 0) (hprob : ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → ∑ j : Ω, p q j / (C q / q j) = 1) :
∃! κ : ℝ, ∀ (q : Ω → ℝ), (∀ (j : Ω), 0 < q j) → C q = dpmCost κ q ∧ p q = dpmPrice κ q

Uniqueness of the share-ratio DPM from the parimutuel implied-probability condition ∑ j, p_j / (C(q) / q_j) = 1 and share-ratio proportionality [PennockSami2007, §26.4.2, p. 665].

Natural κ = 1 normalization, convexity, and no-arbitrage (§26.4.2, p. 665) #

theorem Cslib.GameTheory.PredictionMarket.dpmPrice_one_lt_one {Ω : Type u_1} [Fintype Ω] (hcard : 2 ≤ Fintype.card Ω) {q : Ω → ℝ} (hq : ∀ (j : Ω), 0 < q j) (ω : Ω) :
0 < dpmPrice 1 q ω ∧ dpmPrice 1 q ω < 1

Natural κ = 1 price bound [PennockSami2007, §26.4.2, p. 665]: with κ = 1, 2 ≤ |Ω|, and strictly positive shares on every outcome, every instantaneous DPM price lies strictly in (0, 1).

theorem Cslib.GameTheory.PredictionMarket.one_lt_dpmPayoffPerShare_one {Ω : Type u_1} [Fintype Ω] (hcard : 2 ≤ Fintype.card Ω) {q : Ω → ℝ} (hq : ∀ (j : Ω), 0 < q j) (ω : Ω) :

Natural κ = 1 payoff bound [PennockSami2007, §26.4.2, p. 665]: with κ = 1, 2 ≤ |Ω|, and strictly positive shares on every outcome, the winning payoff per share of every outcome is strictly greater than 1 (and satisfies dpmPrice 1 q ω * dpmPayoffPerShare 1 q ω = 1).

theorem Cslib.GameTheory.PredictionMarket.dpmCost_subgradient_le {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : 0 ≤ κ) {q₁ : Ω → ℝ} (hq₁ : q₁ ≠ 0) (q₂ : Ω → ℝ) :
dpmCost κ q₁ + (q₂ - q₁) ⬝ᵥ dpmPrice κ q₁ ≤ dpmCost κ q₂

First-order subgradient inequality for dpmCost κ (0 ≤ κ, q₁ ≠ 0).

theorem Cslib.GameTheory.PredictionMarket.dpmCost_add_le {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : 0 ≤ κ) (q₁ q₂ : Ω → ℝ) :
dpmCost κ (q₁ + q₂) ≤ dpmCost κ q₁ + dpmCost κ q₂

Subadditivity of dpmCost κ for 0 ≤ κ (Euclidean triangle inequality).

Global convexity of dpmCost κ on ℝ^Ω for 0 ≤ κ.

theorem Cslib.GameTheory.PredictionMarket.dpm_no_arbitrage {Ω : Type u_1} [Fintype Ω] [Nonempty Ω] {κ : ℝ} (hκ : 0 < κ) {q₁ q₂ : Ω → ℝ} (hq₁ : ∀ (j : Ω), 0 < q₁ j) (hq₂ : ∀ (j : Ω), 0 < q₂ j) (hnn : ∀ (ω : Ω), 0 ≤ dpmTraderNetPayoff κ q₁ q₂ ω) (ω : Ω) :
dpmTraderNetPayoff κ q₁ q₂ ω = 0

Arbitrage-freeness of the share-ratio DPM [PennockSami2007, §26.4.2, p. 665]: no trade q₁ → q₂ in the positive orthant can guarantee nonnegative net payoff in every outcome while achieving strictly positive net payoff in any outcome (if every state has nonnegative net payoff, every state has zero net payoff).

Non-loss for winning wagers and bounded market-maker loss (§26.4.2, p. 665) #

theorem Cslib.GameTheory.PredictionMarket.dpmCost_update_sub_le {Ω : Type u_1} [Fintype Ω] [DecidableEq Ω] {κ : ℝ} (hκ : 0 ≤ κ) (q : Ω → ℝ) (ω : Ω) {δ : ℝ} (hδ : 0 ≤ δ) :
dpmCost κ (Function.update q ω (q ω + δ)) - dpmCost κ q ≤ κ * δ

Buying δ ≥ 0 additional shares of a single outcome ω costs at most κ * δ.

theorem Cslib.GameTheory.PredictionMarket.le_dpmPayoffPerShare {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : 0 ≤ κ) {q : Ω → ℝ} {ω : Ω} (hω : 0 < q ω) :

Parimutuel winning payoff per share is always at least κ whenever q_final ω > 0 and 0 ≤ κ.

theorem Cslib.GameTheory.PredictionMarket.dpm_winning_wager_nonneg {Ω : Type u_1} [Fintype Ω] [DecidableEq Ω] {κ : ℝ} (hκ : 0 ≤ κ) (q : Ω → ℝ) {qFinal : Ω → ℝ} {ω : Ω} (hqF : 0 < qFinal ω) {δ : ℝ} (hδ : 0 ≤ δ) :
dpmCost κ (Function.update q ω (q ω + δ)) - dpmCost κ q ≤ δ * dpmPayoffPerShare κ qFinal ω

Wagers on the correct outcome can never lose money [PennockSami2007, §26.4.2, p. 665]: if a trader purchases δ ≥ 0 shares of outcome ω at share vector q and holds to maturity, then for any final pool state qFinal with 0 < qFinal ω (regardless of arbitrary subsequent trades by other participants), the winning payout δ * dpmPayoffPerShare κ qFinal ω is at least the purchase cost dpmCost κ (update q ω (q ω + δ)) - dpmCost κ q.

theorem Cslib.GameTheory.PredictionMarket.dpm_winning_wager_pos {Ω : Type u_1} [Fintype Ω] [DecidableEq Ω] {κ : ℝ} (hκ : 0 < κ) (q : Ω → ℝ) {qFinal : Ω → ℝ} {ω j : Ω} (hj : j ≠ ω) (hqF : 0 < qFinal ω) (hqFj : qFinal j ≠ 0) {δ : ℝ} (hδ : 0 < δ) :
dpmCost κ (Function.update q ω (q ω + δ)) - dpmCost κ q < δ * dpmPayoffPerShare κ qFinal ω

Strict profit on a winning wager whenever κ > 0, δ > 0, and some other outcome j ≠ ω has nonzero shares in the final pool state qFinal [PennockSami2007, §26.4.2, p. 665].

theorem Cslib.GameTheory.PredictionMarket.dpmMarketMakerLoss_eq {Ω : Type u_1} [Fintype Ω] (κ : ℝ) (q₀ qT : Ω → ℝ) {ω : Ω} (hω : qT ω ≠ 0) :
dpmMarketMakerLoss κ q₀ qT ω = dpmCost κ q₀ - q₀ ω * dpmPayoffPerShare κ qT ω

Exact market-maker loss identity for a DPM initialized with shares q₀ and pool C(q₀): when trading ends at qT (qT ω ≠ 0) and outcome ω occurs, the market maker's net loss equals C(q₀) - q₀ ω * dpmPayoffPerShare κ qT ω (the initial subsidy minus the payout on the market maker's own initial shares) [PennockSami2007, §26.4.2, p. 665].

theorem Cslib.GameTheory.PredictionMarket.dpmMarketMakerLoss_le {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : 0 ≤ κ) {q₀ qT : Ω → ℝ} {ω : Ω} (hq₀ : 0 ≤ q₀ ω) (hqT : 0 < qT ω) :
dpmMarketMakerLoss κ q₀ qT ω ≤ dpmCost κ q₀ - κ * q₀ ω ∧ dpmMarketMakerLoss κ q₀ qT ω ≤ dpmCost κ q₀

Worst-case DPM market-maker loss bound [PennockSami2007, §26.4.2, p. 665]: initializing with shares q₀ ≥ 0 and C(q₀) dollars guarantees that the market maker's net loss is at most C(q₀) - κ * q₀ ω ≤ C(q₀) for every terminal state qT with 0 < qT ω.

theorem Cslib.GameTheory.PredictionMarket.dpmMarketMakerLoss_seq_le {Ω : Type u_1} [Fintype Ω] {κ : ℝ} (hκ : 0 ≤ κ) (qs : ℕ → Ω → ℝ) (T : ℕ) {ω : Ω} (hq₀ : 0 ≤ qs 0 ω) (hqT : 0 < qs T ω) :
(qs T ω - qs 0 ω) * dpmPayoffPerShare κ (qs T) ω - ∑ t ∈ Finset.range T, (dpmCost κ (qs (t + 1)) - dpmCost κ (qs t)) ≤ dpmCost κ (qs 0)

Sequential path-independent form of the DPM worst-case loss bound: across any T trades qs 0, …, qs T, total trader payments telescope to C(qs T) - C(qs 0) and the market maker loses at most C(qs 0) [PennockSami2007, §26.4.2, p. 665].