hsliuping/TradingAgents-CNPublic

基于多智能体LLM的中文金融交易框架 - TradingAgents中文增强版

AI summary: An enhanced Chinese localization of a multi-agent trading framework for stock market research and strategy testing.

Stars
33.1K
+45 today
Forks
6.9K
Watchers
252
Open issues
221
Open PRs
0
Contributors
~21
Commits
4.7K
Branches
2

PythonOtherCreated Jun 26, 2025Last push 1d agoLatest release v3.0.1-pro+92 stars this week+398 this month

Quick answers

What is TradingAgents-CN?
An enhanced Chinese localization of a multi-agent trading framework for stock market research and strategy testing.
What does TradingAgents-CN do?
TradingAgents-CN is a comprehensive learning and research platform designed for the Chinese-speaking community to experiment with multi-agent trading frameworks using large language models. It overhauls the original project with a FastAPI backend and a modern Vue 3 frontend, supported by a dual MongoDB and Redis database architecture. The platform integrates various LLM providers, including robust support for domestic Chinese models like VolcEngine Ark, and offers specific features for the A-share market. It emphasizes compliance and educational use, providing tools for intelligent news analysis, backtesting strategies, and generating professional reports without executing live trades.
Who is TradingAgents-CN for?
TradingAgents-CN is designed for researchers and learners exploring multi-agent stock research in the Chinese A-share market. It is not intended for investment advice.
How do I get started with TradingAgents-CN?
curl -fsSL https://raw.githubusercontent.com/hsliuping/TradingAgents-CN/v1.1.0/install.sh | bash
How popular is TradingAgents-CN on GitHub?
hsliuping/TradingAgents-CN has 33,137 stars and 6,888 forks on GitHub, and gained 92 stars in the last 7 days.
What license does TradingAgents-CN use?
hsliuping/TradingAgents-CN is released under the Other license.

Star history

since Jul 29, 2026
010K20K30KJul 2026Sep 2026Oct 2026Dec 2026
33.1K stars as of Dec 2, 2026. Measured daily since Jul 29, 2026; GitHub no longer exposes earlier star timestamps.

Contribution activity

