Multi-agent collaborative stock trading signal analysis framework with two-round debate mechanism, inspired by the open-source TradingAgents project.
| Variable | Required | Description |
|---|---|---|
| ---------- | :--------: | ------------- |
| TUSHARE_TOKEN | ✅ | Tushare Pro API Token, get at: https://tushare.pro/register |
| BRAVE_API_KEY | ⚪ | Brave Search API Key (optional, for news search enhancement) |
Install required packages before using this skill:
pip install tushare>=1.3.0 pandas>=1.5.0 numpy>=1.21.0
> Security Warning: Do NOT paste your API tokens in chat messages.
Set Environment Variables
Before running this skill, ensure the following environment variables are set:
export TUSHARE_TOKEN=your_token_here
export BRAVE_API_KEY=your_brave_key_here # optional
Avoid:
~/.bashrc, ~/.zshrc, or other shell config filesThis skill will:
~/.openclaw/workspace/memory/reports/trading-agents-*.mdapi.tushare.pro)No data is transmitted externally beyond these API calls.
All generated reports and SubAgent communications MUST NOT contain:
If a SubAgent receives or generates content containing sensitive credentials, it must redact them before passing to other agents or writing to files.
Input: Stock Ticker (e.g., 300750.SZ)
↓
┌─────────────────────────────────────────────────────┐
│ Layer 1: Information Gathering (Parallel) │
│ ├─ SubAgent 1: Fundamental Analyst │
│ ├─ SubAgent 2: Market Analyst │
│ ├─ SubAgent 3: News Analyst │
│ └─ SubAgent 4: Social Media Analyst │
└─────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────┐
│ Layer 2: Opinion Formation (Parallel) │
│ ├─ SubAgent 5: Bull Researcher (Initial Report) │
│ └─ SubAgent 6: Bear Researcher (Initial Report) │
└─────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────┐
│ Layer 2.5: Two-Round Debate (Sequential) │
│ ├─ Round 1: │
│ │ ├─ Bear Researcher → Bull's Arguments │
│ │ └─ Bull Researcher → Bear's Arguments │
│ └─ Round 2: │
│ ├─ Bear Researcher → Bull's Rebuttals │
│ └─ Bull Researcher → Bear's Rebuttals │
└─────────────────────────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────┐
│ Layer 3: Final Decision │
│ └─ SubAgent 7: Research Manager │
│ (Synthesizes all reports + debate history) │
└─────────────────────────────────────────────────────┘
↓
Output: BUY/SELL/HOLD + Investment Plan (Markdown)
Research Manager outputs the complete report to a markdown file:
~/.openclaw/workspace/memory/reports/trading-agents-[stock_code]-[timestamp].md
The markdown file contains:
Extract stock ticker from user input, format to standard:
600519.SH, 300750.SZ00700.HKAAPLUse sessions_spawn to launch in parallel 4 SubAgents:
| SubAgent | Task | Output |
|---|---|---|
| ---------- | ------ | -------- |
| Fundamental Analyst | Fundamental analysis | Fundamental report |
| Market Analyst | Market technical analysis | Market analysis report |
| News Analyst | News analysis | News summary report |
| Social Media Analyst | Social sentiment analysis | Sentiment report |
Use subagents(action=list) to check all SubAgent completion status, then collect report content.
Pass Layer 1 reports to Layer 2, launch in parallel 2 SubAgents:
| SubAgent | Task | Input | Output |
|---|---|---|---|
| ---------- | ------ | ------- | -------- |
| Bull Researcher | Initial bull report | Layer 1 4 reports | Bull report (initial) |
| Bear Researcher | Initial bear report | Layer 1 4 reports | Bear report (initial) |
After Layer 2 completes, initiate two rounds of debate:
Debate Rules:
Launch Research Manager with ALL inputs:
Research Manager synthesizes all information and makes final investment recommendation.
Data Sources:
Analysis Dimensions:
Detailed Prompt: See references/fundamental-analyst.md
Data Sources:
Analysis Dimensions:
Detailed Prompt: See references/market-analyst.md
Data Sources:
Analysis Dimensions:
Detailed Prompt: See references/news-analyst.md
Data Sources:
Analysis Dimensions:
Detailed Prompt: See references/social-analyst.md
Role: Bull analyst advocating for investment
Tasks:
Debate Style:
Detailed Prompt: See references/bull-researcher.md
Role: Bear analyst advocating against investment
Tasks:
Debate Style:
Detailed Prompt: See references/bear-researcher.md
Role: Portfolio manager making final decision
Input (9 items total):
Responsibilities:
Important: Do not default to "HOLD" - must take a stance based on strongest arguments.
Detailed Prompt: See references/research-manager.md
Data Source: Tushare Propython3 scripts/get_fundamentals.py <stock_code>
python3 scripts/get_market_data.py <stock_code>
# TradingAgents Investment Decision Report: 宁德时代 (300750.SZ)
Report Generated: YYYY-MM-DD HH:MM
Framework Version: TradingAgents v2.0 with Debate Mechanism
---
# Part I: Final Investment Decision
## 一、决策摘要
### 投资建议
# 🟢 买入 / 🔴 卖出 / 🟡 持有
### 核心理由
[一句话概括核心理由,基于辩论结果]
### 信心指数
| 维度 | 信心度 | 说明 |
|------|:------:|------|
| 基本面 | x/5 | [说明] |
| 市场面 | x/5 | [说明] |
| 消息面 | x/5 | [说明] |
| 综合信心 | x/5 | - |
---
## 二、辩论精华回顾
### 2.1 初始观点对比
| 方面 | 看涨观点 | 看跌观点 |
|------|----------|----------|
| 核心论点 | [论点] | [论点] |
| 支撑数据 | [数据] | [数据] |
| 初始得分 | x/5 | x/5 |
### 2.2 第一轮辩论结果
#### 看跌方对看涨方的挑战
| 看涨论点 | 看跌方反驳 | 反驳有效性 | 幸存状态 |
|----------|------------|:----------:|:--------:|
| [论点1] | [反驳] | 高/中/低 | ✅/❌ |
| [论点2] | [反驳] | 高/中/低 | ✅/❌ |
#### 看涨方对看跌方的挑战
| 看跌论点 | 看涨方反驳 | 反驳有效性 | 幸存状态 |
|----------|------------|:----------:|:--------:|
| [论点1] | [反驳] | 高/中/低 | ✅/❌ |
| [论点2] | [反驳] | 高/中/低 | ✅/❌ |
### 2.3 第二轮辩论结果
| 议题 | 看涨最终立场 | 看跌最终立场 | 辩论胜出方 |
|------|--------------|--------------|:----------:|
| [议题1] | [立场] | [立场] | 🟢/🔴/🟡 |
| [议题2] | [立场] | [立场] | 🟢/🔴/🟡 |
### 2.4 辩论胜负关键
**看涨方胜出理由** (如适用):
1. [理由1]
2. [理由2]
**看跌方胜出理由** (如适用):
1. [理由1]
2. [理由2]
---
## 三、最终判断
### 3.1 为什么选择 [买入/卖出/持有]
[详细解释基于辩论结果做出此决策的原因]
### 3.2 经过辩论验证的核心论点
#### 买入/持有支撑论点 (经辩论验证)
| 优先级 | 论点 | 辩论验证结果 | 来源 |
|:------:|------|--------------|------|
| 1 | [论点] | 看跌方无法有效反驳 | [来源] |
| 2 | [论点] | 看跌方反驳力度不足 | [来源] |
#### 卖出/回避风险论点 (经辩论验证)
| 优先级 | 论点 | 辩论验证结果 | 来源 |
|:------:|------|--------------|------|
| 1 | [论点] | 看涨方无法有效反驳 | [来源] |
| 2 | [论点] | 风险确认 | [来源] |
### 3.3 辩论暴露的关键风险
| 风险 | 暴露程度 | 应对策略 |
|------|:--------:|----------|
| [风险1] | 高/中/低 | [策略] |
| [风险2] | 高/中/低 | [策略] |
---
## 四、投资计划
### a) 投资建议
**[买入/卖出/持有]**
| 配置建议 | 建议 |
|----------|------|
| 建议仓位 | 低配(10-20%) / 标配(20-40%) / 高配(40-60%) |
| 持有期限 | 短线(1-3月) / 中线(3-12月) / 长线(1年+) |
| 信心等级 | 低 / 中 / 高 |
### b) 理由
[详细解释这些论据为何能够得到该结论]
### c) 战略行动
| 步骤 | 具体操作 | 时间节点 |
|:----:|----------|----------|
| 1 | 分批建仓:建议分x批买入 | [时间] |
| 2 | 入场时机:[技术面建议] | [条件] |
| 3 | 止损设置:设定止损位在 xx | [条件] |
---
## 五、后续跟踪要点
### 需要关注的关键指标
| 指标 | 当前值 | 警戒值 | 触发行动 |
|------|--------|--------|----------|
| [指标1] | xx | xx | [行动] |
### 需要关注的关键事件
| 事件 | 预计时间 | 对论点的影响 | 行动预案 |
|------|---------|--------------|----------|
| [事件1] | [时间] | 影响[论点] | [预案] |
---
## 六、免责声明
本报告基于多智能体辩论分析框架生成,综合了看涨和看跌双方观点及其辩论过程。投资决策应基于个人风险承受能力和投资目标。本报告仅供参考,不构成投资建议。投资有风险,入市需谨慎。
---
# Part II: Layer 1 Reports (Information Gathering)
## 1. Fundamental Analysis Report
[Complete fundamental analyst report]
## 2. Market Analysis Report
[Complete market analyst report]
## 3. News Analysis Report
[Complete news analyst report]
## 4. Social Media Sentiment Report
[Complete social media analyst report]
---
# Part III: Layer 2 Reports (Opinion Formation)
## 5. Bull Researcher Initial Report
[Complete bull researcher initial report]
## 6. Bear Researcher Initial Report
[Complete bear researcher initial report]
---
# Part IV: Debate History (Layer 2.5)
## Round 1
### Bear's Rebuttal to Bull's Arguments
[Bear's round 1 response]
### Bull's Rebuttal to Bear's Arguments
[Bull's round 1 response]
## Round 2
### Bear's Counter-Rebuttal
[Bear's round 2 response]
### Bull's Counter-Rebuttal
[Bull's round 2 response]
---
# Part V: Appendix
## Data Sources
- Tushare Pro API
- Web Search (Brave Search)
- Social Media Platforms
## Methodology
This report was generated using the TradingAgents Multi-Agent Debate Framework:
1. **Layer 1**: 4 specialized analysts gather comprehensive information
2. **Layer 2**: Bull and Bear researchers form opposing viewpoints
3. **Layer 2.5**: Two rounds of structured debate
4. **Layer 3**: Portfolio manager synthesizes debate outcomes into final decision
## Disclaimer
本报告基于多智能体辩论分析框架生成,综合了看涨和看跌双方观点及其辩论过程。投资决策应基于个人风险承受能力和投资目标。本报告仅供参考,不构成投资建议。投资有风险,入市需谨慎。
---
🐂 TradingAgents Multi-Agent Debate Analysis Framework
| Version | Date | Changes |
|---|---|---|
| --------- | ------ | --------- |
| v2.4.2 | 2026-03-26 | Synchronized SKILL.md Output Example with research-manager.md Output Format (full Part I-V structure) |
| v2.4.0 | 2026-03-26 | Enhanced security: removed openclaw.json reference, added SubAgent security rules, unified install spec |
| v2.3.0 | 2026-03-26 | Removed PDF export, simplified dependencies, unified metadata |
| v2.2.0 | 2026-03-26 | Security hardening: Fixed metadata inconsistencies, improved credential handling |
| v2.0.0 | 2026-03-25 | Added two-round debate mechanism |
| v1.0.0 | 2026-03-20 | Initial release with 7 SubAgents |
.bashrc, .zshrc)~/.openclaw/workspace/memory/reports/共 1 个版本