TauricResearch/TradingAgents

GITHUB中文整理

主语言 Python · 116,683 星 · Apache-2.0 · 创建于 2024-12-28

金融交易多智能体大语言模型LangGraphPython 本周第 5 名
打开 GitHub 仓库

一个基于大语言模型的多智能体金融交易框架,用多个协作的 AI 代理模拟分析、研究、辩论与决策流程,输出针对某只股票的买卖判断。

Stars 116,683 累计 star,越多说明被认可得越广
Watching 852 订阅该仓库变动的人数
Forks 22,355 被派生出去的仓库数
Issues 113 当前开放的 Issue 数
语言 Python GitHub 自动判定的主语言
许可证 Apache-2.0 开源协议,用之前先确认能不能商用
24h 增长 +0 1 天前 116,683 星
7 日增长 — 数据积累中
30 日增长 — 数据积累中

仓库健康度

5 个维度
只看客观信号,不构成安全性结论
维护活跃度 数据完整
2026-10-17 05:38 最近推送

最近推送 2026-10-17 05:38(11 天前),属于活跃维护

社区响应 数据完整
113 开放 Issue

开放 Issue 113 个 · Fork 22,355 个

增长趋势 部分数据
+0 7 日新增

24 小时 +0 · 7 日 积累中 · 30 日 积累中

项目规范 数据完整
Apache-2.0 许可证

许可证 Apache-2.0 · 5 个 topics · 开了 Wiki

版本发布 证据不足
— 发布次数

这一项暂无数据,不代表项目没有发布

「证据不足」表示这项数据暂时没有取到,不能读成「项目有问题」;「部分数据」表示只拿到一部分信号。版本发布要额外调 Releases 接口,下一版补。

Star 趋势

6 天记录
最近 90 天站内记录的星数
116,683当前 Star +3,503首尾差值 2026-10-23最早记录 2026-10-28最近记录

横轴 2026-10-23 → 2026-10-28,纵轴按这段时间的最小/最大值拉伸。趋势来自站内每天记录一次的星数,页面打开时不会实时请求 GitHub。

它解决什么问题

据 README 归纳
没有它会怎样

单靠一个人或单一模型做交易分析,容易漏掉基本面、新闻、情绪等多角度信息,也缺少结构化的多轮辩论来质疑结论。没有这类框架,分析流程零散、难以复现,也很难把不同模型分工组合成完整决策链。

核心能力

7 条
归纳自 README,不是功能列表照抄
  1. 1组建分析师、研究员、辩论者、交易员与组合经理等多角色代理协同决策
  2. 2用 LangGraph 组织代理之间的图结构流程,保证模块化和可扩展
  3. 3按模型层级分别配置快速模型与深度模型,两者可用不同供应商
  4. 4通过 TradingAgentsGraph 的 propagate 接口对指定股票和日期返回决策
  5. 5提供交互式命令行工具,可选择股票代码、分析日期与模型供应商
  6. 6支持用命令行参数或环境变量跳过提问,便于定时任务和脚本运行
  7. 7接入多家模型供应商与本地模型,也支持使用自有 ChatGPT 订阅方案

项目画像

6 个角度
决定要不要用之前,先看这六条

项目定位

一个基于大语言模型的多智能体金融交易框架,用多个协作的 AI 代理模拟分析、研究、辩论与决策流程,输出针对某只股票的买卖判断。

适合谁

适合研究多智能体协作与 LLM 金融应用的研究者、量化或交易策略开发者,以及希望把多模型分析流程嵌入自有代码或脚本的工程师。

典型场景

在命令行中选择股票代码与分析日期,让多代理流程生成一份交易决策报告;在 Python 代码中导入并初始化交易图,对指定标的运行 propagate 获取决策结果;把带参数的命令接入定时任务,在无人值守环境下批量跑分析;让组合经理等角色使用一个供应商的模型,分析师等角色使用另一个供应商的模型

部署难度

需先安装 Python 3.11 以上版本并创建虚拟环境,克隆仓库后安装包及依赖;配置模型供应商凭据后即可通过命令行或代码调用,整体步骤不多但依赖外部模型服务。

风险限制