commits per day, last 52 weeks
NovDecJanFebMarAprMayJunJulAugSepOctNovMonWedFri2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 4 commits2025-12-04: 10 commits2025-12-05: 2 commits2025-12-06: 0 commits2025-12-07: 24 commits2025-12-08: 6 commits2025-12-09: 8 commits2025-12-10: 6 commits2025-12-11: 2 commits2025-12-12: 8 commits2025-12-13: 2 commits2025-12-14: 8 commits2025-12-15: 2 commits2025-12-16: 4 commits2025-12-17: 4 commits2025-12-18: 26 commits2025-12-19: 4 commits2025-12-20: 0 commits2025-12-21: 0 commits2025-12-22: 6 commits2025-12-23: 0 commits2025-12-24: 16 commits2025-12-25: 50 commits2025-12-26: 0 commits2025-12-27: 0 commits2025-12-28: 4 commits2025-12-29: 12 commits2025-12-30: 10 commits2025-12-31: 10 commits2026-01-01: 4 commits2026-01-02: 26 commits2026-01-03: 0 commits2026-01-04: 0 commits2026-01-05: 16 commits2026-01-06: 18 commits2026-01-07: 20 commits2026-01-08: 2 commits2026-01-09: 18 commits2026-01-10: 46 commits2026-01-11: 50 commits2026-01-12: 0 commits2026-01-13: 32 commits2026-01-14: 26 commits2026-01-15: 20 commits2026-01-16: 18 commits2026-01-17: 0 commits2026-01-18: 8 commits2026-01-19: 6 commits2026-01-20: 6 commits2026-01-21: 38 commits2026-01-22: 68 commits2026-01-23: 58 commits2026-01-24: 54 commits2026-01-25: 102 commits2026-01-26: 18 commits2026-01-27: 22 commits2026-01-28: 12 commits2026-01-29: 6 commits2026-01-30: 2 commits2026-01-31: 2 commits2026-02-01: 4 commits2026-02-02: 6 commits2026-02-03: 14 commits2026-02-04: 4 commits2026-02-05: 6 commits2026-02-06: 4 commits2026-02-07: 12 commits2026-02-08: 24 commits2026-02-09: 16 commits2026-02-10: 24 commits2026-02-11: 2 commits2026-02-12: 2 commits2026-02-13: 6 commits2026-02-14: 20 commits2026-02-15: 20 commits2026-02-16: 2 commits2026-02-17: 4 commits2026-02-18: 0 commits2026-02-19: 2 commits2026-02-20: 0 commits2026-02-21: 4 commits2026-02-22: 6 commits2026-02-23: 22 commits2026-02-24: 16 commits2026-02-25: 2 commits2026-02-26: 12 commits2026-02-27: 30 commits2026-02-28: 6 commits2026-03-01: 0 commits2026-03-02: 2 commits2026-03-03: 0 commits2026-03-04: 16 commits2026-03-05: 16 commits2026-03-06: 0 commits2026-03-07: 4 commits2026-03-08: 6 commits2026-03-09: 0 commits2026-03-10: 8 commits2026-03-11: 12 commits2026-03-12: 10 commits2026-03-13: 30 commits2026-03-14: 25 commits2026-03-15: 10 commits2026-03-16: 0 commits2026-03-17: 4 commits2026-03-18: 4 commits2026-03-19: 22 commits2026-03-20: 2 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 32 commits2026-03-25: 6 commits2026-03-26: 0 commits2026-03-27: 18 commits2026-03-28: 21 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 1 commit2026-04-02: 4 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 5 commits2026-04-09: 2 commits2026-04-10: 7 commits2026-04-11: 11 commits2026-04-12: 11 commits2026-04-13: 11 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 3 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 0 commits2026-04-21: 1 commit2026-04-22: 1 commit2026-04-23: 1 commit2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 2 commits2026-04-27: 3 commits2026-04-28: 0 commits2026-04-29: 10 commits2026-04-30: 7 commits2026-05-01: 6 commits2026-05-02: 6 commits2026-05-03: 33 commits2026-05-04: 6 commits2026-05-05: 4 commits2026-05-06: 4 commits2026-05-07: 9 commits2026-05-08: 9 commits2026-05-09: 0 commits2026-05-10: 1 commit2026-05-11: 5 commits2026-05-12: 5 commits2026-05-13: 5 commits2026-05-14: 0 commits2026-05-15: 4 commits2026-05-16: 2 commits2026-05-17: 7 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 0 commits2026-05-21: 0 commits2026-05-22: 0 commits2026-05-23: 0 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 0 commits2026-05-29: 0 commits2026-05-30: 0 commits2026-05-31: 0 commits2026-06-01: 0 commits2026-06-02: 0 commits2026-06-03: 2 commits2026-06-04: 2 commits2026-06-05: 0 commits2026-06-06: 0 commits2026-06-07: 0 commits2026-06-08: 0 commits2026-06-09: 0 commits2026-06-10: 0 commits2026-06-11: 0 commits2026-06-12: 0 commits2026-06-13: 0 commits2026-06-14: 0 commits2026-06-15: 0 commits2026-06-16: 0 commits2026-06-17: 0 commits2026-06-18: 0 commits2026-06-19: 0 commits2026-06-20: 0 commits2026-06-21: 6 commits2026-06-22: 9 commits2026-06-23: 0 commits2026-06-24: 0 commits2026-06-25: 6 commits2026-06-26: 8 commits2026-06-27: 5 commits2026-06-28: 6 commits2026-06-29: 8 commits2026-06-30: 4 commits2026-07-01: 8 commits2026-07-02: 0 commits2026-07-03: 9 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 0 commits2026-07-07: 0 commits2026-07-08: 23 commits2026-07-09: 8 commits2026-07-10: 9 commits2026-07-11: 14 commits2026-07-12: 6 commits2026-07-13: 7 commits2026-07-14: 0 commits2026-07-15: 7 commits2026-07-16: 7 commits2026-07-17: 3 commits2026-07-18: 41 commits2026-07-19: 29 commits2026-07-20: 17 commits2026-07-21: 6 commits2026-07-22: 0 commits2026-07-23: 13 commits2026-07-24: 4 commits2026-07-25: 7 commits2026-07-26: 22 commits2026-07-27: 9 commits2026-07-28: 4 commits2026-07-29: 5 commits2026-07-30: 19 commits2026-07-31: 6 commits2026-08-01: 6 commits2026-08-02: 23 commits2026-08-03: 4 commits2026-08-04: 0 commits2026-08-05: 0 commits2026-08-06: 0 commits2026-08-07: 0 commits2026-08-08: 4 commits2026-08-09: 9 commits2026-08-10: 5 commits2026-08-11: 0 commits2026-08-12: 0 commits2026-08-13: 0 commits2026-08-14: 0 commits2026-08-15: 0 commits2026-08-16: 47 commits2026-08-17: 5 commits2026-08-18: 12 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 0 commits2026-08-22: 2 commits2026-08-23: 6 commits2026-08-24: 0 commits2026-08-25: 2 commits2026-08-26: 0 commits2026-08-27: 0 commits2026-08-28: 0 commits2026-08-29: 0 commits2026-08-30: 1 commit2026-08-31: 1 commit2026-09-01: 0 commits2026-09-02: 0 commits2026-09-03: 0 commits2026-09-04: 0 commits2026-09-05: 0 commits2026-09-06: 0 commits2026-09-07: 0 commits2026-09-08: 0 commits2026-09-09: 31 commits2026-09-10: 7 commits2026-09-11: 0 commits2026-09-12: 0 commits2026-09-13: 9 commits2026-09-14: 7 commits2026-09-15: 3 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 10 commits2026-09-19: 3 commits2026-09-20: 0 commits2026-09-21: 10 commits2026-09-22: 13 commits2026-09-23: 0 commits2026-09-24: 0 commits2026-09-25: 0 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 0 commits2026-09-30: 0 commits2026-10-01: 0 commits2026-10-02: 0 commits2026-10-03: 0 commits2026-10-04: 0 commits2026-10-05: 0 commits2026-10-06: 0 commits2026-10-07: 0 commits2026-10-08: 0 commits2026-10-09: 0 commits2026-10-10: 0 commits2026-10-11: 0 commits2026-10-12: 0 commits2026-10-13: 0 commits2026-10-14: 0 commits2026-10-15: 0 commits2026-10-16: 0 commits2026-10-17: 0 commits2026-10-18: 0 commits2026-10-19: 0 commits2026-10-20: 0 commits2026-10-21: 0 commits2026-10-22: 0 commits2026-10-23: 0 commits2026-10-24: 0 commits2026-10-25: 0 commits2026-10-26: 0 commits2026-10-27: 0 commits2026-10-28: 0 commits2026-10-29: 0 commits2026-10-30: 0 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 0 commits2026-11-03: 0 commits2026-11-04: 0 commits2026-11-05: 0 commits2026-11-06: 0 commits2026-11-07: 0 commits2026-11-08: 0 commits2026-11-09: 0 commits2026-11-10: 0 commits2026-11-11: 1 commit2026-11-12: 0 commits2026-11-13: 0 commits2026-11-14: 1 commit2026-11-15: 0 commits2026-11-16: 0 commits2026-11-17: 0 commits2026-11-18: 0 commits2026-11-19: 0 commits2026-11-20: 0 commits2026-11-21: 0 commits2026-11-22: 0 commits2026-11-23: 0 commits2026-11-24: 0 commits2026-11-25: 1 commit2026-11-26: 4 commits2026-11-27: 1 commit2026-11-28: 0 commits
2,197 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Widely adopted

    33,137 stars

  • Very active

    2,197 commits in 52 weeks

  • Well documented

    High community health score

  • Continuous integration

    Automated checks passing

