English

Can Large Language Models Trade? Testing Financial Theories with LLM Agents in Market Simulations

Computational Finance 2025-04-16 v1 General Economics Economics General Finance Trading and Market Microstructure

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

Cite

@article{arxiv.2504.10789,
  title  = {Can Large Language Models Trade? Testing Financial Theories with LLM Agents in Market Simulations},
  author = {Alejandro Lopez-Lira},
  journal= {arXiv preprint arXiv:2504.10789},
  year   = {2025}
}