ExplainerMarket simulation

How agent-based market simulation works

Agent-based market simulation builds a market from simulated traders and its rules, then checks the result against real data or a known answer. LLM agents now join as traders.

Cover of the full report: How agent-based market simulation works
The research behind this article, with every source listed. 19 pages.

Key points

From the Summary of the full report

  1. An agent-based model is a computer simulation of decision-makers, called agents, and institutions that interact through prescribed rules [1]. In a market model the building blocks are the agents' design, the market mechanism that fixes prices and the environment that links the agents [4].
  2. Early models showed that market patterns can come from the traders' interaction. In the 1996 Santa Fe artificial stock market, adaptive traders produced bubbles, crashes and market-like price and volume behavior once they explored new forecasting rules faster [5]. Programs that bid at random within a budget, called zero-intelligence traders, reached allocative efficiency, the profit earned as a share of the maximum possible, close to 100 percent in double auctions [6, 7].
  3. Stylized facts are statistical regularities found in price changes across many markets, such as fat tails and volatility clustering, and reproducing them is the usual test of a market model [2, 4, 8]. In most studies, especially of large models, that test is qualitative and seldom goes beyond showing that a model reproduces a set of them [9].

Agent-based market simulation builds a market from simulated traders and the rules they trade under, then checks what emerges against real market data or against an outcome fixed before the run [1, 2, 3]. Economists have built markets this way since the early 1990s to ask where fat tails, bubbles and crashes come from, and how much of a market's efficiency its rules supply on their own [5, 6, 10]. This explainer covers what such a model contains, how it is checked, why calibration is hard and where LLM agents fit.

What an agent-based market simulation contains

An agent-based model is a computer simulation of decision-makers, the agents, and institutions that interact through prescribed rules [1]. Agents can range from consumers to professional traders, and institutions can include banks and the government [1]. One review splits a market model into three building blocks: the design of the agents, the market mechanism that fixes a price and the environment, meaning any extra coupling among agents [4].

In practice the agents are trader types. A widely adopted order-driven model mixes fundamentalist, chartist and noise-trader expectations, and finds the chartist part mainly responsible for the fat tails and clustering in its simulated prices [12, 17]. The mechanism can be a specialist who declares a clearing price, as in the 1996 Santa Fe artificial stock market [5], or a continuous double auction at nanosecond resolution, as in the ABIDES simulator [18].

Another family of order book simulators replays historical messages in place of modeled agents [23]. The data work behind a replay is the subject of rebuilding an order book from snapshots and diffs.

What the early models showed

The Santa Fe market held 25 adaptive agents, each with 100 forecasting rules, run for 250,000 periods and repeated 25 times [5]. When agents explored new rules slowly, the market settled into the rational-expectations equilibrium. When they explored faster, technical trading emerged, temporary bubbles and crashes occurred, and prices and volume showed the GARCH behavior of real market data [5]. A 1999 Nature paper reached a related result: news with no power-law scaling or volatility dependence still produced both once agents interacted [15].

Zero-intelligence traders took the intelligence out. Dhananjay Gode and Shyam Sunder's 1993 programs bid and offered at random [6]. With a budget constraint, so that no trader sold below cost or bought above value, their double auctions reached allocative efficiency close to 100 percent [6]. The reported averages are 98.7 percent for budget-constrained random traders, 78.3 percent without the constraint and 97.6 percent for human subjects [7]. Gode and Sunder concluded that a double auction's efficiency derives largely from its structure [6]. The result has limits. With large avoidable costs, random traders did significantly worse than people, and with supply and demand refreshed continuously their prices showed no tendency to converge [7].

Stylized facts: the usual test

Stylized facts are statistical regularities found in price changes across a wide variety of markets and instruments [8]. One review counts at least thirty besides fat tails, volatility clustering and the absence of autocorrelation in returns [4]. The Get Real simulator test adds order flow facts such as intraday volume shaped like a U [2].

Reproducing them is the usual pass mark. A 2019 paper on calibration observed that in most studies, especially of large models, validation is qualitative and seldom goes beyond showing that a model reproduces a set of stylized facts [9]. The Bank of England has warned that a model with many construction options can spuriously reproduce data that look similar to empirical data [10].