What TradingAgents-CN does

TradingAgents-CN is a comprehensive learning and research platform designed for the Chinese-speaking community to experiment with multi-agent trading frameworks using large language models. It overhauls the original project with a FastAPI backend and a modern Vue 3 frontend, supported by a dual MongoDB and Redis database architecture. The platform integrates various LLM providers, including robust support for domestic Chinese models like VolcEngine Ark, and offers specific features for the A-share market. It emphasizes compliance and educational use, providing tools for intelligent news analysis, backtesting strategies, and generating professional reports without executing live trades.

TradingAgents-CN is designed for researchers and learners exploring multi-agent stock research in the Chinese A-share market. It is not intended for investment advice.

  • Modernized Architecture: Replaces Streamlit with a scalable FastAPI backend and a Vue 3 frontend, utilizing MongoDB and Redis for enhanced performance.
  • Domestic LLM Integration: Deeply integrates Chinese LLM providers like VolcEngine Ark and DeepSeek, alongside native OpenAI and Google AI support.
  • A-Share Market Focus: Provides complete data support and specific analysis tools tailored for the Chinese A-share, Hong Kong, and US stock markets.
  • Intelligent News Analysis: Features a multi-layered news filtering and quality assessment system to provide accurate market sentiment.
  • Enterprise-Grade Deployment: Offers full Docker containerization with cross-platform support and a comprehensive web-based configuration management interface.

Where teams use it

Strategy Research

Quantitative researchers backtest and validate trading strategies across A-share markets using multi-agent simulations.

Market Education

Students and AI enthusiasts learn how to build and deploy financial analysis agents in a localized, compliant environment.

Fundamental Analysis

Analysts generate comprehensive, multi-format reports on specific stocks by aggregating data through specialized AI agents.

News Sentiment Tracking

Users monitor real-time financial news, utilizing the intelligent filtering system to assess market trends accurately.

Getting started: curl -fsSL https://raw.githubusercontent.com/hsliuping/TradingAgents-CN/v1.1.0/install.sh | bash

README

main branch

TradingAgents-CN 社区版(Community Edition)

English: TradingAgents-CN Community Edition is a hybrid-licensed (Apache-2.0 core engine + proprietary source-available application layer) multi-agent stock research assistant for the Chinese A-share market. It orchestrates LLM-based analyst agents for debate-style research, natural-language stock screening, paper trading and study courses. For learning and research only — not investment advice.

License Python Vue

基于多智能体协作的 A 股研究辅助系统。由多个扮演不同角色(大盘/板块/市场/基本面/新闻分析师,乐观/审慎研究员等)的 AI 智能体协作完成研究流程,帮助你系统化学习多智能体框架与 AI 大模型在股票研究中的应用。

本项目是研究辅助工具,所有 AI 生成内容仅供学习参考,不构成投资建议。

白金赞助商 · Modelflare

Modelflare:满血稳定不掺水,低成本享受全球 SOTA 模型

感谢 Modelflare 赞助本项目!Modelflare:满血稳定不掺水,低成本享受全球 SOTA 模型。站点由美国 LLC 主体 Havenbyte LLC 运营,支持 GPT、Claude、Gemini、Grok 等主流模型和常用兼容协议,还支持 40 多种图片和视频模型,支持大陆正规商务合作。

缓存补偿是一大亮点:部分 OpenAI 价格优先、稳定和高级分组提供每日 65%、75%、85% 的缓存命中率保障,符合条件的请求没达到目标的,平台补偿差额,结算后可在用量看板查看。

特惠活动:单笔充值 US$20 即可解锁 0.015 倍价格倍率的 GPT 特惠分组,单笔充值 US$50 即可解锁 0.03 倍价格倍率的 Claude 特惠分组。通过 专属链接注册即可参与。

致敬源项目

感谢 Tauric Research 团队创造的革命性多智能体交易框架 TradingAgents!

我们的定位与使命:专注学习与研究,提供中文化学习中心与工具,合规友好,支持 A 股的分析与教学,推动 AI 金融技术在中文社区的普及与正确使用。

V3.0 发布主线 —— 从分析工具走向 AI 助手

当前版本:TradingAgents-CN v3.0.1,聚焦统一 AI 助手入口、自然语言选股、Agent 自主规划分析与 Skill 能力扩展。

四个核心能力

  • 统一 AI 助手入口:将分析、报告、股票关注列表、模拟交易等操作收拢到统一入口,减少页面切换成本
  • 自然语言选股:直接用自然语言描述选股需求,输出结构化候选结果并无缝进入后续分析
  • Agent 自主规划分析:根据问题自动识别分析路径,组合工具与能力完成复杂任务
  • Skill 能力扩展:围绕自然语言需求自动生成、测试、验证并注册新能力,持续扩展系统边界

核心特性

全新技术架构
  • 后端升级:从 Streamlit 迁移到 FastAPI,提供更强大的 RESTful API
  • 前端重构:采用 Vue 3 + Element Plus,打造现代化的单页应用
  • 数据库优化:MongoDB + Redis 双数据库架构,性能大幅提升
