tradingagents-analysis
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseTradingAgents 多智能体 A 股投研分析
TradingAgents Multi-Agent A-Share Investment Research and Analysis
使用 TradingAgents API,让 15 名专业 AI 分析师对 A 股进行五阶段深度协作研判,输出结构化投资建议。
Use the TradingAgents API to let 15 specialized AI analysts conduct in-depth five-stage collaborative research and judgment on A-share stocks, and output structured investment recommendations.
🎯 快速上手
🎯 Quick Start
直接对我说:
- "帮我分析一下贵州茅台"
- "宁德时代值得买入吗"
- "分析一下 600519 的技术面"
- "比亚迪最近资金流向怎么样"
我会调用 15 个 AI 分析师,从市场、技术、基本面、情绪、资金五个维度深度分析,给你专业的投资建议。
Just tell me directly:
- "Help me analyze Kweichow Moutai"
- "Is CATL worth buying?"
- "Analyze the technical aspect of 600519"
- "How is BYD's recent capital flow?"
I will call 15 AI analysts to conduct in-depth analysis from five dimensions: market, technology, fundamentals, sentiment and capital, and provide you with professional investment advice.
🤖 系统架构:五阶段 15 智能体
🤖 System Architecture: 5 Stages · 15 Agents
| 阶段 | 智能体 | 职责 |
|---|---|---|
| 1. 分析团队 | 市场/新闻/情绪/基本面/宏观/聪明钱 | 多维度原始数据解读 |
| 2. 博弈裁判 | 博弈论管理者 | 主力与散户预期差分析 |
| 3. 多空辩论 | 多头/空头研究员 + 裁判 | 对立观点激烈博弈 |
| 4. 执行决策 | 交易员 | 综合研判生成操作建议 |
| 5. 风险管控 | 激进/中性/保守分析师 + 组合经理 | 多维度风控审核 |
| Stage | Agents | Responsibility |
|---|---|---|
| 1. Analyst Team | Market / News / Sentiment / Fundamentals / Macro / Smart Money | Multi-dimensional raw data interpretation |
| 2. Game Theory Referee | Game Theory Manager | Analysis of expectation gap between main force and retail investors |
| 3. Bull/Bear Debate | Bull/Bear Researchers + Referee | Intensive game of opposing views |
| 4. Execution Decision | Trader | Generate operation suggestions through comprehensive research and judgment |
| 5. Risk Management and Control | Aggressive/Neutral/Conservative Analysts + Portfolio Manager | Multi-dimensional risk control review |
TradingAgents Multi-Agent Investment Research
TradingAgents Multi-Agent Investment Research
Use the TradingAgents API to let 15 specialized AI analysts conduct deep, five-stage collaborative research on A-Share stocks, delivering structured trading recommendations.
Use the TradingAgents API to let 15 specialized AI analysts conduct deep, five-stage collaborative research on A-Share stocks, delivering structured trading recommendations.
🤖 System Architecture: 5 Stages · 15 Agents
🤖 System Architecture: 5 Stages · 15 Agents
| Stage | Agents | Role |
|---|---|---|
| 1. Analyst Team | Market / News / Sentiment / Fundamentals / Macro / Smart Money | Multi-dimensional raw data analysis |
| 2. Game Theory | Game Theory Manager | Main-force vs. retail expectation gap |
| 3. Bull/Bear Debate | Bull & Bear Researchers + Judge | Adversarial viewpoint debate |
| 4. Trade Execution | Trader | Synthesize research into actionable decision |
| 5. Risk Control | Aggressive / Neutral / Conservative + Portfolio Manager | Multi-layer risk review |
| Stage | Agents | Role |
|---|---|---|
| 1. Analyst Team | Market / News / Sentiment / Fundamentals / Macro / Smart Money | Multi-dimensional raw data analysis |
| 2. Game Theory | Game Theory Manager | Main-force vs. retail expectation gap |
| 3. Bull/Bear Debate | Bull & Bear Researchers + Judge | Adversarial viewpoint debate |
| 4. Trade Execution | Trader | Synthesize research into actionable decision |
| 5. Risk Control | Aggressive / Neutral / Conservative + Portfolio Manager | Multi-layer risk review |
📋 适用场景
📋 Applicable Scenarios
✅ 适合使用:
- 个股深度分析(技术面 + 基本面)
- 投资决策参考
- 盘后复盘分析
- 持仓标的风险评估
- 资金流向与市场情绪研判
❌ 不适合:
- 盘中实时盯盘(分析需要 1-5 分钟)
- 超短线交易(分钟级决策)
- 加密货币、美股等非 A 股市场
✅ Suitable for:
- In-depth individual stock analysis (technical + fundamental)
- Investment decision reference
- Post-market review analysis
- Risk assessment of held positions
- Capital flow and market sentiment research and judgment
❌ Not suitable for:
- Real-time intraday monitoring (analysis takes 1-5 minutes)
- Ultra-short-term trading (minute-level decision making)
- Non-A-share markets such as cryptocurrency and US stocks
🔒 隐私与安全
🔒 Privacy and Security
- 发送范围:本技能仅从对话中提取股票名称/代码、分析日期、分析视角等参数,将其作为 /
symbol/trade_date字段发送至后端 API。不发送对话原文、不读取本地文件、不上传任何其他隐私数据。horizons - 令牌安全:(格式
TRADINGAGENTS_TOKEN)是访问后端的唯一凭证,请使用最小权限令牌,如怀疑泄露请立即在 app.510168.xyz 吊销并重新生成。ta-sk-* - 敏感内容提示:请勿在分析请求中粘贴个人账户信息、真实持仓或其他敏感内容,本技能无法阻止用户主动提交这些内容。
- 自托管:如需完全掌控数据流向,可参考 GitHub 文档 自行部署后端,并将 指向自建服务器。
TRADINGAGENTS_API_URL
关于凭证元数据:本技能的 frontmatter 在中声明了metadata.openclaw为TRADINGAGENTS_TOKEN,并列入primaryEnv。requires.env
- Sending scope: This skill only extracts parameters such as stock name/code, analysis date, analysis perspective from the conversation, and sends them to the backend API as /
symbol/trade_datefields. Do not send the original conversation text, do not read local files, and do not upload any other private data.horizons - Token security: (format
TRADINGAGENTS_TOKEN) is the only credential to access the backend. Please use the minimum privilege token. If you suspect leakage, please immediately revoke and regenerate it at app.510168.xyz.ta-sk-* - Sensitive content prompt: Please do not paste personal account information, real positions or other sensitive content into the analysis request. This skill cannot prevent users from actively submitting these contents.
- Self-hosting: If you need full control over the data flow, you can refer to GitHub Documentation to deploy the backend by yourself, and point to your self-built server.
TRADINGAGENTS_API_URL
About credential metadata: The frontmatter of this skill declaresasTRADINGAGENTS_TOKENinprimaryEnvand lists it inmetadata.openclaw.requires.env
🔒 Privacy & Data Transmission
🔒 Privacy & Data Transmission
- What is sent: Only the extracted stock symbol, trade date, and analysis parameters (,
symbol,trade_date) are transmitted to the backend. The raw conversation text is never forwarded.horizons - Token: (pattern
TRADINGAGENTS_TOKEN) is the sole credential. Use a minimal-privilege token and rotate it immediately if compromised.ta-sk-* - Sensitive content: Do not paste personal account data, real positions, or other sensitive information into analysis requests.
- Self-hosting: For full data sovereignty, deploy the backend yourself and set to your server. See the GitHub repo.
TRADINGAGENTS_API_URL
Credential metadata: This skill's frontmatter declaresasTRADINGAGENTS_TOKENunderprimaryEnv.metadata.openclaw.requires.env
- What is sent: Only the extracted stock symbol, trade date, and analysis parameters (,
symbol,trade_date) are transmitted to the backend. The raw conversation text is never forwarded.horizons - Token: (pattern
TRADINGAGENTS_TOKEN) is the sole credential. Use a minimal-privilege token and rotate it immediately if compromised.ta-sk-* - Sensitive content: Do not paste personal account data, real positions, or other sensitive information into analysis requests.
- Self-hosting: For full data sovereignty, deploy the backend yourself and set to your server. See the GitHub repo.
TRADINGAGENTS_API_URL
Credential metadata: This skill's frontmatter declaresasTRADINGAGENTS_TOKENunderprimaryEnv.metadata.openclaw.requires.env
⚙️ 快速配置
⚙️ Quick Configuration
方式一:使用官方托管服务(零部署,开箱即用)
- 登录 https://app.510168.xyz
- 进入 Settings → API Tokens 创建令牌
- 配置环境变量:
bash
export TRADINGAGENTS_TOKEN="ta-sk-your_key_here"方式二:私有化部署(数据完全自主可控)
如对数据隐私有要求,可自行部署后端,所有分析数据仅在你自己的服务器上处理:
bash
undefinedMethod 1: Use official hosting service (zero deployment, out of the box)
- Log in to https://app.510168.xyz
- Go to Settings → API Tokens to create a token
- Configure environment variables:
bash
export TRADINGAGENTS_TOKEN="ta-sk-your_key_here"Method 2: Private deployment (data is completely independent and controllable)
If you have requirements for data privacy, you can deploy the backend by yourself, and all analysis data is only processed on your own server:
bash
undefined1. Deploy the backend, refer to https://github.com/KylinMountain/TradingAgents-AShare
2. 将 API 地址指向自建服务
2. Point the API address to the self-built service
export TRADINGAGENTS_API_URL="http://your-server:8000"
export TRADINGAGENTS_TOKEN="ta-sk-your_key_here"
undefinedexport TRADINGAGENTS_API_URL="http://your-server:8000"
export TRADINGAGENTS_TOKEN="ta-sk-your_key_here"
undefined🚀 常用操作
🚀 Common Operations
推荐方式:使用一体化脚本(自动提交 → 轮询 → 获取结果)
bash
undefinedRecommended method: Use integrated script (automatic submission → polling → get results)
bash
undefined脚本路径(相对于技能目录)
Script path (relative to skill directory)
bash scripts/analyze.sh <symbol[,symbol2,...]> [trade_date] [horizons]
bash scripts/analyze.sh <symbol[,symbol2,...]> [trade_date] [horizons]
单个分析
Single analysis
bash scripts/analyze.sh 贵州茅台
bash scripts/analyze.sh 600519.SH 2026-03-22
bash scripts/analyze.sh 600519.SH 2026-03-22 medium
bash scripts/analyze.sh 贵州茅台
bash scripts/analyze.sh 600519.SH 2026-03-22
bash scripts/analyze.sh 600519.SH 2026-03-22 medium
批量分析(逗号分隔,并行提交,统一等待)
Batch analysis (comma separated, parallel submission, unified waiting)
bash scripts/analyze.sh 贵州茅台,比亚迪,宁德时代
bash scripts/analyze.sh 600519.SH,002594.SZ,300750.SZ 2026-03-22
脚本会自动完成:提交任务 → 每 15 秒轮询状态 → 完成后输出 JSON 结果。
批量模式下所有任务并行提交,统一轮询,最后汇总输出。超时默认 600 秒。
可通过环境变量调整行为:
- `POLL_INTERVAL` — 轮询间隔秒数(默认 15)
- `POLL_TIMEOUT` — 最大等待秒数(默认 600)
**手动分步操作**(如需单独调用某一步)
所有请求使用 `$TRADINGAGENTS_TOKEN` 作为 Bearer 令牌。
1. 提交分析任务
```bash
curl -X POST "${TRADINGAGENTS_API_URL:-https://api.510168.xyz}/v1/analyze" \
-H "Authorization: Bearer $TRADINGAGENTS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"symbol": "贵州茅台"}'- 查询任务状态
bash
curl "${TRADINGAGENTS_API_URL:-https://api.510168.xyz}/v1/jobs/{job_id}" \
-H "Authorization: Bearer $TRADINGAGENTS_TOKEN"- 获取完整分析结果(任务完成后)
bash
curl "${TRADINGAGENTS_API_URL:-https://api.510168.xyz}/v1/jobs/{job_id}/result" \
-H "Authorization: Bearer $TRADINGAGENTS_TOKEN"bash scripts/analyze.sh 贵州茅台,比亚迪,宁德时代
bash scripts/analyze.sh 600519.SH,002594.SZ,300750.SZ 2026-03-22
The script will automatically complete: submit task → poll status every 15 seconds → output JSON results after completion. In batch mode, all tasks are submitted in parallel, polled uniformly, and finally aggregated and output. The default timeout is 600 seconds.
You can adjust the behavior through environment variables:
- `POLL_INTERVAL` — polling interval in seconds (default 15)
- `POLL_TIMEOUT` — maximum waiting seconds (default 600)
**Manual step-by-step operation** (if you need to call a step separately)
All requests use `$TRADINGAGENTS_TOKEN` as the Bearer token.
1. Submit analysis task
```bash
curl -X POST "${TRADINGAGENTS_API_URL:-https://api.510168.xyz}/v1/analyze" \
-H "Authorization: Bearer $TRADINGAGENTS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"symbol": "贵州茅台"}'- Query task status
bash
curl "${TRADINGAGENTS_API_URL:-https://api.510168.xyz}/v1/jobs/{job_id}" \
-H "Authorization: Bearer $TRADINGAGENTS_TOKEN"- Get complete analysis results (after the task is completed)
bash
curl "${TRADINGAGENTS_API_URL:-https://api.510168.xyz}/v1/jobs/{job_id}/result" \
-H "Authorization: Bearer $TRADINGAGENTS_TOKEN"📊 示例输出
📊 Sample Output
json
{
"decision": "BUY",
"direction": "看多",
"confidence": 78,
"target_price": 1850.0,
"stop_loss_price": 1680.0,
"risk_items": [
{"name": "估值偏高", "level": "medium", "description": "当前 PE 处于历史 75 分位"},
{"name": "外资流出", "level": "low", "description": "近 5 日北向资金小幅净流出"}
],
"key_metrics": [
{"name": "PE", "value": "32.5x", "status": "neutral"},
{"name": "ROE", "value": "31.2%", "status": "good"},
{"name": "毛利率", "value": "91.5%", "status": "good"}
],
"final_trade_decision": "综合技术面突破与基本面支撑,建议逢低分批建仓..."
}json
{
"decision": "BUY",
"direction": "看多",
"confidence": 78,
"target_price": 1850.0,
"stop_loss_price": 1680.0,
"risk_items": [
{"name": "估值偏高", "level": "medium", "description": "当前 PE 处于历史 75 分位"},
{"name": "外资流出", "level": "low", "description": "近 5 日北向资金小幅净流出"}
],
"key_metrics": [
{"name": "PE", "value": "32.5x", "status": "neutral"},
{"name": "ROE", "value": "31.2%", "status": "good"},
{"name": "毛利率", "value": "91.5%", "status": "good"}
],
"final_trade_decision": "综合技术面突破与基本面支撑,建议逢低分批建仓..."
}🔄 任务执行流程
🔄 Task Execution Process
深度分析通常耗时 1 至 5 分钟:
- 识别标的:从对话中仅提取股票名称或代码(及可选日期/视角),不发送对话原文
- 告知用户:反馈任务即将提交,预计耗时 1-5 分钟
- 执行脚本:使用 Bash 工具运行 (设置
bash scripts/analyze.sh <symbol> [date] [horizons]),脚本自动完成提交、轮询和结果获取run_in_background: true - 汇总结论:脚本输出完成后,解析 JSON 结果,向用户展示决策、方向、目标价、风险点
重要:不要手动编写 curl 轮询循环,直接使用脚本。scripts/analyze.sh
In-depth analysis usually takes 1 to 5 minutes:
- Identify the target: Only extract the stock name or code (and optional date/perspective) from the conversation, and do not send the original conversation text
- Notify the user: Feedback that the task is about to be submitted, and it is expected to take 1-5 minutes
- Execute the script: Use the Bash tool to run (set
bash scripts/analyze.sh <symbol> [date] [horizons]), and the script automatically completes submission, polling and result acquisitionrun_in_background: true - Summarize the conclusion: After the script output is completed, parse the JSON results, and show the user the decision, direction, target price, and risk points
Important: Do not manually write curl polling loops, directly use thescript.scripts/analyze.sh
📌 支持标的范围
📌 Supported Target Range
- 沪深 A 股:中文名称(如 "比亚迪"、"宁德时代")或代码(、
002594.SZ)601012.SH
- Shanghai and Shenzhen A-shares: Chinese name (such as "BYD", "CATL") or code (,
002594.SZ)601012.SH
💡 注意事项
💡 Notes
- 轮询频率:每次轮询间隔不低于 15 秒
- 数据健壮性:若部分数据源缺失,系统将基于宏观与行业逻辑进行外溢分析
- 短线模式:输入"分析 XX 短线"时,系统自动切换为 14 天技术面分析,跳过财报数据,速度更快
- Polling frequency: The interval between each polling is not less than 15 seconds
- Data robustness: If some data sources are missing, the system will conduct spillover analysis based on macro and industry logic
- Short-term mode: When entering "Analyze XX short-term", the system automatically switches to 14-day technical analysis, skips financial report data, and is faster