Article
By Jess Lulka
Content Marketing Manager
The financial sector is transforming, driven by the emergence of large language models (LLMs) and AI agents. These technologies are reshaping how institutions analyze markets, generate insights, and execute trades, with single-agent models analyzing and collecting information to provide financial feedback and advice.
But what if the technology could mimic the behavior of real-life financial institutions? Researchers from the University of California, Los Angeles, and the Massachusetts Institute of Technology were curious enough to pursue this question and create one of the earliest LLMs designed for theoretical financial analysis.
The team developed TradingAgents, a large language model and framework dedicated to simulating real-world trading firms and providing in-depth market analysis. Its research team wanted to see how using a multi-agent structure could improve the use of LLMs and agents within the financial sector and help with forecasting and market simulation.
This article covers the TradingAgents framework, its architecture, and the use of LLMs in the finance sector.
Key takeaways
Large language models are used in finance to assist with trading services, capital strategy, fraud detection and prevention, and financial model simulation.
Developed in 2024, TradingAgents is a multi-agent LLM developed by researchers from UCLA and MIT that simulates the activity of a real-world trading firm.
The framework is comprised of specialized agents that are categorized into teams that can collect financial information and news, perform sentiment analysis, complete bids, and assess risk.
The overall LLM market is expected to reach $31.6 billion by 2030, with a CAGR of 33.2%. This growth means more specialized use cases of LLMs – and the financial sector is no exception. LLMs are being used in the finance sector for both internal process evaluation and market-facing activities such as trading services, advisory services, and capital strategy development.
Models being used in the finance sector include BloombergGPT, FinGPT, TradingGPT, and FinBERT. Across this collection, you can use these LLMs for financial news and analysis, financial report generation, trader behavior emulation, financial sentiment classification, forecasting, and financial information analysis.
LLMs can also be used for personal finance tasks, including overall portfolio analysis, goal setting, debt management, financial literacy education, and information gathering about specific financial products. You can complete these tasks with ChatGPT, Mistral, GPT4All, or any publicly available LLM.
With all the possibilities, there are also concerns around data privacy, data transparency, and security, lack of LLM explainability, cyberattacks, reasoning errors, data bias, AI hallucinations, and environmental impacts of the use of these models within the financial sector and for personal financial planning.
Want to see TradingAgents in action? Our community tutorial covers how to set up TradingAgents on your own GPU Droplet and start running financial simulations.
TradingAgents is a multi-agent LLM-driven stock trading framework that emulates a realistic trading firm with specialized agents that collaborate via structured communication and debates.
“Our framework leverages diverse data sources and multi-agent interactions to enhance trading decisions, achieving superior performance in cumulative returns, Sharpe ratio, and risk management compared to traditional strategies,” researchers wrote in their findings in “TradingAgents: Multi-Agents LLM Financial Trading Framework.”
The goal of the framework is to provide a more human-like LLM that can mimic trader behavior and offer more in-depth financial analysis and simulation than previous single-agent LLMs that focused on doing one task well or didn’t account for the more dynamic nature of financial markets. When creating TradingAgents, researchers wanted to address two main problems:
Lack of realistic organizational modeling: Previous frameworks were focused on specific task performance and siloed from workflows, which limited their ability to capture the complex interactions between agents and realistically simulate real-world trading firms.
Inefficient communication interface: Prior communication between agents relied on message histories or unstructured data pools, which resulted in lost details, missing context, and inability to track information from long conversations.
Researchers decided to tackle these problems with two main components: multi-agent teams that use specialized agents and structured outputs and controls for communication. To build out TradingAgents, researchers used LLMs such as GPT-4o-mini, GPT-4o, and o1-preview from OpenAI to run their multi-agent teams. Throughout the research process, researchers validated the model with cumulative return, Sharpe ratio, and maximum drawdown metrics.
The TradingAgents LLM is designed to simulate a real financial trading firm, which requires multiple AI agents to perform specialized tasks and communicate with each other. These agents communicate through structured documents and diagrams and natural language dialogue.
“By integrating agents with distinct roles and risk profiles, along with a reflective agent and a dedicated risk management team, TradingAgents significantly improves trading outcomes and overall risk management compared to baseline models. Additionally, the collaborative nature of these agents ensures adaptability to varying market conditions,” according to researchers.
The different teams are:
Analyst Team: Gathers market data and analysis to inform trading decisions from financial statements, social media posts, insider transactions, earnings reports, news reports, government announcements, world news, and relevant technical indicators such as the Moving Average Convergence Divergence (MACD) and Relative Strength Index (RSI). This team relies on Fundamental Analyst Agents, Sentiment Analyst Agents, News Analyst Agents, and Technical Analyst Agents.
Research Team: Evaluates the information from the Analyst Team and debates the potential positives and negatives of investment decisions. The Bullish Researcher advocates for investment opportunities and provides positive indicators and growth indicators. The Bearish Researcher focuses on potential risks and downsides, and highlights potential negative outcomes.
Trader Agents: Executes trading decisions based on information from the Analyst and Research Teams. It evaluates recommendations, decides timing and size of trades, places buy/sell orders on the market, and adjusts portfolio allocations as the market responds or changes.
Risk Management Team: Monitors the simulated firm’s exposure to certain market risks. These agents consistently evaluate the firm’s risk profile, check market volatility, implement risk mitigation strategies, provide feedback to Trader Agents, and confirm that the firm’s portfolio is within the risk tolerance and investment objectives.
Fig. 1: TradingAgents multi-agent LLM for financial trading simulation. Source: https://tradingagents-ai.github.io/
All of these agents rely on the ReAct prompting framework to use a blend of reasoning and action. According to researchers, this design ensures a dynamic decision-making process that mirrors real-world trading systems.
Researchers tested this framework to simulate the market between January 1, 2024, and March 29, 2024. They used several baseline models and evaluation metrics to test the effectiveness of TradingAgents, including:
Buy and Hold: Invest equal amounts in specified stocks and hold them throughout the simulation period.
Moving Average Convergence Divergence (MACD): A strategy that buys and sells based on specified crossover points between the MACD line and signal line.
KDJ and Relative Strength Index (RSI): Uses indicators to identify overbought and oversold conditions for trading.
Zero Mean Reversion (ZMR): Generates trading signals based on price deviations and reversions to a zero reference line
Simple Moving Average: Develops trading signals based on crossovers between short- and long-term moving averages.
The included evaluation metrics were cumulative return, annualized return, Sharpe ratio, and maximum drawdown. Researchers saw an overall positive response to using the TradingAgents framework and had the additional benefit of model explainability, as the project uses natural language and can communicate its decisions to researchers.
“This framework efficiently synthesizes diverse data sources and expert analyses, enabling trader agents to make well-informed decisions tailored to specific risk profiles. The inclusion of a reflective agent and a dedicated risk management team is pivotal in refining strategies and mitigating risks. As a result, the framework achieves exceptional return capture while maintaining strong risk management metrics, striking an optimal balance between maximizing rewards and minimizing risks,” researchers wrote.
The team notes that future work includes live deployment, expanding agent roles, and integrating real-time data processing to further improve performance.
Editor’s note: DigitalOcean does not endorse TradingAgents as a tool for day-to-day financial decision-making. It is designed to run financial simulations and should be used as such.
Build Real-Time AI Agents with GenAI and Serverless Functions
Understanding the Capabilities of DeepSeek R1 Large Language Models
What is TradingAgents?
TradingAgents is a multi-agent LLM designed to simulate the interactions of a real-world trading firm. It relies on a multiple-agent team architecture to analyze information, create predictions, perform trades, and evaluate financial risk.
How are LLMs used in finance?
Large language models are used in finance for market analysis, automated report generation, risk assessment and compliance monitoring, customer support, document analysis, and trading signal generation.
How does TradingAgents differ from other financial AI agents?
TradingAgents uses a multi-agent framework to perform specialized tasks on designated agent teams. This means that the overall model can effectively function like a real-world trading firm, instead of a one-off task agent. It is also one of the few LLMs designed for financial analytics.
DigitalOcean’s GenAI Platform makes it easier to build and deploy AI agents without managing complex infrastructure. Our fully-managed service gives you access to industry-leading models from Meta, Mistral AI, and Anthropic with must-have features for creating AI/ML applications.
Key features include:
RAG workflows for building agents that reference your data
Guardrails to create safer, on-brand agent experiences
Function calling capabilities for real-time information access
Agent routing for handling multiple tasks
Fine-tuning tools to create custom models with your data
Don’t just take our word for it—see for yourself. Get started with AI and machine learning at DigitalOcean to get access to everything you need to build, run, and manage the next big thing.
Jess Lulka is a Content Marketing Manager at DigitalOcean. She has over 10 years of B2B technical content experience and has written about observability, data centers, IoT, server virtualization, and design engineering. Before DigitalOcean, she worked at Chronosphere, Informa TechTarget, and Digital Engineering. She is based in Seattle and enjoys pub trivia, travel, and reading.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.