核心功能
  • 用户权限管理:完整的用户认证、角色管理、操作日志系统
  • 配置管理中心:可视化的大模型配置、数据源管理、系统设置
  • 缓存管理系统:智能缓存策略,支持 MongoDB/Redis/文件多级缓存
  • 实时通知系统:SSE+WebSocket 双通道推送,实时跟踪分析进度和系统状态
  • 股票关注列表管理:个人股票关注列表收藏、分组管理和跟踪功能
  • 个股详情页:完整的个股信息展示和历史分析记录
  • 模拟交易计划:虚拟交易环境,验证投资策略效果
智能分析增强
  • 动态供应商管理:支持动态添加和配置 LLM 供应商
  • 模型能力管理:智能模型选择,根据任务自动匹配最佳模型
  • 多数据源同步:统一的数据源管理,支持 Tushare、AKShare、BaoStock
  • 报告导出功能:支持 Markdown 格式专业报告导出
重大 Bug 修复
  • 技术指标计算修复:彻底解决市场分析师技术指标计算不准确问题
  • 基本面数据修复:修复基本面分析师 PE、PB 等关键财务数据计算错误
  • 死循环问题修复:解决部分用户在分析过程中触发的无限循环问题
  • 数据一致性优化:确保所有分析师使用统一、准确的数据源

技术栈升级

组件 v0.1.x v3.0.1
后端框架 Streamlit FastAPI + Uvicorn
前端框架 Streamlit Vue 3 + Vite + Element Plus
数据库 可选 MongoDB MongoDB + Redis
API 架构 单体应用 RESTful API + WebSocket
部署方式 本地/源码 本地源码部署

推荐体验路径

  1. 从统一 AI 助手入口发起任务或问题
  2. 使用自然语言描述选股或分析需求
  3. 让 Agent 自动规划分析路径并生成结果
  4. 按需扩展 Skill,把高频需求沉淀为新能力

中文增强特色

相比原版新增:智能新闻分析、多层次新闻过滤、新闻质量评估、统一新闻工具、多 LLM 提供商集成、模型选择持久化、实时进度显示、智能会话管理、中文界面、A 股数据、国产 LLM、源码部署、专业报告导出、统一日志管理、Web 配置界面、成本优化。

核心功能

  • 单股研究:多智能体辩论式分析(5 级深度),多情景观点呈现
  • 通用研究:自然语言提问,研究任意市场主题
  • 股票筛选:自然语言 + 条件筛选,从 6000+ 只股票中发现标的
  • 选股助手:按研究需求描述匹配候选股票池
  • 智能助手:联网搜索 + 工具调用 + 事实记忆
  • AI 记忆:项目级记忆与事实沉淀
  • Skill 中心:创建和管理自定义数据获取技能
  • 学习中心:免费系统课程(发现阶段 5 课)+ 8 篇学习指南
  • 模拟交易:纸面交易与复盘

版本演进

版本 定位 核心变化
v0.1.x 开源起步期 中文本土化起步:国产 LLM 接入、A 股数据源、Web 界面与源码部署
v1.0 多智能体分析工具 单股研究 + 批量分析,多个分析师智能体协作完成 A 股研究流程
v2.0 分析融入研究闭环 统一分析引擎 + 可视化工作流,新增持仓分析、操作复盘与阶段性复盘
v2.1 研究辅助合规化 报告表达、提示词模板、界面文案全面对齐"研究辅助"定位;新模型接入与稳定性提升
v3.0 从分析工具到 AI 助手 统一 AI 助手入口、自然语言选股、Agent 自主规划分析、Skill 能力扩展;架构升级为 FastAPI + Vue 3 + MongoDB/Redis;首次发布免费开源社区版

社区版与 Pro 版的差异

能力 社区版 Pro 版
单股研究 / 通用研究 / 股票筛选 ✅ ✅
学习中心(免费课程) / 模拟交易 / Skill 中心 ✅ ✅
Agent 工作坊(创建、发布、管理自定义 Agent) — ✅
交易系统(策略创建 / 优化 / 模板调试) — ✅
定时分析 / 批量分析 — ✅
专业报告导出(Word / PDF 多格式) — ✅
高级课程(进阶 8 阶段) — ✅
许可 混合授权(核心引擎开源 + 应用层专有) 商业许可

Pro 版面向有更高阶研究工作流需求的用户,获取方式见项目主页或联系作者。

快速开始

一键安装(推荐)

一条命令完成全部部署,无需 Docker、无需手动装数据库。脚本自动完成:检查/安装 Python → 获取代码 → 下载 MongoDB 与 Redis 运行时 → 构建前端 → 创建虚拟环境并安装依赖 → 生成 .env(随机密钥 + 管理员密码)→ 启动服务。

系统支持

系统 说明
Windows 10 / 11(PowerShell 5.1+,无需管理员权限)
macOS 12+(Intel / Apple Silicon;无 Python 时需 Homebrew)
Linux(Debian 系) Ubuntu 20.04+ / Debian 11+
Linux(RHEL 系) Rocky Linux、AlmaLinux、CentOS Stream、RHEL / OL 8 - 9

CentOS 7 因系统 glibc 过旧(2.17 < 2.28,MongoDB 7 / Node 20 无法运行)不再支持,请升级系统或改用 Docker 部署。

Windows(PowerShell)

irm https://raw.githubusercontent.com/hsliuping/TradingAgents-CN/community/install.ps1 -OutFile install.ps1
powershell -ExecutionPolicy Bypass -File .\install.ps1

Linux / macOS(bash)

