TauricResearch/TradingAgents
TradingAgents: Multi-Agents LLM Financial Trading Framework
TradingAgents – Multi‑Agent LLM Trading Framework
What it is – An open‑source Python framework that lets you run a team of specialized LLM‑powered agents (fundamentals analyst, sentiment analyst, news analyst, technical analyst, researchers, trader, risk manager, portfolio manager) to simulate the decision‑making process of a real‑world trading firm. The agents exchange structured messages, debate, and finally produce a trade order that can be back‑tested on historical market data.
Key capabilities
- Multi‑provider LLM support – OpenAI, Google Gemini, Anthropic Claude, xAI Grok, DeepSeek, Qwen, GLM, MiniMax, Mistral, Groq, NVIDIA NIM, Azure OpenAI, Ollama, and any OpenAI‑compatible endpoint. Different agents can use different models/providers.
- Point‑in‑time data integrity – SEC EDGAR filings, Yahoo Finance fundamentals, Alpha Vantage, FRED macro data, and crypto sentiment are served exactly as they were available on the chosen analysis date, avoiding look‑ahead bias.
- Modular agent roles – Analysts generate reports, researchers debate bullish vs. bearish theses, the trader decides trade size/timing, risk management evaluates volatility/liquidity, and the portfolio manager gives final approval.
- CLI & Python API – Interactive command‑line interface for ad‑hoc runs and a
TradingAgentsGraphclass for programmatic use. - Back‑testing & reporting – Runs can be back‑tested with realistic execution (first close after decision), saved as a single HTML report, and include a full decision‑log.
- Docker & environment support – Official Docker compose, optional Ollama profile for local models, and
uv‑compatible installation. - Extensible configuration – All settings (LLM provider, model IDs, debate rounds, language, etc.) can be overridden via CLI flags or
TRADINGAGENTS_*environment variables.
Installation
# Clone and create a Python 3.11+ venv (example with conda)
git clone https://github.com/TaurusResearch/TradingAgents.git && cd TradingAgents
conda create -n tradingagents python=3.13 && conda activate tradingagents
pip install . # or: uv pip install .
Or run the Docker image:
cp .env.example .env # add your API keys
docker compose up --build tradingagents
Running a trade simulation (CLI example)
tradingagents \
--ticker NVDA \
--date 2026-09-23 \
--analysts fundamentals,sentiment,news,technical \
--save
The interactive mode will walk you through ticker, date, LLM provider, research depth, etc. All answers are remembered for the next run.
Programmatic use
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
config = DEFAULT_CONFIG.copy()
config["llm_provider"] = "openai"
config["quick_think_llm"] = "gpt-6-luna"
config["deep_think_llm"] = "gpt-6-sol"
ta = TradingAgentsGraph(debug=True, config=config)
state, decision = ta.propagate("NVDA", "2026-09-01")
print(decision) # e.g. {"action": "BUY", "size": 100}
ta.save_reports(state, "NVDA")
Data sources – SEC EDGAR (no key), Yahoo Finance, Alpha Vantage, FRED, Polymarket, and optional TypeSafe Jev social‑post screening.
Citation – The project is associated with the arXiv paper TradingAgents: Multi‑Agents LLM Financial Trading Framework (arXiv:2412.20138). Use the provided citation block in CITATION.cff when referencing the code.
License – The repository is released under the Apache‑2.0 License (see LICENSE).
Related
- Project
- Project
- Project
- Project
- Project