项目简介
TradingAgents是一个多智能体交易框架,模拟真实交易公司。它部署专门的大语言模型代理(分析师、研究员、交易员、风险管理)协作评估市场并做出交易决策。该框架支持多种大模型提供商,专为研究设计。
README 预览
\n \n\n\n\n \n \n \n \n \n \n\n\n\n \n Deutsch | \n Español | \n français | \n 日本語 | \n 한국어 | \n Português | \n Русский | \n 中文\n\n\n---\n\n# TradingAgents: Multi-Agents LLM Financial Trading Framework\n\n## News\n- [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](CHANGELOG.md) for the full list.\n- [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.\n- [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.\n- [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.\n- [2026-01] **Trading-R1** [Technical Report](https://arxiv.org/abs/2509.11420) released, with [Terminal](https://github.com/TauricResearch/Trading-R1) expected to land soon.\n\n\n\n \n \n \n \n \n\n\n\n> 🎉 **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.\n>\n> So we decided to fully open-source the framework. Looking forward to building impactful projects with you!\n\n\n\n🚀 [TradingAgents](#tradingagents-framework) | ⚡ [Installation & CLI](#installation-and-cli) | 🎬 [Demo](https://www.youtube.com/watch?v=90gr5lwjIho) | 📦 [Package Usage](#tradingagents-package) | 🤝 [Contributing](#contributing) | 📄 [Citation](#citation)\n\n\n\n## TradingAgents Framework\n\nTradingAgents is a multi-agent trading framework that mirrors the dynamics of real-world trading firms. By deploying specialized LLM-po
常见问题 (5)
故障排除为什么TradingAgents在'glm-4.7-flash-30b:latest'上报错'model not found'?
默认模型名称不正确;TradingAgents 现在使用 'glm-4.7-flash:latest'。请更新到最新的主分支。作为临时解决方案,创建一个别名模型:在 Modelfile 中写入 FROM glm-4.7-flash:latest,然后运行 ollama create glm-4.7-flash-30b -f Modelfile。
故障排除为什么TradingAgents对非美国股票(如RELIANCE.NS)显示alpha vs SPY?
这是一个已知的bug:反射层硬编码了SPY作为基准。该问题已在最新的main分支中修复。现在,框架会根据股票代码的交易所后缀(例如,.NS对应的^NSEI)自动选择区域指数。你也可以在配置中手动设置benchmark_ticker。请更新你的安装或拉取最新代码以获取此修复。
故障排除如何在设置环境变量时跳过交互式CLI选择步骤?
在运行CLI之前,设置特定的TRADINGAGENTS_*环境变量。例如,TRADINGAGENTS_OUTPUT_LANGUAGE可跳过第3步(输出语言),TRADINGAGENTS_LLM_PROVIDER可跳过第6步(LLM提供者),TRADINGAGENTS_DEEP_THINK_LLM / TRADINGAGENTS_QUICK_THINK_LLM可跳过第7步(思考代理)。这些值将被直接使用。该功能已在提交2e67782中实现。
故障排除为什么即使我设置了自定义的 .env 变量,tradingagents 仍然提示需要 LLM 提供者?
这是一个CLI未能识别指向OpenAI兼容端点的环境变量的错误。请确保您使用的版本包含此修复(提交2e67782或更高版本)。设置所需的环境变量:TRADINGAGENTS_LLM_PROVIDER=openai, TRADINGAGENTS_LLM_BACKEND_URL=https://opencode.ai/zen/go/v1, TRADINGAGENTS_DEEP_THINK_LLM=<model>, TRADINGAGENTS_QUICK_THINK_LLM=<model>。然后,提供商提示将自动跳过。
故障排除为什么TradingAgents显示XAUUSD+的黄金价格不正确?
这是一个最近提交(1ff3f07)中修复的符号解析错误。请更新到最新版TradingAgents。现在它能正确将常见符号如XAUUSD+映射到雅虎财经工具(黄金对应GC=F)。如果问题仍然存在,请尝试直接使用'GC=F',或确认您使用的是最新版本。