curl -fsSL https://raw.githubusercontent.com/hsliuping/TradingAgents-CN/community/install.sh | bash

安装结束时终端会打印访问地址、管理员账号与随机生成的初始密码(同时写入 .env 的 ADMIN_DEFAULT_PASSWORD,请妥善保存)。

常用参数(两种脚本命名一致)

参数 默认值 说明
--port / -Port 8000 Web 端口
--mongo-port / -MongoPort 27017 MongoDB 端口
--redis-port / -RedisPort 6379 Redis 端口
--admin-password / -AdminPassword 随机生成 指定管理员密码
--install-dir / -InstallDir ~/TradingAgentsCN 安装目录
--mirror / -Mirror - 下载镜像前缀(国内加速)
--no-start / -NoStart - 只安装不启动

示例:./install.sh --port 8080 --admin-password MyPass123!

日常启停:安装目录下执行 start.sh / stop.sh(Windows 为 start.ps1 / stop.ps1);日志在 logs/,数据库数据在 data/(备份即复制这两个目录)。

快速排障

  • 下载慢或失败:加 --mirror / -Mirror 换源重试
  • 忘记管理员密码:修改 .env 的 ADMIN_DEFAULT_PASSWORD 后重启
  • 启动未就绪:查看 logs/server.err.log 末尾 20 行
  • 端口被占用:换端口,或直接重跑安装脚本(已监听的端口会被复用)

完整说明(目录结构、手动启动、卸载等)见 一键安装使用手册。

已克隆本仓库的开发者,可在仓库根目录直接使用本地源码模式(跳过代码下载):

bash install.sh --source-path .                      # Linux / macOS
powershell -ExecutionPolicy Bypass -File .\install.ps1 -SourcePath .   # Windows

三个平台的安装流程均由 GitHub Actions(install-smoke 工作流)真实部署验证(含 Ubuntu / macOS / Windows 与 Rocky Linux 9 容器)。

手动安装(进阶)

环境要求
  • Python 3.11
  • Node.js 18+
  • MongoDB 7.0+(推荐 8.0)与 Redis 6+(推荐 7)—— 需自行安装,见下方「安装 MongoDB / Redis」
安装 MongoDB / Redis

本项目不自带数据库,请先自行安装并启动 MongoDB 与 Redis(版本要求见上)。任意一种安装方式都可以,只要账号密码与端口和下一步的 .env 保持一致。

系统 MongoDB Redis
Windows 官网安装包 https://www.mongodb.com/try/download/community (安装后作为服务自启) WSL 里运行 redis-server,或使用 Memurai 等兼容实现
macOS brew tap mongodb/brew && brew install mongodb-community && brew services start mongodb-community brew install redis && brew services start redis
Ubuntu / Debian 参考 https://www.mongodb.com/docs/manual/installation/ sudo apt install redis-server && sudo systemctl enable --now redis-server

也可以用 Docker 只跑这两个数据库(需要本机已装 Docker):

docker run -d --name ta-mongo -p 27017:27017 \
  -e MONGO_INITDB_ROOT_USERNAME=admin -e MONGO_INITDB_ROOT_PASSWORD=<你的密码> mongo:8.0
docker run -d --name ta-redis -p 6379:6379 \
  redis:7-alpine redis-server --requirepass <你的密码>

MongoDB 需开启认证(authSource=admin),并自行创建管理员账号;把用户名/密码、主机与端口写入下一步的 .env(本地默认 localhost:27017 / localhost:6379)。

启动步骤

# 1. 克隆
git clone <本仓库地址>
cd TradingAgents-CN

# 2. 后端环境(Python 3.11)
python -m venv env
env\Scripts\activate            # Windows
source env/bin/activate         # Linux / macOS
pip install -e .

# 3. 配置(必填 MongoDB / Redis / JWT_SECRET,详见 .env.example 注释)
copy .env.example .env          # Windows
cp .env.example .env            # Linux / macOS

# 4. 启动已安装好的 MongoDB / Redis(账号密码与 .env 保持一致)

# 5. 启动后端(默认 8000 端口,与前端默认代理一致)
uvicorn app.main:app

# 6. 启动前端
cd frontend
npm install
npm run dev                     # 默认 http://localhost:3000

首次登录

后端首次启动时会自动完成初始化(无需手动执行任何导入脚本):

  1. 导入系统级配置(模型目录、提示词模板、Agent 配置、工作流等)
  2. 用户表为空时,用 .env 中的 ADMIN_DEFAULT_PASSWORD 创建管理员账号 admin
账号 密码
admin .env 中的 ADMIN_DEFAULT_PASSWORD

登录后请先在系统设置中配置大模型 API Key(OpenAI / DeepSeek / 通义千问等),并按需配置行情数据 Token。

文档

数据来源

行情与财务数据来自 Tushare / AKShare / BaoStock 等公开接口,需自行注册获取 token。

参与共建(招募中)

我们正在寻找志同道合的开源人才,一起把 TradingAgents-CN 做得更好。

怎么加入:直接提交 Pull Request。不看简历、不面试——PR 是唯一的考察方式,我们根据 PR 质量判断是否合适:

  1. 解决真问题:修复实际存在的 Bug 或补齐真实缺口,而非为改而改
  2. 说明修改原因:讲清楚"为什么改",而不只是"改了什么"
  3. 响应 review 意见:积极回应评审意见并跟进修改

持续贡献高质量 PR 的伙伴将参与版本规划与关键模块开发。

当前欢迎的方向:

  • 数据源适配:行情/财务公开接口的接入与维护
  • 前端开发:Vue 3 + TypeScript 功能开发与体验优化
  • Agent 编排与提示词工程:分析链路优化
  • 文档与课程:用户手册、学习课程建设