需要 Python 3.11 或更高版本,并自行准备所调用模型供应商的密钥或本地模型环境;启动时会联网检查更新,可在无终端环境下运行但缺少答案时会在开始前中止。

最近维护

最近一次推送是 2026-10-17 05:38。 实现方式:框架以 LangGraph 搭建代理协作图,把不同角色的代理串联成分析到决策的流程;调用时传入股票代码和日期,经过各代理依次处理与辩论后返回最终决策。模型分层配置决定哪些代理用快速模型、哪些用深度模型。

README 原文细节

4 个板块
项目自己写的功能与用法,原文照录

怎么安装从零跑起来的步骤

Installation

TradingAgents needs Python 3.11 or later. Create a virtual environment in any of your favorite environment managers:

Install the package and its dependencies (uv pip install . with uv):

git clone https://github.com/TauricResearch/TradingAgents.git
cd TradingAgents

怎么用最典型的用法与示例

CLI Usage

You will see a screen where you can select your desired tickers, analysis date, LLM provider, research depth, and more. Your previous run's answers come back as the defaults, so pressing Enter accepts them. The TRADINGAGENTS variables in .env still skip their step entirely.

To run without questions, for a scheduled job or a script, answer the per-run steps with flags and the rest with TRADINGAGENTS variables:

Each flag skips only its own question. Run without a terminal, a missing answer stops the run before it starts and names the flag or variable to set.

At start-up the interactive CLI mentions a newer release and notices from Tauric Research. It checks at most once a day, in the background, and sends nothing about your runs; set TRADINGAGENTSNOUPDATECHECK=1 to turn it off. Runs without a terminal never check.

tradingagents          # installed command
python -m cli.main     # alternative: run directly from source

Python Usage

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:

You can also adjust the default configuration to set your own choice of LLMs, debate rounds, etc.

The quick model serves the analysts, researchers, debaters and trader; the deep model serves the research and portfolio managers. Each can run on its own provider, for example the managers on Claude while the rest run on OpenAI:

A tier on its own provider uses that provider's key and default endpoint; set quickthinkbackendurl or deepthinkbackendurl for a local or relay endpoint. The TRADINGAGENTSDEEPTHINKPROVIDER and TRADINGAGENTSQUICKTHINKPROVIDER variables set them for the CLI, together with the tier's model variable.

from tradingagents.graph.trading_graph import TradingAgentsGraph
from tradingagents.default_config import DEFAULT_CONFIG

ta = TradingAgentsGraph(debug=True, config=DEFAULT_CONFIG.copy())

# forward propagate
state, decision = ta.propagate("NVDA", "2026-09-01")
print(decision)

# the same report tree the CLI saves, under results_dir/reports
ta.save_reports(state, "NVDA")

实现原理它内部是怎么做的

Implementation Details

We built TradingAgents with LangGraph to ensure flexibility and modularity. The framework supports multiple LLM providers: OpenAI, Google, Anthropic, xAI, DeepSeek, Qwen (Alibaba DashScope, international and China endpoints), GLM (Zhipu), MiniMax (global + China), OpenRouter, Ollama for local models, Azure OpenAI for enterprise, and your own ChatGPT plan.

其它说明README 里剩下的内容

News

