LogoAIAny
Icon for item

TradingAgents: Multi-Agents LLM Financial Trading Framework

TradingAgents is an open-source multi-agent trading framework by TauricResearch that uses LLM-powered specialized agents (fundamentals, sentiment, news, technical, researchers, trader, risk/portfolio manager) to collaboratively analyze markets and produce trading decisions. It is research-focused, configurable (LLMs, data vendors, debate rounds), and integrates with OpenAI, Alpha Vantage and yfinance for data.

Introduction

TradingAgents — Multi-Agents LLM Financial Trading Framework

TradingAgents is an open-source research framework that simulates a small trading firm by composing multiple specialized LLM-driven agents. Each agent has a distinct role (fundamental analyst, sentiment/news analyst, technical analyst, bullish/bearish researchers, trader, risk manager and portfolio manager). Agents share observations, debate, and produce consolidated trading proposals which can be executed against a simulated exchange.

Key features
  • Multi-agent architecture: decomposes market analysis into domain experts (fundamental, sentiment, news, technical) plus debating researchers and decision-making trader & risk managers.
  • LLM-native: designed to use large language models for reasoning — default integration demonstrated with OpenAI models (deep/quick thinking LLMs) but configurable to other models.
  • Configurable data vendors: supports yfinance for price/technical data and Alpha Vantage for fundamentals/news by default; also supports local/backtest data options.
  • Research-first & reproducible: CLI, example scripts, and a Python package interface (TradingAgentsGraph) for programmatic use and experiments.
  • Safety/disclaimer: explicitly labeled as research — not financial advice. Performance depends on model choice, temperature, data quality and other non-deterministic factors.
Architecture & workflow
  1. Data ingestion: historical prices, technical indicators, fundamentals, and news are fetched from configured vendors (yfinance, Alpha Vantage, or local datasets).
  2. Analyst stage: dedicated analyst agents evaluate different signal classes (fundamentals, sentiment, news, technical indicators) and produce structured reports.
  3. Researcher stage: bullish and bearish researchers critique analyst outputs and debate trade rationale and risk.
  4. Trader & risk management: the trader composes a trade proposal (direction, size, timing) while the risk manager and portfolio manager assess position sizing and risk limits. Approved proposals are sent to a simulated exchange for execution.
Implementation & usage
  • Language: Python (example uses a TradingAgentsGraph class).
  • Orchestration: built with LangGraph for modular LLM-driven pipelines.
  • Example usage:
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
 
ta = TradingAgentsGraph(debug=True, config=DEFAULT_CONFIG.copy())
_, decision = ta.propagate("NVDA", "2024-05-10")
print(decision)
  • Configuration: swap LLM choices, debate rounds, and data vendors via DEFAULT_CONFIG. Default recommends cost-saving models for testing and higher-capacity models for deeper reasoning.
Notes on dependencies & APIs
  • Requires OpenAI API key (used for agents) and Alpha Vantage API key (default for fundamentals/news) — keys can be set in environment or .env.
  • The repo contains README, CLI demo, code examples, and links to the associated arXiv paper (arXiv:2412.20138).
Intended audience

Researchers and practitioners experimenting with LLM-based agent architectures, multi-agent decision-making, and AI-driven financial research/backtesting. The project is intended for experimentation and academic reproduction rather than production trading.

Information

  • Websitegithub.com
  • AuthorsYijia Xiao, Edward Sun, Di Luo, Wei Wang, TauricResearch
  • Published date2024/12/28

Categories

More Items