你能得到:公开署名与流量(版本发布/公众号点名致谢)、多智能体系统的工程实战经验、项目商业化优先权。项目目前收入尚不足以覆盖基础成本,暂为志愿参与;收入覆盖成本后的分配原则(社区贡献基金 / 顾问费 / 分成路径)已提前写明。

怎么联系:

提交流程、分配框架与贡献者协议(CLA)详见 CONTRIBUTING.md。

免责声明

  • 本系统仅支持 A 股市场研究,输出为 AI 生成的研究参考,不构成投资建议
  • 不提供目标价、止损止盈、买卖时机等交易指令
  • 投资有风险,决策需独立判断

License

本项目采用混合授权,详见 LICENSE:

  • Apache-2.0 开源组件:tradingagents/(交易智能体库)、cli/、docs/、tests/ 等——可自由使用、修改、分发
  • 专有组件(Source Available):app/(后端应用)、frontend/(前端应用)、core/(核心功能层)——源码可见,允许个人使用、评估与教育用途,禁止再分发与商业使用(商业许可请联系作者)

提交贡献即表示同意签署贡献者许可协议(CLA)。

致谢

完整致谢(含授权说明与数据源致谢)见 ACKNOWLEDGMENTS.md。


如果这个项目对您有帮助,请给我们一个 Star!

⭐ Star this repo | 🍴 Fork this repo | 📖 Read the docs

View on GitHub

Recent activity

commits and pull requests

Releases and announcements

1 total
  1. TradingAgents-CN Pro v3.0.1 Windows 安装包v3.0.1-proNov 27, 202612 downloads

    # TradingAgents-CN Pro v3.0.1 Windows 安装包 Pro 版 Windows 安装程序(含安装向导)。需要激活码方可使用,购买与激活请通过 QQ 群联系作者(QQ:107213551)。 ## 下载 - 直链下载:点击下方 `TradingAgentsCNSetup-3.0.1.exe` 资产 - 国内直连较慢时,可在链接前加加速前缀:`https://ghfast.top/` + 本页下载链接 - 备用渠道(百度网盘):[TradingAgentsCNSetup-3.0.1.exe](https://pan.baidu.com/s/1N5ucju5iz02DwP1bphGGMg),提取码 `nh39` - 注意:Assets 中的 **Source code (zip / tar.gz)** 为社区版开源代码(GitHub 对 tag 自动生成),与 Pro 安装包无关——Pro 用户只需下载 `.exe` 安装包 ## 校验 下载后建议核对 SHA256: ``` a3ce8f81d1a3cf3120994eebd5f8afd441fc6554104ee9e6bd089a7cad807fb0 ``` 校验方法(PowerShell): ```powershell Get-FileHash .\TradingAgentsCNSetup-3.0.1.exe -Algorithm SHA256 ``` ## 系统要求 - Windows 10 / 11(64 位) - 首次运行会自动初始化内置 MongoDB / Redis 与前端资源 ## 本版主要更新(v3.0.1) - 安全加固 6 项(RCE / SSRF / 未授权访问 / 路径穿越 / SHA256 校验) - LLM:填 Key 即用向导、Modelflare 渠道、模型目录更新至 2026-11、reasoning_effort 档位 - 分析引擎:风险自我辩论、辩论并行化、指标库升级、AKShare 限流回退 - 智能助手与 Skill 中心、界面优化、通知 SSE 实时推送、稳定性修复 完整说明见项目 Release Notes 与技术博客。

Code frequency

