Paper: arXiv 2407.18957
Authors: Chong Zhang, Xinyi Liu, Zhongmou Zhang, Mingyu Jin, Lingyao Li, Zhenting Wang, Wenyue Hua, Dong Shu, Suiyuan Zhu, Xiaobo Jin, Sujian Li, Mengnan Du, Yongfeng Zhang
Abstract
Can AI Agents simulate real-world trading environments to investigate the impact of external factors on stock trading activities (e.g., macroeconomics, policy changes, company fundamentals, and global events)? These factors, which frequently influence trading behaviors, are critical elements in the quest for maximizing investors’ profits. Our work attempts to solve this problem through large language model based agents. We have developed a multi-agent AI system called StockAgent, driven by LLMs, designed to simulate investors’ trading behaviors in response to the real stock market. The StockAgent allows users to evaluate the impact of different external factors on investor trading and to analyze trading behavior and profitability effects. Additionally, StockAgent avoids the test set leakage issue present in existing trading simulation systems based on AI Agents. Specifically, it prevents the model from leveraging prior knowledge it may have acquired related to the test data. We evaluate different LLMs under the framework of StockAgent in a stock trading environment that closely resembles real-world conditions. The experimental results demonstrate the impact of key external factors on stock market trading, including trading behavior and stock price fluctuation rules. This research explores the study of agents’ free trading gaps in the context of no prior knowledge related to market data. The patterns identified through StockAgent simulations provide valuable insights for LLM-based investment advice and stock recommendation. The code is available at https://github.com/MingyuJ666/Stockagent.
Complexity vs Empirical Score
- Math Complexity: 3.5/10
- Empirical Rigor: 8.0/10
- Quadrant: Street Traders — empirical and applied, lower math complexity
Why this score: The paper is primarily a system-building and experimental work using LLM agents for simulated trading, relying heavily on implementation, code availability, and empirical evaluation of trading behaviors rather than advanced mathematical derivations. It features a GitHub link, backtesting environments, and analysis of external factors, indicating high empirical rigor but relatively low mathematical complexity.
Research Flowchart
flowchart TD Start["Research Goal<br>Simulate real-world trading to evaluate external factors' impact"] --> Methodology["Methodology<br>Build StockAgent: Multi-agent LLM system avoiding test leakage"] Methodology --> Inputs["Data/Inputs<br>Real stock market data, macroeconomic indicators, news events"] Inputs --> Process["Computational Process<br>LLM agents trade in simulated environment without prior knowledge of test data"] Process --> Findings["Key Findings<br>1. Identified impact of external factors on trading behavior<br>2. Revealed stock price fluctuation patterns<br>3. LLMs can provide valuable investment advice<br>4. Code available: github.com/MingyuJ666/Stockagent"]
Evidence Card
What the authors claim, on what data, and who has checked it. Read from the paper's own text by a language model: every quote is verbatim, nothing was re-run. How to read this card
Proposes
The paper proposes StockAgent, a multi‑agent AI framework driven by large language models to simulate investor trading behavior in realistic market conditions.
Source sentence
We have developed a multi-agent AI system called StockAgent, driven by LLMs, designed to simulate investors' trading behaviors in response to the real stock market.
Assumes 6
- StockAgent assumes basic common sense of stock market trading and can make profitable trades to maximize profits. model
Source sentence
StockAgent Setup Assuming basic common sense of stock market trading, our StockAgent can make profitable trades to maximize profits.
- StockAgent actions are limited to buy, sell, hold, long and short. execution
Source sentence
We restrict the StockAgent actions to buy, sell, hold, long and short.
- Agents may incur debt, but the amount cannot exceed the value of their capital. market
Source sentence
Agents may incur debt, with the amount not exceeding the value of their capital.
- Transaction stamp tax follows American market rules with a fee of 0.005 per share, minimum 1, maximum 5.95 currency units. execution
Source sentence
We set the transaction stamp tax according to the rules of the American stock market. We put the transaction fee of each Agent in purchasing shares to 0.005 currency units per share, the minimum transaction fee of each transaction is 1 currency unit, and the maximum transaction fee is 5.95 currency units.
Show 2 more
- The simulation covers one year of 264 trading days, split into four quarters of 66 days each. market
Source sentence
Trading Year: The simulation covers one year comprising 264 trading days, divided into four quarters of 66 trading days each.
- Deposit rate for companies and individuals is set to 0% reflecting low‑interest environments. market
Source sentence
Interest Rates and Deposits: For companies and individuals, the deposit rate is 0%, reflecting contemporary low-interest-rate environments.
Data
- Stock A and Stock B financial reports fundamentals unknown
Source sentence
We use their financial reports—specifically, the balance sheet, income statement, and cash flow statement—as the basis for calculating the initial settings of our simulation.
- External economic and financial events macro unknown
Source sentence
We use external economic and financial events from 2014 to 2019 to align our valuation and volume energy calculations with reality.
Costs
Modeled
Transaction fee of 0.005 currency units per share, with a minimum of 1 and a maximum of 5.95 currency units per transaction.
Source sentence
We set the transaction stamp tax according to the rules of the American stock market. We put the transaction fee of each Agent in purchasing shares to 0.005 currency units per share, the minimum transaction fee of each transaction is 1 currency unit, and the maximum transaction fee is 5.95 currency units.
Finds 4
- GPT‑driven agents trade less frequently but with significantly higher volume than Gemini‑driven agents. performance
Source sentence
Although the GPT-driven AI Agents trades less frequently, the volume is significantly higher than that driven by Gemini.
- Gemini‑based agents show more consistent group behavior, while GPT‑based agents display greater individual differences. statistical
Source sentence
Gemini-based agents exhibit similar characteristics and more consistent group behavior. In contrast, GPT-driven agents display greater individual differences and subjective decision-making abilities.
- Removing earnings reports and interest‑rate changes caused many agents to shift from losses to profits, increasing overall profitability. performance
Source sentence
Interestingly, the elimination of earnings reports and interest rate changes caused many agents to shift from losses to profits, increasing the overall profitability of the group.
- Without the BBS sharing feature, agents act more cautiously and avoid large transactions. other
Source sentence
Without the BBS sharing feature, agents tend to act more cautiously and avoid large transactions.
Checked by others
No other paper in the archive has been found to support or contradict these findings (compared with 33 related papers). Coverage is partial, so this is neither replication nor refutation.
17 papers in the archive
Extracted 2026-11-14 · same card as JSON · A language model chose these items: check the source sentence before relying on one.
Cited References (79)
- Does the stock market overreact? (1985)
- Market liquidity: theory, evidence, and policy (2013)
- Behavior pattern of individual investors in stock market (2014)
- Institutional traders’ behavior in an emerging stock market: Empirical evidence on polish pension fund investors (2005)
- The real effects of political uncertainty: Elections and investment sensitivity to stock prices (2010)
- Who gambles in the stock market? (2009)
- The effects of public sentiments and feelings on stock market behavior: Evidence from Australia (2022)
- A hybrid stock trading framework integrating technical analysis with machine learning techniques (2016)
and 71 more
- Automated trading systems statistical and machine learning methods and hardware implementation: a survey (2019)
- Decision-making for financial trading: A fusion approach of machine learning and portfolio selection (2019)
- The impact of sentiment and attention measures on stock market volatility (2020)
- Stakeholder integration, environmental sustainability orientation and financial performance (2020)
- Generative agents: Interactive simulacra of human behavior (2023)
- V-irl: Grounding virtual intelligence in real life (2024) — link
- Evaluating multi-agent coordination abilities in large language models (2023) — link
- Presidential decision-making during the Cuban missile crisis: a computer simulation (1970)
- BioFinBERT: Finetuning Large Language Models (LLMs) to Analyze Sentiment of Press Releases and Financial Text Around Inflection Points of Biotech Stocks — → 2401.11011
- Analysis of CBDC narrative by central banks using large language models (2023)
- FinBERT: A large language model for extracting information from financial text (2023)
- Automating Customer Service using LangChain: Building custom open-source GPT Chatbot for organizations (2023) — link
- Optimized Financial Planning: Integrating Individual and Cooperative Budgeting Models with LLM Recommendations (2023)
- An attempt to simulate the outbreak of World War I (1967)
- Gauging similarity with n-grams: Language-independent categorization of text (1995)
- Recurrent neural networks (2001)
- Long short-term memory-networks for machine reading (2016) — link
- Attention is all you need (2017)
- Don’t stop pretraining: Adapt language models to domains and tasks (2020) — link
- Bert: Pre-training of deep bidirectional transformers for language understanding (2018) — link
- A survey of zero-shot learning: Settings, methods, and applications (2019)
- The rise and potential of large language model based agents: A survey (2023) — link
- Connectionist AI, symbolic AI, and the brain (1987)
- Experiences with an architecture for intelligent, reactive agents (1997)
- Application of reinforcement learning for agent-based production scheduling (2005)
- Fast adaptation via Meta learning in multi-agent cooperative tasks (2019)
- War and peace (waragent): Large language model-based multi-agent simulation of world wars (2023) — link
- The Impact of Reasoning Step Length on Large Language Models (2024) — link
- Exploring large language models for communication games: An empirical study on werewolf (2023) — link
- Put your money where your mouth is: Evaluating strategic planning and execution of llm agents in an auction arena (2023) — link
- Openagi: When llm meets domain experts (2023) — link
- Fundamentals of corporate finance (2013)
- Language models are few-shot learners (2020)
- Gpt-4 technical report (2023) — link
- Gemini: a family of highly capable multimodal models (2023) — link
- Behavioral finance (2015)
- Behavioral finance: an overview (2010)
- Machine Learning for Algorithmic Trading: Predictive models to extract signals from market and alternative data for systematic trading strategies with Python (2020)
- Backtesting of Trading Strategies for Bitcoin (2019)
- Python for Algorithmic Trading (2020)
- ZipLine: in-network compression at line speed (2020)
- Stock Trading Quantified: An Exploration of Algorithmic Trading Principles using QuantConnect (2020)
- ABIDES-gym: gym environments for multi-agent discrete event simulation and application to financial markets (2021)
- Trading and Investing Systems Analysis (2021)
- A review of backtesting and backtesting procedures (2005)
- What if LLMs Have Different World Views: Simulating Alien Civilizations with LLM-based Agents (2024) — link
- Revolutionizing finance with llms: An overview of applications and insights (2024) — link
- Communicative agents for software development (2023) — link
- Metagpt: Meta programming for multi-agent collaborative framework (2023) — link
- Chain-of-thought prompting elicits reasoning in large language models (2022)
- Self-consistency improves chain of thought reasoning in language models (2022) — link
- Star: Self-taught reasoner bootstrapping reasoning with reasoning (2022)
- A behavioral model of rational choice (1955)
- Prospect theory: An analysis of decision under risk (1979)
- Irrational exuberance: Revised and expanded third edition (2015)
- Risk as feelings. (2001)
- Judgment under Uncertainty: Heuristics and Biases: Biases in judgments reveal some heuristics of thinking under uncertainty. (1974)
- FinAgent: A Multimodal Foundation Agent for Financial Trading: Tool-Augmented, Diversified, and Generalist — → 2402.18485
- Multi-agent systems (2008)
- Trading Gym: An open source project for the development of reinforcement learning algorithms in the context of trading (2024)
- The probability of backtest overfitting (2016)
- Backtest Overfitting in the Machine Learning Era: A Comparison of Out-of-Sample Testing Methods in a Synthetic Controlled Environment (2024)
- Autogen: Enabling next-gen llm applications via multi-agent conversation framework (2023) — link
- BUILDING AN ECONOMETRIC MODEL OF SELECTED FACTORS’IMPACT ON STOCK PRICE: A CASE STUDY. (2020)
- Stock exchanges and the new markets for securities laws (2008)
- Trading Mechanism (2023) — link
- Nasdaq Listing Center (2024)
- Mengnan Du, Yongfeng Zhang, and Yanda Meng. 2024. Health-LLM: Personalized Retrieval-Augmented Disease Prediction Model (2024) — link
- Knowledge Graph Large Language Model (KG-LLM) for Link Prediction (2024) — link
- Goal-guided Generative Prompt Injection Attack on Large Language Models (2024) — link
- Target-driven Attack for Large Language Models (2024)
2 of 79 cited works are in the corpus; resolved via arXiv source bundles, Semantic Scholar and OpenAlex. Corpus-wide: 2596 linked papers.