A quantitative check is harder to pass. The 2019 Get Real study ran two ABIDES setups against minute returns of 50 U.S. equities sampled afresh each trading day of 2011, and order book data from June 2019 [2]. One held 100 zero-intelligence agents [2]. The other mixed a market maker with zero-intelligence, belief-learning and momentum agents [2]. Both showed heavy tails. Neither captured the absence of autocorrelation, neither matched the skewed, widely spread volume-volatility correlations of real data, and the mixed setup reversed the U shape of intraday volume [2]. The authors reported "significant discrepancies between simulated markets and real ones" [2].

Pass marks matter as much as the facts. One 2025 study's stylized-fact checks required only the right sign, so a simulated return-volume correlation of 0.07 to 0.08 passed against 0.46 in real data [12].

Calibration and its limits

Calibration fits a model to the known facts, and the Bank of England calls it even more difficult for agent-based models, because they typically produce stylized facts rather than quantitative forecasts [10]. A 2019 comparison of calibration methods on five models, from an AR(1) process to a large agent-based model of the UK housing market, found that Bayesian estimation consistently outperformed frequentist methods [9]. Its author concluded that calibration techniques "require further development" before they can definitively calibrate large-scale models [9].

Compute is part of the problem. At 5 seconds a run on one CPU core, a grid of 10 values for each of 5 parameters needs 100,000 runs, about 6 CPU days [11]. Twenty values each takes about 6 months, and a sixth parameter pushes the search past 10 years [11]. A machine-learning surrogate in the same study predicted 500 times faster on average than running one model, and 3,750 times faster than another [11]. Another approach skips per-trader calibration and learns a single "world" agent from historical data, because labeled data on each trader's strategy is not public [20].

Simulators in use: ABIDES and JAX-LOB

ABIDES, described in 2019, runs tens of thousands of trading agents against an exchange agent, with network latencies between them and messages modeled after NASDAQ's ITCH and OUCH protocols [18]. One seed fixes every agent's random numbers, so the same seed and configuration give an identical run [18]. That lets a researcher re-simulate a day with known, limited changes, to study questions such as the market impact of large orders that historical data alone cannot answer [18]. ABIDES-Gym later wrapped it for reinforcement learning [22].

JAX-LOB, from 2023, moves limit order book simulation onto GPUs to process thousands of books in parallel, for calibrating agent-based models or training reinforcement learning agents [23]. It reported 550 training steps per second against 74 for an equivalent CPU-based simulator on the same hardware [23]. Its authors name the main limit of agent-based models as the difficulty of creating realistic enough agent behavior [23]. Generative simulators such as MarS, presented at ICLR 2025, take another route and generate orders with an order-level generative foundation model [24].

LLM agents as a new kind of trader

LLM agents have joined these models as one more trader type. A 2023 survey named the main challenges as environment perception, human alignment, action generation and evaluation [26].

Designs differ in how much the LLM decides. In one 2025 preprint, an LLM makes each buy or sell decision while order price and volume follow rules [12]. The study replaced up to 5 of 1,000 rule-based agents with such agents, running an 8-billion-parameter open-weight model [12]. In the paper's Table 2, a coefficient on nearness to the all-time high moved from -0.01 with no LLM agents to between -0.32 and -1.31 with one to five, with wide spreads across trials [12]. The authors say these values tend to fall within the range of real Japanese stock data, -1.27 to -0.20 [12].

Markets made only of LLM agents go further. LLM traders in a simulated stock market kept to their assigned strategies and produced price discovery and bubbles, and their prompts could create correlated behavior [27]. In a bond market study, slight trade aversion encoded in the LLM stopped trading entirely [31]. The wider research on how LLM agents behave as bidders, sellers and traders is reviewed in LLM agents as market participants.

Calibrated replicas and induced-value markets

The two designs answer different questions. A calibrated replica asks whether a model reproduces the statistics of a real market, and it is judged by how close its statistics come to real data [2, 9].

An induced-value market comes from experimental economics. Each agent receives a private value or cost before the run, a method first suggested by Chamberlin and developed by Vernon Smith that became a standard tool of the field [3]. In Smith's double auctions, subjects who could not compute the equilibrium still traded at prices close to it [3]. Because every value is set in advance, the efficient allocation and the equilibrium are known before the first trade, and each outcome can be scored against them [3, 7].

The zero-intelligence results set the caveat. If random traders within a budget reach near-full efficiency, efficiency needs reading beside behavior such as convergence and differences from human markets [6, 7]. A 2026 replication of classic double auction experiments with LLM agents found slower or no convergence and less efficient allocations than in human markets [33]. The formats and measures are set out in Measuring LLM agents in simulated auctions.

