- [2026-04] TradingAgents v0.2.4 released with structured-output agents (Research Manager, Trader, Portfolio Manager), LangGraph checkpoint resume, persistent decision log, DeepSeek/Qwen/GLM/Azure provider support, Docker, and a Windows UTF-8 encoding fix. See CHANGELOG.md for the full list.
- [2026-03] TradingAgents v0.2.3 released with multi-language support, GPT-5.4 family models, unified model catalog, backtesting date fidelity, and proxy support.
- [2026-03] TradingAgents v0.2.2 released with GPT-5.4/Gemini 3.1/Claude 4.6 model coverage, five-tier rating scale, OpenAI Responses API, Anthropic effort control, and cross-platform stability.
- [2026-02] TradingAgents v0.2.0 released with multi-provider LLM support (GPT-5.x, Gemini 3.x, Claude 4.x, Grok 4.x) and improved system architecture.
- [2026-01] Trading-R1 Technical Report released, with Terminal expected to land soon.
🎉 TradingAgents officially released! We have received numerous inquiries about the work, and we would like to express our thanks for the enthusiasm in our community.
So we decided to fully open-source the framework. Looking forward to building impactful projects with you!
🚀 TradingAgents | ⚡ Installation & CLI | 🎬 Demo | 📦 Package Usage | 🤝 Contributing | 📄 Citation
TradingAgents is a multi-agent trading framework that mirrors the dynamics of real-world trading firms. By deploying specialized LLM-powered agents: from fundamental analysts, sentiment experts, and technical analysts, to trader, risk management team, the platform collaboratively evaluates market conditions and informs trading decisions. Moreover, these agents engage in dynamic discussions to pinpoint the optimal strategy.
TradingAgents framework is designed for research purposes. Trading performance may vary based on many factors, including the chosen backbone language models, model temperature, trading periods, the quality of data, and other non-deterministic factors. It is not intended as financial, investment, or trading advice.
Our framework decomposes complex trading tasks into specialized roles. This ensures the system achieves a robust, scalable approach to market analysis and decision-making.
- Fundamentals Analyst: Evaluates company financials and performance metrics, identifying intrinsic values and potential red flags.
- Sentiment Analyst: Analyzes social media and public sentiment using sentiment scoring algorithms to gauge short-term market mood.
- News Analyst: Monitors global news and macroeconomic indicators, interpreting the impact of events on market conditions.
- Technical Analyst: Utilizes technical indicators (like MACD and RSI) to detect trading patterns and forecast price movements.
- Comprises both bullish and bearish researchers who critically assess the insights provided by the Analyst Team. Through structured debates, they balance potential gains against inherent risks.
- Composes reports from the analysts and researchers to make informed trading decisions. It determines the timing and magnitude of trades based on comprehensive market insights.
- Continuously evaluates portfolio risk by assessing market volatility, liquidity, and other risk factors. The risk management team evaluates and adjusts trading strategies, providing assessment reports to the Portfolio Manager for final decision.
- The Portfolio Manager approves/rejects the transaction proposal. If approved, the order will be sent to the simulated exchange and executed.
Clone TradingAgents:
git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgentsCreate a virtual environment in any of your favorite environment managers:
conda create -n tradingagents python=3.13
conda activate tradingagentsInstall the package and its dependencies:
pip install .Alternatively, run with Docker:
cp .env.example .env # add your API keys
docker compose run --rm tradingagentsFor local models with Ollama:
docker compose --profile ollama run --rm tradingagents-ollamaTradingAgents supports multiple LLM providers. Set the API key for your chosen provider:
export OPENAI_API_KEY=... # OpenAI (GPT)
export GOOGLE_API_KEY=... # Google (Gemini)
export ANTHROPIC_API_KEY=... # Anthropic (Claude)
export XAI_API_KEY=... # xAI (Grok)
export DEEPSEEK_API_KEY=... # DeepSeek
export DASHSCOPE_API_KEY=... # Qwen (Alibaba DashScope)
export ZHIPU_API_KEY=... # GLM (Zhipu)
export OPENROUTER_API_KEY=... # OpenRouter
export ALPHA_VANTAGE_API_KEY=... # Alpha VantageFor enterprise providers (e.g. Azure OpenAI, AWS Bedrock), copy .env.enterprise.example to .env.enterprise and fill in your credentials.
For local models, configure Ollama with llm_provider: "ollama" in your config.
Alternatively, copy .env.example to .env and fill in your keys:
cp .env.example .envLaunch the interactive CLI:
tradingagents # installed command
python -m cli.main # alternative: run directly from sourceYou will see a screen where you can select your desired tickers, analysis date, LLM provider, research depth, and more.
An interface will appear showing results as they load, letting you track the agent's progress as it runs.
We built TradingAgents with LangGraph to ensure flexibility and modularity. The framework supports multiple LLM providers: OpenAI, Google, Anthropic, xAI, DeepSeek, Qwen (Alibaba DashScope), GLM (Zhipu), OpenRouter, Ollama for local models, and Azure OpenAI for enterprise.
To use TradingAgents inside your code, you can import the tradingagents module and initialize a TradingAgentsGraph() object. The .propagate() function will return a decision. You can run main.py, here's also a quick example:
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
ta = TradingAgentsGraph(debug=True, config=DEFAULT_CONFIG.copy())
# forward propagate
_, decision = ta.propagate("NVDA", "2026-01-15")
print(decision)You can also adjust the default configuration to set your own choice of LLMs, debate rounds, etc.
from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG
config = DEFAULT_CONFIG.copy()
config["llm_provider"] = "openai" # openai, google, anthropic, xai, deepseek, qwen, glm, openrouter, ollama, azure
config["deep_think_llm"] = "gpt-5.4" # Model for complex reasoning
config["quick_think_llm"] = "gpt-5.4-mini" # Model for quick tasks
config["llm_timeout"] = 30 # Per-call LLM timeout in seconds
config["max_debate_rounds"] = 2
ta = TradingAgentsGraph(debug=True, config=config)
_, decision = ta.propagate("NVDA", "2026-01-15")
print(decision)TradingAgents defaults to yfinance data. Vietnam-listed equities can be routed through the optional vnstock adapter for local symbols such as FPT, VNM, TCB, HOSE:FPT, and benchmark symbols such as VNINDEX.
Install the optional provider when you need Vietnam market data:
uv sync --extra vietnam
# or
pip install ".[vietnam]"The interactive CLI automatically switches explicit Vietnam symbols such as HOSE:FPT, HNX:SHS, VIC.HM, VNINDEX, and VN30 to the Vietnam data profile. If vnstock is not installed, the CLI stops before running the LLM agents and prints the install command instead of producing an empty-data report.
For technical indicators on weekends and exchange holidays, the vnstock adapter now falls back to the latest available trading session and returns a compact trailing series instead of expanding every non-trading calendar date into repeated placeholder rows. This keeps Vietnam market prompts smaller and avoids the analyst loop stalling on holiday runs.
Then configure the vendor router and market metadata:
from tradingagents.default_config import DEFAULT_CONFIG
from tradingagents.graph.trading_graph import TradingAgentsGraph
config = DEFAULT_CONFIG.copy()
config["market_profile"] = "vietnam"
config["benchmark_symbol"] = "VNINDEX"
config["currency"] = "VND"
config["data_vendors"] = {
"core_stock_apis": "vnstock,yfinance",
"technical_indicators": "vnstock,yfinance",
"fundamental_data": "vnstock,yfinance",
"news_data": "vnstock,yfinance",
}
ta = TradingAgentsGraph(debug=True, config=config)
_, decision = ta.propagate("FPT", "2026-04-20")
print(decision)The router also supports method-level overrides through tool_vendors, for example config["tool_vendors"] = {"get_stock_data": "vnstock,yfinance"}. Users are responsible for complying with vnstock and upstream data-source terms; TradingAgents remains a research framework and is not financial advice.
See tradingagents/default_config.py for all configuration options.
llm_timeout defaults to 30 seconds and is forwarded to provider clients that support request timeouts.
TradingAgents persists two kinds of state across runs.
The decision log is always on. Each completed run appends its decision to ~/.tradingagents/memory/trading_memory.md. On the next run for the same ticker, TradingAgents fetches the realised return (raw and alpha vs the configured benchmark, SPY by default), generates a one-paragraph reflection, and injects the most recent same-ticker decisions plus recent cross-ticker lessons into the Portfolio Manager prompt, so each analysis carries forward what worked and what didn't.
Override the path with TRADINGAGENTS_MEMORY_LOG_PATH.
Checkpoint resume is opt-in via --checkpoint. When enabled, LangGraph saves state after each node so a crashed or interrupted run resumes from the last successful step instead of starting over. On a resume run you will see Resuming from step N for <TICKER> on <date> in the logs; on a new run you will see Starting fresh. Checkpoints are cleared automatically on successful completion.
Per-ticker SQLite databases live at ~/.tradingagents/cache/checkpoints/<TICKER>.db (override the base with TRADINGAGENTS_CACHE_DIR). Use --clear-checkpoints to reset all of them before a run.
tradingagents analyze --checkpoint # enable for this run
tradingagents analyze --clear-checkpoints # reset before runningconfig = DEFAULT_CONFIG.copy()
config["checkpoint_enabled"] = True
ta = TradingAgentsGraph(config=config)
_, decision = ta.propagate("NVDA", "2026-01-15")We welcome contributions from the community! Whether it's fixing a bug, improving documentation, or suggesting a new feature, your input helps make this project better. If you are interested in this line of research, please consider joining our open-source financial AI research community Tauric Research.
Past contributions, including code, design feedback, and bug reports, are credited per release in CHANGELOG.md.
Please reference our work if you find TradingAgents provides you with some help :)
@misc{xiao2025tradingagentsmultiagentsllmfinancial,
title={TradingAgents: Multi-Agents LLM Financial Trading Framework},
author={Yijia Xiao and Edward Sun and Di Luo and Wei Wang},
year={2025},
eprint={2412.20138},
archivePrefix={arXiv},
primaryClass={q-fin.TR},
url={https://arxiv.org/abs/2412.20138},
}