- [2026-10] TradingAgents v0.7.0 released with runs on your own ChatGPT Plus or Pro plan, backtests scored from the first close after each decision, a note at start-up when a newer release is out, and a wheel attached to each GitHub release. - [2026-10] TradingAgents v0.6.0 released with reports saved as one HTML page, a provider per model tier so the managers and analysts can run on different models, past decisions settled for every ticker while the analysts work, and company news read from Yahoo search while Yahoo's news feed is down. - [2026-09] TradingAgents v0.5.2 released with parallel a

  • [2026-09] TradingAgents v0.5.1 released with a package layout organised by what each module holds (import paths moved), optional Jev screening of social posts, GPT-6 Sol and Luna as the default models
  • [2026-09] TradingAgents v0.5.0 released with point-in-time integrity across every dated path, SEC EDGAR fundamentals served as filed, backtesting over a ticker and date grid, portfolio-aware runs, and
  • [2026-08] TradingAgents v0.4.0 released with look-ahead / point-in-time fixes across FRED macro, social sentiment, and the decision-log memory; clearer decision signals; working CLI checkpoint resume;
  • [2026-07] TradingAgents v0.3.1 released with correctness and stability fixes: Alpha Vantage look-ahead filtering, graph-router crash-safety, graph-shape-aware checkpoint resume, working crypto sentime
  • [2026-06] TradingAgents v0.3.0 released with a verified data-access contract, an expanded provider registry (NVIDIA, Kimi, Groq, Mistral, Bedrock, and any OpenAI-compatible endpoint), FRED and Polymar
  • [2026-05] TradingAgents v0.2.5 released with the grounded Sentiment Analyst, GPT-5.5 etc. model coverage, Qwen/GLM/MiniMax dual-region support, TRADINGAGENTS env-var configurability with API-key auto-
  • [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 provi
  • [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.

Analyst Team

The selected analysts work at the same time, each on its own tools, and the research debate starts once all of their reports are in.

  • Fundamentals Analyst: Evaluates company financials and performance metrics, identifying intrinsic values and potential red flags.
  • Sentiment Analyst: Aggregates news headlines, StockTwits, and Reddit chatter into a single sentiment read 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.

Researcher Team

  • 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.

关于 TradingAgents 的常见问题

7 个问题
答案来自 README 归纳与 GitHub 实时数据
TradingAgents 是做什么的?

一个基于大语言模型的多智能体金融交易框架,用多个协作的 AI 代理模拟分析、研究、辩论与决策流程,输出针对某只股票的买卖判断。 单靠一个人或单一模型做交易分析,容易漏掉基本面、新闻、情绪等多角度信息,也缺少结构化的多轮辩论来质疑结论。没有这类框架,分析流程零散、难以复现,也很难把不同模型分工组合成完整决策链。

TradingAgents 有哪些功能?

核心能力:组建分析师、研究员、辩论者、交易员与组合经理等多角色代理协同决策;用 LangGraph 组织代理之间的图结构流程,保证模块化和可扩展;按模型层级分别配置快速模型与深度模型,两者可用不同供应商;通过 TradingAgentsGraph 的 propagate 接口对指定股票和日期返回决策;提供交互式命令行工具,可选择股票代码、分析日期与模型供应商;支持用命令行参数或环境变量跳过提问,便于定时任务和脚本运行;接入多家模型供应商与本地模型,也支持使用自有 ChatGPT 订阅方案。

TradingAgents 适合谁用?

适合研究多智能体协作与 LLM 金融应用的研究者、量化或交易策略开发者,以及希望把多模型分析流程嵌入自有代码或脚本的工程师。

TradingAgents 是怎么工作的?

框架以 LangGraph 搭建代理协作图,把不同角色的代理串联成分析到决策的流程;调用时传入股票代码和日期,经过各代理依次处理与辩论后返回最终决策。模型分层配置决定哪些代理用快速模型、哪些用深度模型。

怎么安装 TradingAgents?

按项目 README 的说明:TradingAgents needs Python 3.11 or later. Create a virtual environment in any of your favorite environment managers:;Install the package and its dependencies (uv pip install . with uv):。完整命令见下方「怎么安装」一节或 GitHub 仓库的 README。

用 TradingAgents 有什么门槛或限制?

需要 Python 3.11 或更高版本,并自行准备所调用模型供应商的密钥或本地模型环境;启动时会联网检查更新,可在无终端环境下运行但缺少答案时会在开始前中止。

TradingAgents 现在还在维护吗?数据怎么样?

目前 116,683 星,22,355 个 Fork,主语言 Python,创建于 2024-12-28,最近一次推送 2026-10-17 05:38,许可证 Apache-2.0。星数、Fork、推送时间都是 GitHub 返回的实时数据,「最近推送」离现在越近说明越活跃;长期不动要留意是否已停止维护。

这些内容来自哪

读法说明
中文整理据 README 归纳,数据取自 GitHub
中文说明据项目 README 归纳只写 README 能确认的内容,不替作者补功能与数字
关键数据与 GitHub 页面一致星数、Fork、语言与时间都不做二次加工
数据日期2026-10-23 17:57星数与介绍这份数据是哪一天的

项目数据取自 GitHub 官方接口与项目 README;星数、Fork、语言与时间以 GitHub 页面为准,档案更新于 2026-10-23 17:57。