Skip to content
Finance Lessons
🐜

Agent-Based Models & Market Simulation

You only ever get one market history — and the last course's answer was to *learn* a generator from it. This one is the other answer: don't learn the market, *build* it. Specify the agents, let them trade, and watch a price with fat tails and volatility clustering emerge from the swarm. Then calibrate it, validate it honestly, and use it for the counterfactuals — a smaller tick size, a circuit breaker, a flash crash — that no backtest on the real tape can ever run.

Grow a market from the bottom up. Instead of learning a generator from your one history, build the market mechanistically as a swarm of interacting agents — zero-intelligence traders, market makers, momentum and value players, and the learned RL bots from earlier courses — and let the price path emerge. Watch stylized facts (fat tails, volatility clustering, autocorrelations) fall out of interaction rather than being programmed in, learn to calibrate an ABM to real data and validate it without fooling yourself, and use it as a sandbox the historical tape can never give you — counterfactual market structure, flash-crash stress tests, and a non-stationary training ground that pushes back on your RL agents.

The last course handed you one honest answer to “I only have a single market history.” You learned a generator — a GAN, a VAE, a diffusion model — that absorbs the distribution of your data and emits new paths that look like it. Powerful, but top-down and opaque: the model never explains why returns are fat-tailed, only that it can copy the fact, and a memorizing generator can leak your history straight back into your tests.

This course is the other answer, and it could not be more different in spirit. Instead of learning the market from the top down, you build it from the bottom up. You specify the agents — zero-intelligence traders who quote at random, market makers who post two-sided liquidity, momentum players who chase trends, value players who fade them, and the learned RL bots from Deep RL for Execution & Market Making — drop them into a matching engine, and let them trade. You never write down “the price.” The price emerges from their collective order flow. This is an agent-based model (ABM): a mechanistic, interpretable simulator where macro-scale market behavior is an output, not an assumption.

The headline result — the one that makes ABMs worth a whole course — is emergence: when you wire up heterogeneous agents and let them interact, the price path spontaneously grows the stylized facts you spent Time-Series Finance cataloguing. Fat tails, volatility clustering, the slow decay of absolute-return autocorrelation — nobody programs them in. They fall out of the feedback between trend-chasers and mean-reverters, exactly as they do in the real market. A generative model can reproduce fat tails because it saw them; an ABM can produce fat tails because it contains the mechanism that makes them.

This course assumes the two prerequisites cash out three habits. From Generative Models for Synthetic Market Data you carry the stylized-facts rubric any synthetic market must satisfy and — more importantly — the “did you fool yourself?” discipline of evaluation: a model that looks right is not the same as a model that is right. From Deep RL for Execution & Market Making you carry the agent’s-eye view of trading and the sim-to-real gap, because the most demanding thing you can do with an ABM is use it as the environment an RL agent trains against. We lean on both relentlessly, always asking the skeptic’s question: did this market structure really cause that, or did I just tune the model until it agreed with me? The arc:

By the end you’ll be able to assemble a population of agents, watch real stylized facts emerge from their interaction, calibrate the model to data and validate it without lying to yourself, and wield it for the counterfactuals and stress tests the one historical path can never deliver. A graded final exam runs the whole discipline back at you, one locked question at a time.

In this topic

  1. 1 Why Build a Market From Agents? Two answers to 'I only have one market history': learn a generator top-down, or build the market bottom-up from interacting agents and let the price emerge. Meet agent-based models, emergence, and the honest trade-off. 16 min
  2. 2 Zero-Intelligence Agents: The Shocking Baseline How traders quoting at random still drive a continuous double auction to near-perfect efficiency — Gode & Sunder's zero-intelligence result, and why it's the baseline every smarter agent must beat. 17 min
  3. 3 The Agent Zoo Meet the five archetypes that populate an agent-based market — market makers, momentum traders, value traders, noise traders, and learned RL bots — and learn which stabilize price, which destabilize it, and how you assemble the mix. 18 min
  4. 4 Emergent Stylized Facts How the interaction of trend-followers and value-traders manufactures volatility clustering and fat tails out of nothing — and why emergence is a genuine explanation, not a curve-fit. 19 min
  5. 5 Calibrating an Agent-Based Model An agent-based market has knobs but no usable likelihood, so you calibrate by matching simulated summary statistics to real ones — method of simulated moments, simulation-based inference, and why ABM calibration is ill-posed. 20 min
  6. 6 Validating Without Fooling Yourself Why matching stylized facts in-sample is not validation, and how to point the deflated-Sharpe / overfitting gauntlet at agent-based models: out-of-sample facts, identifiability, sensitivity analysis, and counting your trials. 19 min
  7. 7 What an ABM Gives You That a Backtest Cannot Agent-based market models earn their keep on the things a backtest categorically can't do: counterfactual market structure, flash-crash and feedback-loop stress tests, and a reactive RL training ground — plus when to reach for an ABM versus a generative model. 20 min
  8. 8 Agent-Based Models & Market Simulation — Final Exam The graded, irreversible final exam for Agent-Based Models & Market Simulation: 34 questions spanning bottom-up vs top-down modeling, zero-intelligence agents, the agent zoo, emergent stylized facts, likelihood-free calibration, validation without fooling yourself, and the counterfactual uses an ABM unlocks. 22 min

Mark course as finished

Done with every lesson? Lock it in — your progress is saved on this device.