additions and deletions
+727.7K-727.7KWeek of 2025-11-30: +32,468 linesWeek of 2025-11-30: -456 linesWeek of 2025-12-07: +113,996 linesWeek of 2025-12-07: -40,562 linesWeek of 2025-12-14: +78,468 linesWeek of 2025-12-14: -4,696 linesWeek of 2025-12-21: +61,418 linesWeek of 2025-12-21: -2,172 linesWeek of 2025-12-28: +45,694 linesWeek of 2025-12-28: -1,880 linesWeek of 2026-01-04: +266,200 linesWeek of 2026-01-04: -93,732 linesWeek of 2026-01-11: +403,512 linesWeek of 2026-01-11: -330,316 linesWeek of 2026-01-18: +131,264 linesWeek of 2026-01-18: -82,802 linesWeek of 2026-01-25: +185,553 linesWeek of 2026-01-25: -89,658 linesWeek of 2026-02-01: +243,150 linesWeek of 2026-02-01: -200,448 linesWeek of 2026-02-08: +87,977 linesWeek of 2026-02-08: -99,802 linesWeek of 2026-02-15: +29,456 linesWeek of 2026-02-15: -1,116 linesWeek of 2026-02-22: +54,452 linesWeek of 2026-02-22: -4,568 linesWeek of 2026-03-01: +41,642 linesWeek of 2026-03-01: -1,600 linesWeek of 2026-03-08: +47,234 linesWeek of 2026-03-08: -6,490 linesWeek of 2026-03-15: +214,166 linesWeek of 2026-03-15: -57,311 linesWeek of 2026-03-22: +58,771 linesWeek of 2026-03-22: -3,747 linesWeek of 2026-03-29: +33,259 linesWeek of 2026-03-29: -2,353 linesWeek of 2026-04-05: +44,031 linesWeek of 2026-04-05: -6,102 linesWeek of 2026-04-12: +11,094 linesWeek of 2026-04-12: -1,529 linesWeek of 2026-04-19: +1,791 linesWeek of 2026-04-19: -224 linesWeek of 2026-04-26: +303,553 linesWeek of 2026-04-26: -163,380 linesWeek of 2026-05-03: +25,549 linesWeek of 2026-05-03: -24,387 linesWeek of 2026-05-10: +9,502 linesWeek of 2026-05-10: -3,271 linesWeek of 2026-05-17: +303,932 linesWeek of 2026-05-17: -213,293 linesWeek of 2026-05-24: +0 linesWeek of 2026-05-24: -0 linesWeek of 2026-05-31: +6,045 linesWeek of 2026-05-31: -387 linesWeek of 2026-06-07: +0 linesWeek of 2026-06-07: -0 linesWeek of 2026-06-14: +0 linesWeek of 2026-06-14: -0 linesWeek of 2026-06-21: +49,957 linesWeek of 2026-06-21: -10,787 linesWeek of 2026-06-28: +53,971 linesWeek of 2026-06-28: -18,099 linesWeek of 2026-07-05: +710,592 linesWeek of 2026-07-05: -546,153 linesWeek of 2026-07-12: +348,681 linesWeek of 2026-07-12: -31,094 linesWeek of 2026-07-19: +32,335 linesWeek of 2026-07-19: -3,443 linesWeek of 2026-07-26: +273,016 linesWeek of 2026-07-26: -31,089 linesWeek of 2026-08-02: +8,033 linesWeek of 2026-08-02: -25,473 linesWeek of 2026-08-09: +1,204 linesWeek of 2026-08-09: -786 linesWeek of 2026-08-16: +38,949 linesWeek of 2026-08-16: -8,706 linesWeek of 2026-08-23: +1,559 linesWeek of 2026-08-23: -663 linesWeek of 2026-08-30: +81 linesWeek of 2026-08-30: -577 linesWeek of 2026-09-06: +55,637 linesWeek of 2026-09-06: -55,473 linesWeek of 2026-09-13: +13,497 linesWeek of 2026-09-13: -708,541 linesWeek of 2026-09-20: +1,659 linesWeek of 2026-09-20: -727,683 linesWeek of 2026-09-27: +0 linesWeek of 2026-09-27: -0 linesWeek of 2026-10-04: +0 linesWeek of 2026-10-04: -0 linesWeek of 2026-10-11: +0 linesWeek of 2026-10-11: -0 linesWeek of 2026-10-18: +0 linesWeek of 2026-10-18: -0 linesWeek of 2026-10-25: +0 linesWeek of 2026-10-25: -0 linesWeek of 2026-11-01: +0 linesWeek of 2026-11-01: -0 linesWeek of 2026-11-08: +34,001 linesWeek of 2026-11-08: -11,020 linesWeek of 2026-11-15: +0 linesWeek of 2026-11-15: -0 linesWeek of 2026-11-22: +16,479 linesWeek of 2026-11-22: -34,627 linesNov 30, 2025Nov 22, 2026
+4.5M lines added, -3.7M removed over the last year.

Commits per week

