QuantAgent: Seeking Holy Grail in Trading by Self-Improving Large Language Model
Saizhuo Wang, Hang Yuan, Lionel M. Ni, Jian Guo
TL;DR
This work tackles the challenge of equipping autonomous LLM agents with domain knowledge for quantitative finance by introducing a principled two-layer framework with inner and outer loops that autonomously build and refine a domain knowledge base. The inner loop enables iterative writer–judge refinement within a simulated knowledge environment, while the outer loop tests outputs in the real world to enrich the KB, with theoretical efficiency guarantees framed as an MDP and offline pessimism analyses. QuantAgent, the instantiated agent for financial signal mining, demonstrates self-improvement by generating and improving a diverse set of predictive signals (alphas) as backtesting-like evaluations progress, improving predictive power and alpha relevance. The results suggest a scalable, self-sustaining approach to knowledge-enhanced trading agents, with potential applicability to other decision-making domains beyond finance.
Abstract
Autonomous agents based on Large Language Models (LLMs) that devise plans and tackle real-world challenges have gained prominence.However, tailoring these agents for specialized domains like quantitative investment remains a formidable task. The core challenge involves efficiently building and integrating a domain-specific knowledge base for the agent's learning process. This paper introduces a principled framework to address this challenge, comprising a two-layer loop.In the inner loop, the agent refines its responses by drawing from its knowledge base, while in the outer loop, these responses are tested in real-world scenarios to automatically enhance the knowledge base with new insights.We demonstrate that our approach enables the agent to progressively approximate optimal behavior with provable efficiency.Furthermore, we instantiate this framework through an autonomous agent for mining trading signals named QuantAgent. Empirical results showcase QuantAgent's capability in uncovering viable financial signals and enhancing the accuracy of financial forecasts.
