A Python simulation of competitive equilibrium in information markets, prediction-market-style mechanisms where agents with private signals trade securities to aggregate beliefs and reach a collective decision.
This project implements and compares three market mechanisms from Airiau et al. (2024), reproduces their numerical examples, and runs Monte Carlo experiments to study decision accuracy across group sizes, competence levels, and heterogeneous agent profiles.
In an information market, a group of agents each observe a private signal about an unknown binary state of the world (A or B). Each agent's competence q ∈ (0.5, 1] is the probability that their signal is correct. Agents trade Arrow–Debreu securities (A-securities pay £1 if A is true, B-securities pay £1 if B is true) and a competitive equilibrium price emerges. The market's decision is whichever alternative the equilibrium price favours (price > 0.5 → decision A).
The three mechanisms differ in how agents optimise their portfolios:
| Market | Utility function | Equilibrium price |
|---|---|---|
| Naive | Linear (risk-neutral) | Determined by Algorithm 1, depends on the order statistics of beliefs |
| Kelly | Logarithmic (Kelly criterion) | Arithmetic mean of all agents' beliefs |
| Taxed Kelly | Log-utility with a proportional tax | Geometric-mean of odds (log-odds average), upweighting high-competence agents |
The key theoretical result (Airiau et al., 2024) is that Taxed Kelly markets implement a form of competence-weighted majority, making them more robust than simple majority voting or Kelly markets, especially when a few expert agents are present in an otherwise low-competence group.
information-markets/
├── markets.py # Core simulation: agents, signal generation, equilibrium solvers, experiments
├── plots.py # Plotting utilities to visualise experiment results
├── figures/ # Output figures generated by plots.py
└── README.md
git clone https://github.com/andrei22george/information-markets.git
cd information-markets
pip install numpy scipy matplotlibPython 3.10+ is recommended (uses list[Agent] type hints).
python markets.pyThis will:
- Reproduce the paper's examples (Section 6 of Airiau et al., 2024), manually fixed signals, checks all three markets.
- Experiment 1, accuracy vs. group size
nwith shared competenceq = 0.7. - Experiment 2, accuracy vs. shared competence
qfor a fixed group ofn = 11. - Experiment 3, accuracy under homogeneous vs. heterogeneous competence profiles.
Data classes
Agent, holds an agent's id, competenceq, private signal, and posterior belief.NaiveEquilibrium, equilibrium price, investment vectors, and decision for the Naive market.KellyEquilibrium/TaxedKellyEquilibrium, price and decision for the Kelly and Taxed Kelly markets.TrialResult, outcome of a single Monte Carlo trial across all three markets.
Core functions
setup_market(n, competences, true_state, seed), create agents, draw signals, compute Bayesian posteriors.naive_market_equilibrium(agents), implements Algorithm 1 from the paper.kelly_market_equilibrium(agents), Lemma 5: price = mean of beliefs.taxed_kelly_market_equilibrium(agents, k), Lemma 7: price = sigmoid of mean log-odds.verify_market_clearing(eq), checks the market-clearing condition (Equation 5).run_trial(...), runs one simulation trial across all three markets.
Experiments
experiment_paper_examples(), reproduces Section 6 of the paper.experiment_accuracy_vs_n(...), Condorcet jury theorem scaling.experiment_accuracy_vs_competence(...), accuracy as a function of signal quality.experiment_heterogeneous(...), homogeneous vs. expert-in-crowd profiles.
Visualisation of experiment results using matplotlib. Call after running markets.py experiments to generate figures saved in figures/.
Airiau, S., Dupuis, N. K., & Grossi, D. (2024). Condorcet Markets. arXiv:2306.05028. https://arxiv.org/abs/2306.05028
MIT