StockBench: Can LLM Agents Trade Stocks Profitably In Real-world Markets?

Yanxu Chen, Zijun Yao, Yantao Liu, Jin Ye, Jianing Yu, Lei Hou, Juanzi Li · OpenReview

Abstract

Large language models (LLMs) have recently demonstrated strong capabilities as autonomous agents, showing promise in reasoning, tool use, and sequential decision-making. While prior benchmarks have evaluated LLM agents in domains such as software engineering and scientific discovery, the finance domain remains underexplored, despite its direct relevance to economic value and high-stakes decision-making. Existing financial benchmarks primarily test static knowledge through question answering, but they fall short of capturing the dynamic and iterative nature of trading. To address this gap, we introduce StockBench, a contamination-free benchmark designed to evaluate LLM agents in realistic, multi-month stock trading environments. Agents receive daily market signals -- including prices, fundamentals, and news -- and must make sequential buy, sell, or hold decisions. Performance is assessed using financial metrics such as cumulative return, maximum drawdown, and the Sortino ratio. Our evaluation of state-of-the-art proprietary (e.g., GPT-5, Claude-4) and open-weight (e.g., Qwen3, Kimi-K2, GLM-4.5) models shows that while most LLM agents struggle to outperform the simple buy-and-hold baseline, several models demonstrate the potential to deliver higher returns and manage risk more effectively. These findings highlight both the challenges and opportunities in developing LLM-powered financial agents, showing that excelling at static financial knowledge tasks does not necessarily translate into successful trading strategies. We release StockBench as an open-source resource to support reproducibility and advance future research in this domain.

Introduction

Most existing financial benchmarks for Large Language Models (LLMs) are "static," focusing on answering questions about past earnings or calculating ratios from fixed texts. However, real-world finance is inherently agentic, requiring sequential decision-making and the ability to react to a constant stream of new information. Furthermore, many models suffer from data contamination; because LLMs are trained on massive historical datasets, they may already "know" the stock price movements they are being tested on.

StockBench addresses these gaps by creating a realistic, multi-month trading environment using very recent data (e.g., early 2025) to ensure models have not seen the "answers" during training. This benchmark evaluates whether LLMs can function as autonomous trading agents that manage portfolios over time.

The StockBench Framework

StockBench is built upon a robust architecture that simulates real-world trading conditions. The system is divided into a Back-Trading Environment and a structured Stock Trading Agent Workflow.

Overview of the StockBench Back-Trading Environment and the four-step Stock Trading Agent Workflow.

Back-Trading Environment

The environment provides agents with four categories of data:

  1. Investment Target: A selection of high-weight stocks from the Dow Jones Industrial Average (DJIA).
  2. Price & Fundamental Data: Key metrics including P/E ratios, dividend yields, market caps, and 52-week highs/lows.
  3. News Corpus: Real-time news articles and abstracts retrieved via APIs like Finnhub and Polygon.io.
  4. Evaluation Window: A multi-month period (e.g., March to June) used to assess performance.

Agent Workflow

The agent follows a four-step iterative process:

  • Step 1: Portfolio Overview: The agent scans recent news, current holdings, historical actions, and opening prices.
  • Step 2: In-depth Stock Analysis: The agent selects specific stocks for a "deep dive" into fundamental data.
  • Step 3: Decision Generation: The agent generates a decision to increase, decrease, or hold a position.
  • Step 4: Execution and Validation: The system validates the trade against available liquid cash and updates the portfolio.

Key Insights and Experimental Results

Profitability and Risk Management

Evaluation of frontier models like GPT-5, Claude-4, Qwen3, and Kimi-K2 reveals that profitability is possible but challenging. While the passive "buy-and-hold" baseline returned 0.4%, top-performing models like Kimi-K2 achieved a 1.9% return with superior risk management (Sortino Ratio of 0.0420). Qwen3-235B-Think achieved the highest absolute return at 2.5%, though it exhibited higher volatility.

The "Downturn" Test

A critical finding is that LLM agents struggle significantly in bearish markets. During downturn periods, most agents underperformed the baseline, suggesting a weakness in handling market pessimism and falling prices.

Model rankings during downturn (Jan-Apr 2024) and upturn (May-Aug 2024) market periods.

Reasoning vs. Trading Utility

Interestingly, "thinking" models (e.g., Qwen3-Think) did not always outperform standard instruction-tuned versions. While they make fewer arithmetic errors, they are more prone to "schema errors"—getting lost in complex chain-of-thought reasoning and failing to output decisions in the required structured format. Additionally, as the portfolio size increases (from 5 to 30 stocks), performance across all models degrades, indicating a scalability wall in LLM reasoning for large action spaces.

Conclusion

StockBench demonstrates that while LLMs show promise as trading agents, they are not yet a "silver bullet" for financial markets. They excel at using news sentiment to ground numerical data but struggle with market downturns and complex output schemas. Future work will focus on incorporating trading costs, slippage, and more diverse asset classes like small-caps and cryptocurrencies to further stress-test these autonomous agents.

Summary updated

BibTeX
@misc{chen2025stockbench,
  author = {Yanxu Chen and Zijun Yao and Yantao Liu and Jin Ye and Jianing Yu and Lei Hou and Juanzi Li},
  title = {{StockBench: Can LLM Agents Trade Stocks Profitably In Real-world Markets?}},
  year = {2025},
  eprint = {2510.02209},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2510.02209},
}
Figure