Rillor's market simulation is built on the designs of experimental economics: agents receive induced values, so the efficient outcome is known before the first bid.

Read the full report

The full report adds the Santa Fe and Get Real setups, a table of stylized facts, calibration methods and their compute costs, the pass marks of the 2025 LLM-agent study, the two designs side by side and all 33 sources.

The full report

How agent-based market simulation works

The research behind this article, with every source listed. 19 pages.

  1. Summary
  2. Background
  3. Method
  4. Findings
  5. Implications
  6. Limits of this analysis
  7. Sources

Sources

  1. The Economy Needs Agent-Based Modelling. J. Doyne Farmer and Duncan Foley, Nature 460, 685-686, 6 August 2009, Institute for New Economic Thinking at the Oxford Martin School, viewed 8 November 2026. https://www.inet.ox.ac.uk/publications/the-economy-needs-agent-based-modelling
  2. Get Real: Realism Metrics for Robust Limit Order Book Market Simulations. Svitlana Vyetrenko, David Byrd, Nick Petosa, Mahmoud Mahfouz, Danial Dervovic, Manuela Veloso and Tucker Hybinette Balch, NeurIPS 2019 Workshop on Robust AI in Financial Services, arXiv:1912.04941, 10 December 2019, viewed 8 November 2026. https://arxiv.org/abs/1912.04941
  3. Foundations of Behavioral and Experimental Economics: Daniel Kahneman and Vernon Smith. The Royal Swedish Academy of Sciences, Advanced information on the Prize in Economic Sciences 2002, 17 December 2002, viewed 8 November 2026. https://www.nobelprize.org/uploads/2018/06/advanced-economicsciences2002.pdf
  4. Stylized Facts and Agent-Based Modeling. Simon Cramer and Torsten Trimborn, arXiv:1912.02684, 2 December 2019, viewed 8 November 2026. https://arxiv.org/abs/1912.02684
  5. Asset Pricing Under Endogenous Expectations in an Artificial Stock Market. W. Brian Arthur, John H. Holland, Blake LeBaron, Richard Palmer and Paul Tayler, Santa Fe Institute working paper, 12 December 1996, viewed 8 November 2026. https://sites.santafe.edu/~wbarthur/Papers/Arthur-HollandStockMarket.pdf
  6. Allocative Efficiency of Markets with Zero-Intelligence Traders: Market as a Partial Substitute for Individual Rationality. Dhananjay K. Gode and Shyam Sunder, Journal of Political Economy 101(1), 119-137, February 1993, RePEc/IDEAS record, viewed 8 November 2026. https://ideas.repec.org/a/ucp/jpolec/v101y1993i1p119-37.html
  7. Agent-Based Models and Human Subject Experiments. John Duffy, in Leigh Tesfatsion and Kenneth L. Judd (eds.), Handbook of Computational Economics, Volume 2, chapter 19, 949-1011, Elsevier, 2006, author's copy, viewed 8 November 2026. https://sites.socsci.uci.edu/~duffy/papers/duffy2006.pdf
  8. Empirical properties of asset returns: stylized facts and statistical issues. Rama Cont, Quantitative Finance 1(2), 223-236, 2001, EconPapers (RePEc) record, viewed 8 November 2026. https://econpapers.repec.org/RePEc:taf:quantf:v:1:y:2001:i:2:p:223-236
  9. A Comparison of Economic Agent-Based Model Calibration Methods. Donovan Platt, arXiv:1902.05938, 15 February 2019, viewed 8 November 2026. https://arxiv.org/abs/1902.05938
  10. Agent-based models: understanding the economy from the bottom up. Arthur Turrell, Bank of England Quarterly Bulletin 2016 Q4, 16 December 2016, viewed 8 November 2026. https://www.bankofengland.co.uk/quarterly-bulletin/2016/q4/agent-based-models-understanding-the-economy-from-the-bottom-up
  11. Agent-Based Model Calibration using Machine Learning Surrogates. Francesco Lamperti, Andrea Roventini and Amir Sani, arXiv:1703.10639, version 2, 6 April 2017 (first version 30 March 2017), viewed 8 November 2026. https://arxiv.org/abs/1703.10639
  12. Agent-Based Simulation of a Financial Market with Large Language Models. Ryuji Hashimoto, Takehiro Takayanagi, Masahiro Suzuki and Kiyoshi Izumi, arXiv:2510.12189, 14 October 2025, viewed 8 November 2026. https://arxiv.org/abs/2510.12189
  13. Scaling and criticality in a stochastic multi-agent model of a financial market. Thomas Lux and Michele Marchesi, Nature 397, 498-500, February 1999, viewed 8 November 2026. https://www.nature.com/articles/17290
  14. The Impact of Heterogeneous Trading Rules on the Limit Order Book and Order Flows. Carl Chiarella, Giulia Iori and Josep Perelló, Journal of Economic Dynamics and Control 33, 525 (2009), arXiv:0711.3581, 22 November 2007, viewed 8 November 2026. https://arxiv.org/abs/0711.3581
  15. ABIDES: Towards High-Fidelity Market Simulation for AI Research. David Byrd, Maria Hybinette and Tucker Hybinette Balch, arXiv:1904.12066, 26 April 2019, viewed 8 November 2026. https://arxiv.org/abs/1904.12066
  16. Learning to simulate realistic limit order book markets from data as a World Agent. Andrea Coletta, Aymeric Moulin, Svitlana Vyetrenko and Tucker Balch, arXiv:2210.09897, 26 September 2022, viewed 8 November 2026. https://arxiv.org/abs/2210.09897
  17. ABIDES-Gym: Gym Environments for Multi-Agent Discrete Event Simulation and Application to Financial Markets. Selim Amrouni, Aymeric Moulin, Jared Vann, Svitlana Vyetrenko, Tucker Balch and Manuela Veloso, arXiv:2110.14771, 27 October 2021, viewed 8 November 2026. https://arxiv.org/abs/2110.14771
  18. JAX-LOB: A GPU-Accelerated limit order book simulator to unlock large scale reinforcement learning for trading. Sascha Frey, Kang Li, Peer Nagy, Silvia Sapora, Chris Lu, Stefan Zohren, Jakob Foerster and Anisoara Calinescu, arXiv:2308.13289, 25 August 2023, viewed 8 November 2026. https://arxiv.org/abs/2308.13289
  19. MarS: a Financial Market Simulation Engine Powered by Generative Foundation Model. Junjie Li, Yang Liu, Weiqing Liu, Shikai Fang, Lewen Wang, Chang Xu and Jiang Bian, ICLR 2025, arXiv:2409.07486, version 2, 13 March 2025 (first version 4 September 2024), viewed 8 November 2026. https://arxiv.org/abs/2409.07486
  20. Large Language Models Empowered Agent-based Modeling and Simulation: A Survey and Perspectives. Chen Gao, Xiaochong Lan, Nian Li, Yuan Yuan, Jingtao Ding, Zhilun Zhou, Fengli Xu and Yong Li, arXiv:2312.11970, 19 December 2023, viewed 8 November 2026. https://arxiv.org/abs/2312.11970
  21. Can Large Language Models Trade? Testing Financial Theories with LLM Agents in Market Simulations. Alejandro Lopez-Lira, arXiv:2504.10789, 15 April 2025, viewed 8 November 2026. https://arxiv.org/abs/2504.10789
  22. Shifting Power: Leveraging LLMs to Simulate Human Aversion in ABMs of Bilateral Financial Exchanges, A bond market study. Alicia Vidler and Toby Walsh, arXiv:2503.00320, version 2, 4 March 2025 (first version 1 March 2025), viewed 8 November 2026. https://arxiv.org/abs/2503.00320
  23. Competitive Market Behavior of LLMs. Pawel Struski, Jakub Swistak, Inez Okulska and Przemyslaw Biecek, arXiv:2609.02580, 2 September 2026, viewed 8 November 2026. https://arxiv.org/abs/2609.02580

Notices

Rillor is not a registered investment adviser or commodity trading advisor and does not provide investment or trading advice. Research, forecasts, data and software described on this site are for research and engineering use. Nothing here is an offer or recommendation to buy or sell any security, commodity interest or digital asset. Past or simulated results do not indicate future results.

NVIDIA, AMD, Ceph, Kubernetes and related product names are trademarks of their owners and are used only to identify products. No affiliation or endorsement is implied.

Superintelligence (SI) outputs can be wrong. Important decisions should include human review.

Test your agent in a simulated market.

Send us the agent you want tested, the market or auction format and the behavior you need measured.

Scope a simulation