last 52 weeks
2380Week of 2025-11-30: 16 commitsWeek of 2025-12-07: 56 commitsWeek of 2025-12-14: 48 commitsWeek of 2025-12-21: 72 commitsWeek of 2025-12-28: 66 commitsWeek of 2026-01-04: 120 commitsWeek of 2026-01-11: 146 commitsWeek of 2026-01-18: 238 commitsWeek of 2026-01-25: 164 commitsWeek of 2026-02-01: 50 commitsWeek of 2026-02-08: 94 commitsWeek of 2026-02-15: 32 commitsWeek of 2026-02-22: 94 commitsWeek of 2026-03-01: 38 commitsWeek of 2026-03-08: 91 commitsWeek of 2026-03-15: 42 commitsWeek of 2026-03-22: 77 commitsWeek of 2026-03-29: 5 commitsWeek of 2026-04-05: 25 commitsWeek of 2026-04-12: 25 commitsWeek of 2026-04-19: 3 commitsWeek of 2026-04-26: 34 commitsWeek of 2026-05-03: 65 commitsWeek of 2026-05-10: 22 commitsWeek of 2026-05-17: 7 commitsWeek of 2026-05-24: 0 commitsWeek of 2026-05-31: 4 commitsWeek of 2026-06-07: 0 commitsWeek of 2026-06-14: 0 commitsWeek of 2026-06-21: 34 commitsWeek of 2026-06-28: 35 commitsWeek of 2026-07-05: 54 commitsWeek of 2026-07-12: 71 commitsWeek of 2026-07-19: 76 commitsWeek of 2026-07-26: 71 commitsWeek of 2026-08-02: 31 commitsWeek of 2026-08-09: 14 commitsWeek of 2026-08-16: 66 commitsWeek of 2026-08-23: 8 commitsWeek of 2026-08-30: 2 commitsWeek of 2026-09-06: 38 commitsWeek of 2026-09-13: 32 commitsWeek of 2026-09-20: 23 commitsWeek of 2026-09-27: 0 commitsWeek of 2026-10-04: 0 commitsWeek of 2026-10-11: 0 commitsWeek of 2026-10-18: 0 commitsWeek of 2026-10-25: 0 commitsWeek of 2026-11-01: 0 commitsWeek of 2026-11-08: 2 commitsWeek of 2026-11-15: 0 commitsWeek of 2026-11-22: 6 commitsNov 30, 2025Nov 22, 2026
2.2K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 32 commitsSun 1:00 — 16 commitsSun 2:00 — 0 commitsSun 3:00 — 4 commitsSun 4:00 — 3 commitsSun 5:00 — 2 commitsSun 6:00 — 2 commitsSun 7:00 — 16 commitsSun 8:00 — 35 commitsSun 9:00 — 62 commitsSun 10:00 — 58 commitsSun 11:00 — 42 commitsSun 12:00 — 30 commitsSun 13:00 — 42 commitsSun 14:00 — 23 commitsSun 15:00 — 34 commitsSun 16:00 — 72 commitsSun 17:00 — 45 commitsSun 18:00 — 86 commitsSun 19:00 — 60 commitsSun 20:00 — 55 commitsSun 21:00 — 48 commitsSun 22:00 — 48 commitsSun 23:00 — 36 commitsMon 0:00 — 11 commitsMon 1:00 — 0 commitsMon 2:00 — 0 commitsMon 3:00 — 0 commitsMon 4:00 — 1 commitsMon 5:00 — 15 commitsMon 6:00 — 13 commitsMon 7:00 — 13 commitsMon 8:00 — 20 commitsMon 9:00 — 24 commitsMon 10:00 — 38 commitsMon 11:00 — 47 commitsMon 12:00 — 18 commitsMon 13:00 — 20 commitsMon 14:00 — 38 commitsMon 15:00 — 29 commitsMon 16:00 — 49 commitsMon 17:00 — 18 commitsMon 18:00 — 21 commitsMon 19:00 — 15 commitsMon 20:00 — 13 commitsMon 21:00 — 27 commitsMon 22:00 — 32 commitsMon 23:00 — 22 commitsTue 0:00 — 23 commitsTue 1:00 — 4 commitsTue 2:00 — 2 commitsTue 3:00 — 3 commitsTue 4:00 — 5 commitsTue 5:00 — 11 commitsTue 6:00 — 8 commitsTue 7:00 — 32 commitsTue 8:00 — 20 commitsTue 9:00 — 46 commitsTue 10:00 — 19 commitsTue 11:00 — 26 commitsTue 12:00 — 19 commitsTue 13:00 — 30 commitsTue 14:00 — 17 commitsTue 15:00 — 28 commitsTue 16:00 — 24 commitsTue 17:00 — 19 commitsTue 18:00 — 45 commitsTue 19:00 — 44 commitsTue 20:00 — 43 commitsTue 21:00 — 36 commitsTue 22:00 — 29 commitsTue 23:00 — 14 commitsWed 0:00 — 20 commitsWed 1:00 — 2 commitsWed 2:00 — 2 commitsWed 3:00 — 4 commitsWed 4:00 — 2 commitsWed 5:00 — 4 commitsWed 6:00 — 26 commitsWed 7:00 — 25 commitsWed 8:00 — 25 commitsWed 9:00 — 35 commitsWed 10:00 — 33 commitsWed 11:00 — 43 commitsWed 12:00 — 22 commitsWed 13:00 — 24 commitsWed 14:00 — 48 commitsWed 15:00 — 29 commitsWed 16:00 — 39 commitsWed 17:00 — 22 commitsWed 18:00 — 47 commitsWed 19:00 — 39 commitsWed 20:00 — 53 commitsWed 21:00 — 60 commitsWed 22:00 — 46 commitsWed 23:00 — 16 commitsThu 0:00 — 13 commitsThu 1:00 — 26 commitsThu 2:00 — 0 commitsThu 3:00 — 5 commitsThu 4:00 — 8 commitsThu 5:00 — 11 commitsThu 6:00 — 18 commitsThu 7:00 — 24 commitsThu 8:00 — 37 commitsThu 9:00 — 30 commitsThu 10:00 — 47 commitsThu 11:00 — 45 commitsThu 12:00 — 18 commitsThu 13:00 — 18 commitsThu 14:00 — 11 commitsThu 15:00 — 34 commitsThu 16:00 — 52 commitsThu 17:00 — 72 commitsThu 18:00 — 37 commitsThu 19:00 — 44 commitsThu 20:00 — 36 commitsThu 21:00 — 76 commitsThu 22:00 — 63 commitsThu 23:00 — 35 commitsFri 0:00 — 22 commitsFri 1:00 — 18 commitsFri 2:00 — 8 commitsFri 3:00 — 4 commitsFri 4:00 — 2 commitsFri 5:00 — 2 commitsFri 6:00 — 3 commitsFri 7:00 — 24 commitsFri 8:00 — 51 commitsFri 9:00 — 44 commitsFri 10:00 — 57 commitsFri 11:00 — 61 commitsFri 12:00 — 12 commitsFri 13:00 — 70 commitsFri 14:00 — 39 commitsFri 15:00 — 16 commitsFri 16:00 — 24 commitsFri 17:00 — 25 commitsFri 18:00 — 6 commitsFri 19:00 — 35 commitsFri 20:00 — 47 commitsFri 21:00 — 24 commitsFri 22:00 — 24 commitsFri 23:00 — 21 commitsSat 0:00 — 6 commitsSat 1:00 — 14 commitsSat 2:00 — 2 commitsSat 3:00 — 1 commitsSat 4:00 — 2 commitsSat 5:00 — 2 commitsSat 6:00 — 12 commitsSat 7:00 — 36 commitsSat 8:00 — 59 commitsSat 9:00 — 34 commitsSat 10:00 — 46 commitsSat 11:00 — 47 commitsSat 12:00 — 48 commitsSat 13:00 — 42 commitsSat 14:00 — 8 commitsSat 15:00 — 28 commitsSat 16:00 — 38 commitsSat 17:00 — 34 commitsSat 18:00 — 39 commitsSat 19:00 — 14 commitsSat 20:00 — 28 commitsSat 21:00 — 37 commitsSat 22:00 — 31 commitsSat 23:00 — 46 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.

Who is committing

last 52 weeks
Maintainer commits2,173 (98%)
Community commits43 (2%)

2,216 commits in total over the last year.

DateListRankStars gained
Feb 10, 2026daily#24+127