TradingAgents

TradingAgents: Multi-Agents LLM Financial Trading Framework

TradingAgents

What is TradingAgents

TradingAgents is an advanced multi-agent trading framework that simulates real-world trading firms using specialized LLM-powered agents. The platform decomposes complex trading tasks into specialized roles including analysts, researchers, traders, and risk managers, enabling collaborative market analysis and decision-making. Designed primarily for financial researchers and algorithmic traders, it addresses the challenge of integrating diverse market signals (fundamentals, sentiment, technicals) into a unified trading strategy. Built with Python and leveraging LangGraph for agent orchestration, the framework integrates with OpenAI models (e.g., GPT-4) and FinnHub for financial data, offering a modular, research-focused approach to algorithmic trading.

How to Use

  1. Installation:
    git clone https://github.com/TauricResearch/TradingAgents.git
    cd TradingAgents
    conda create -n tradingagents python=3.13
    conda activate tradingagents
    pip install -r requirements.txt
    
  2. API Setup:
    • Obtain FinnHub (free tier) and OpenAI API keys.
    • Configure environment variables:
      export FINNHUB_API_KEY=your_key
      export OPENAI_API_KEY=your_key
      
  3. CLI Execution:
    Run python -m cli.main to interactively select tickers, dates, and LLM models. The CLI displays real-time agent progress and trade decisions.
  4. Python Integration:
    Import the tradingagents module and initialize TradingAgentsGraph(). Use .propagate() to generate decisions:
    from tradingagents.graph import TradingAgentsGraph
    graph = TradingAgentsGraph()
    decision = graph.propagate(ticker="AAPL")
    

Key Features

  • Multi-Agent Architecture: Specialized roles (Fundamentals Analyst, Sentiment Analyst, Technical Analyst) with LLM-powered decision-making.
  • Dynamic Debate System: Bullish/bearish researcher teams debate insights to balance risk/reward.
  • Risk Management Integration: Portfolio Manager and Risk Agents evaluate volatility, liquidity, and adjust strategies.
  • Modular Design: Built with LangGraph for flexible agent composition and scalability.
  • Multi-LLM Support: Compatible with OpenAI models (GPT-4, GPT-4o) and cost-efficient alternatives (e.g., gpt-4.1-mini).
  • Real-Time Data Integration: FinnHub API for financial metrics, news, and sentiment analysis.
  • Interactive CLI: Visual progress tracking and trade execution simulation.
  • Research-Focused: Designed for experimental use with configurable parameters (LLM temperature, research depth).

The framework’s unique selling point lies in its realistic emulation of trading firm workflows, combining structured agent collaboration with cutting-edge LLM reasoning.

Statistics

Stars
16,289
Forks
2,764
Watchers
16,289
!
Issues
112

Language

Python