agent-based-sim

Simulates prediction market price discovery with heterogeneous trader agents in Python.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/travis-burmaster/agentbox --skill agent-based-sim-travis-burmaster
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-based-sim
Source: https://github.com/travis-burmaster/agentbox/tree/main/examples/llm-proxy-gitagent/workspace/skills/agent-based-sim
Command: npx skills add https://github.com/travis-burmaster/agentbox --skill agent-based-sim-travis-burmaster

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy.

What problem does it solve? Closed-form stochastic models cannot capture emergent market dynamics arising from interactions between heterogeneous traders, making it hard to study how prediction market prices converge to true probabilities. ## Core Features & Use Cases - Heterogeneous Agent Simulation: Models informed traders, noise traders, and market makers interacting in a limit order book with Kyle lambda price impact. - Market Microstructure Analysis: Tracks price convergence, bid-ask spread dynamics, trading volume, and P&L attribution between informed and noise traders. - Use Case: A quant researcher wants to test how changing the informed-to-noise trader ratio affects convergence speed to a true probability of 0.65; they run the simulation for 2000 steps and inspect the price history and P&L breakdown. ## Quick Start Run an agent-based prediction market simulation with 10 informed traders, 50 noise traders, and a true probability of 0.65, then report the final price and convergence error.

Frequently Asked Questions about agent-based-sim

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I simulate a prediction market with agent-based modeling in Python?

Define agent classes for informed traders, noise traders, and market makers, then let randomly selected agents trade each step against a limit order book. The provided NumPy implementation runs thousands of steps and outputs price history, volume, and per-group P&L.

What is Kyle lambda in market microstructure simulation?

Kyle lambda is the price impact parameter from Kyle (1985), computed as sigma_v divided by two times sigma_u. It determines how much each trade moves the price, and it decreases as noise trader volume provides camouflage for informed trades.

Can agent-based models reproduce real order book dynamics?

Yes. Gode and Sunder (1993) showed zero-intelligence agents achieve near-full allocative efficiency, and Farmer, Patelli and Zovko (2005) explained 96% of spread variation on the London Stock Exchange with a single parameter.

Why do noise traders always lose money in these simulations?

Noise traders trade randomly without information, so they systematically transact at prices away from the true probability. Their losses fund the positive P&L of informed traders who trade toward the true value.

When should I use agent-based simulation instead of closed-form SDE models?

Use agent-based models when dynamics emerge from heterogeneous agent interactions, such as spread formation, information-driven convergence, or regime switches, which no closed-form stochastic differential equation can capture.