mlsanityData to 7 Oct 2026

QuantCode-Bench: A Benchmark for Evaluating the Ability of Large Language Models to Generate Executable Algorithmic Trading Strategies

arXiv 2604.15151 ↗First posted 16 Apr 2026cs.CLcited by 3

Not on the map. Why?

Abstract (arXiv)

Large language models have demonstrated strong performance on general-purpose programming tasks, yet their ability to generate executable algorithmic trading strategies remains underexplored. Unlike standard code benchmarks, trading-strategy generation requires simultaneous mastery of domain-specific financial logic, knowledge of a specialized API, and the ability to produce code that is not only syntactically correct but also leads to actual trades on historical data. In this work, we present QuantCode-Bench, a benchmark for the systematic evaluation of modern LLMs in generating strategies for the Backtrader framework from textual descriptions in English. The benchmark contains 400 tasks of varying difficulty collected from Reddit, TradingView, StackExchange, GitHub, and synthetic sources. Evaluation is conducted through a multi-stage pipeline that checks syntactic correctness, successful backtest execution, the presence of trades, and semantic alignment with the task description using an LLM judge. We compare state-of-the-art models in two settings: single-turn, where the strategy must be generated correctly on the first attempt, and agentic multi-turn, where the model receives iterative feedback and may repair its errors. We analyze the failure modes across different stages of the pipeline and show that the main limitations of current models are not related to syntax, but rather to the correct operationalization of trading logic, proper API usage, and adherence to task semantics. These findings suggest that trading strategy generation constitutes a distinct class of domain-specific code generation tasks in which success requires not only technical correctness, but also alignment between natural-language descriptions, financial logic, and the observable behavior of the strategy on data.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 9 of its 12 references that are in the map. First posted on arXiv 16 Apr 2026.

Builds on

9 of 12 references.

References · 9

  1. 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,393
  2. 2024LiveCodeBench: Holistic and Contamination Free Evaluation of Large Language Models for Codecited by 1,906
  3. 2026Terminal-Bench: Benchmarking Agents on Hard, Realistic Tasks in Command Line Interfacescited by 515
  4. 2023FinanceBench: A New Benchmark for Financial Question Answeringcited by 261
  5. 2025SWE-rebench: An Automated Pipeline for Task Collection and Decontaminated Evaluation of Software Engineering Agentscited by 127
  6. 2025Fin-R1: A Large Language Model for Financial Reasoning through Reinforcement Learningcited by 82
  7. 2025Finance Agent Benchmark: Benchmarking LLMs on Real-world Financial Research Taskscited by 63
  8. 2025Fino1: On the Transferability of Reasoning-Enhanced LLMs and Reinforcement Learning to Financecited by 32
  9. 2025FinAgentBench: A Benchmark Dataset for Agentic Retrieval in Financial Question Answeringcited by 29

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 3.

3 papers.

Similar, not cited

Close in wording, no citation either way

  1. 2026BacktestBench: Benchmarking Large Language Models for Automated Quantitative Strategy Backtesting
  2. 2026QuantEval: A Benchmark for Financial Quantitative Tasks in Large Language Models
  3. 2026Agentic Trading: When LLM Agents Meet Financial Markets
  4. 2024QuantAgent: Seeking Holy Grail in Trading by Self-Improving Large Language Model
  5. 2026Beyond Agent Architecture: Execution Assumptions and Reproducibility in LLM-Based Trading Systems
  6. 2024Large Language Model Agent in Financial Trading: A Survey
  7. 2025LiveTradeBench: Seeking Real-World Alpha with Large Language Models
  8. 2025Agent Trading Arena: A Study on Numerical Understanding in LLM-Based Agents