Can Large Language Models Trade? Testing Financial Theories with LLM Agents in Market Simulations
ArXiv ID: 2504.10789 “View on arXiv”
Authors: Unknown
Abstract
This paper presents a realistic simulated stock market where large language models (LLMs) act as heterogeneous competing trading agents. The open-source framework incorporates a persistent order book with market and limit orders, partial fills, dividends, and equilibrium clearing alongside agents with varied strategies, information sets, and endowments. Agents submit standardized decisions using structured outputs and function calls while expressing their reasoning in natural language. Three findings emerge: First, LLMs demonstrate consistent strategy adherence and can function as value investors, momentum traders, or market makers per their instructions. Second, market dynamics exhibit features of real financial markets, including price discovery, bubbles, underreaction, and strategic liquidity provision. Third, the framework enables analysis of LLMs’ responses to varying market conditions, similar to partial dependence plots in machine-learning interpretability. The framework allows simulating financial theories without closed-form solutions, creating experimental designs that would be costly with human participants, and establishing how prompts can generate correlated behaviors affecting market stability.
Keywords: large language models (LLMs), order book simulation, heterogeneous agents, market makers, price discovery, Equities (Simulated)
Complexity vs Empirical Score
- Math Complexity: 4.0/10
- Empirical Rigor: 8.5/10
- Quadrant: Street Traders
- Why: The paper’s mathematics is conceptual, focusing on agent-based simulation logic rather than dense derivations or complex formulas. Empirical rigor is high due to a realistic, open-source simulation framework with persistent order books, diverse agent strategies, and systematic analysis of market dynamics and prompt engineering effects.
flowchart TD
R["Research Goal: Can LLMs Trade & Simulate Financial Markets?"]
R --> M1["Design Simulated Stock Market\nOrder Book with Market/Limit Orders"]
R --> M2["Create Heterogeneous LLM Agents\nValue Investors, Momentum, Market Makers"]
R --> I["Data/Inputs: Agent Prompts,\nEndowments, Information Sets"]
I --> C["Computational Process:\nLoop of Order Submission,\nEquilibrium Clearing, Dividend Payout"]
C --> F1["Outcome 1: LLMs Adhere to Strategies\n(Value, Momentum, Market Making)"]
C --> F2["Outcome 2: Realistic Market Dynamics\nPrice Discovery, Bubbles, Liquidity"]
C --> F3["Outcome 3: Framework for Theory Testing\nPartial Dependence & Prompt Sensitivity"]