TLDR: A new study introduces ‘GuruAgents,’ prompt-guided AI agents that emulate the investment strategies of legendary investors like Warren Buffett and Benjamin Graham. By encoding their philosophies into LLM prompts, these agents can systematically operationalize complex investment doctrines. In a backtest, the Buffett GuruAgent achieved a 42.2% CAGR, significantly outperforming benchmarks, demonstrating that prompt engineering can translate qualitative investment wisdom into reproducible, quantitative strategies for automated investing.
A groundbreaking study introduces a novel approach to systematic investing by leveraging the power of large language models (LLMs) to emulate the strategies of legendary investment gurus. Titled “GuruAgents: Emulating Wise Investors with Prompt-Guided LLM Agents,” this research demonstrates how AI agents, guided by carefully crafted prompts, can translate the qualitative philosophies of iconic investors into reproducible, quantitative investment strategies.
The challenge of consistently applying the wisdom of investment legends like Warren Buffett or Benjamin Graham has long persisted. Their strategies, while clear in principle, often require expert judgment to operationalize in a systematic and data-driven manner. This gap between conceptual elegance and consistent automation is precisely what the GuruAgents study aims to bridge.
The researchers, Yejin Kim, Youngbin Lee, Juhyeong Kim, and Yongjae Lee, developed five distinct GuruAgents, each designed to embody a specific investor: Benjamin Graham, Edward Altman, Joel Greenblatt, Joseph Piotroski, and Warren Buffett. The core innovation lies in encoding each guru’s unique philosophy directly into LLM prompts. These prompts integrate financial tools and a deterministic reasoning pipeline, allowing the agents to interpret financial data, execute investment strategies, and make transparent decisions.
How GuruAgents Work: The Prompt Engineering Framework
The methodology behind GuruAgents is built on a three-part prompt engineering framework:
- Role-Based Persona Construction: Each agent is assigned a clear persona, complete with role definitions, canonical quotations, and the distinctive tone and manner of the investor it emulates. For instance, the Graham GuruAgent is instructed to be “prudent, skeptical, and independent,” focusing on intrinsic value and financial strength.
- Tool Integration Design: To enable accurate financial analysis, a suite of computational tools is integrated directly into the prompts. These tools provide standard financial metrics, valuation capabilities (like price multiples and net current asset value), and strategy-specific functions (such as Piotroski’s F-Score signals or Greenblatt’s Magic Formula components). The agents rely on the outputs of these tools for quantitative evaluation.
- Deterministic Reasoning Pipeline: To ensure reproducibility and minimize variability, a fixed sequence of operations is established. This pipeline involves metric collection, investor-specific scoring (with weighting schemes and penalty/bonus adjustments), and portfolio construction, where scores are converted into normalized portfolio weights. The final output is a standardized table detailing ticker, score, weight, and a one-sentence rationale.
Emulating the Masters
Each GuruAgent is meticulously designed to reflect its namesake’s investment principles:
- Benjamin Graham Agent: Emphasizes intrinsic value, a “margin of safety,” strong liquidity, and low leverage.
- Edward Altman Agent: Utilizes Z-Score models to classify firms into Safe, Grey, and Distress zones based on accounting ratios, focusing on financial distress prediction rather than forecasting.
- Joel Greenblatt Agent: Implements the “Magic Formula,” ranking stocks by earnings yield and return on capital, with a simple rules-based portfolio process.
- Joseph Piotroski Agent: Applies the F-Score, a nine-signal checklist based on profitability, leverage/liquidity, and operating efficiency, to identify financially strong value stocks.
- Warren Buffett Agent: Focuses on purchasing high-quality businesses at fair prices, emphasizing durable competitive advantages (moats), conservative balance sheets, and long-term owner-like thinking.
Performance and Insights
The GuruAgents were backtested on NASDAQ-100 constituents from Q4 2023 to Q2 2025, using OpenAI’s GPT-4o as the core LLM. The results were compelling:
- The Buffett GuruAgent achieved the highest performance, delivering a 42.2% Compound Annual Growth Rate (CAGR), significantly outperforming both the NASDAQ-100 and S&P 500 benchmarks.
- The Piotroski GuruAgent also performed strongly with a 30.9% CAGR, surpassing benchmarks.
- Other agents, like Graham, Altman, and Greenblatt, showed varied results, with Greenblatt exhibiting the weakest risk-adjusted performance despite low volatility.
Crucially, the study found that differences in prompt design played a decisive role in shaping each agent’s investment behavior. The Buffett GuruAgent, for example, generated concentrated portfolios with low turnover, reflecting its prompt’s emphasis on long-term holdings of high-quality businesses. In contrast, the Piotroski GuruAgent exhibited high turnover, consistent with its signal-driven checklist. These patterns in portfolio concentration, turnover, and sectoral exposure directly correlated with the principles encoded in their respective prompts.
Also Read:
- Large Language Models Tested in Business Simulations: A Benchmark for Managerial AI
- AuditAgent: A New AI Framework for Uncovering Financial Fraud Across Documents
A New Direction for Automated Investing
The study concludes that prompt engineering is a key mechanism for successfully translating the qualitative philosophies of investment gurus into reproducible, quantitative portfolio outcomes. This opens a novel direction for automated systematic investing, moving beyond traditional quantitative models to incorporate the nuanced wisdom of human investment masters.
For those interested in delving deeper into the methodology and results, the full research paper is available at arXiv.org. The source code and data for GuruAgents are also publicly available on GitHub, fostering further research and development in this exciting field.


