运行时依赖
版本
v2.4.2 2026-03-26 同步hronized 技能.md 输出 Example with re搜索-管理器.md 输出 格式化 (full Part I-V structure)
安装命令
点击复制技能文档
Trading代理s - Stock Trading 签名al Analysis 助手
Multi-代理 collaborative stock trading 签名al analysis 框架 with two-round debate mechanism, inspired by the open-source Trading代理s project.
环境 Requirements Required 环境 Variables Variable Required Description TU分享_令牌 ✅ Tu分享 Pro API 令牌, 获取 at: https://tu分享.pro/register BRAVE_API_KEY ⚪ Brave 搜索 API Key (optional, for news 搜索 enhancement) Python Dependencies
安装 required packages before using this 技能:
pip 安装 tu分享>=1.3.0 pandas>=1.5.0 numpy>=1.21.0
安全 Configuration
Security 警告: Do NOT paste your API 令牌s in chat messages.
设置 环境 Variables
Before 运行ning this 技能, ensure the following 环境 variables are 设置:
导出 TU分享_令牌=your_令牌_here 导出 BRAVE_API_KEY=your_brave_key_here # optional
Avoid:
Do NOT 添加 令牌s to ~/.bashrc, ~/.zshrc, or other shell config files Do NOT include 令牌s in 报告s or Sub代理 communications Do NOT paste 令牌s in chat messages Side Effects
This 技能 will:
Write 报告s to ~/.OpenClaw/workspace/memory/报告s/trading-代理s-*.md Connect to Tu分享 Pro API (API.tu分享.pro) Use 网页_搜索 for news and sentiment data
No data is transmitted externally beyond these API calls.
Security Rules 凭证 保护ion Only read TU分享_令牌 and BRAVE_API_KEY from 环境 variables Never read other configuration files (e.g., OpenClaw.json, .bashrc, etc.) Never include API keys or 令牌s in: Sub代理 inter-communications 生成d 报告s Any 输出 files 报告 Content Rules
All 生成d 报告s and Sub代理 communications MUST NOT contAIn:
API keys (TU分享_令牌, BRAVE_API_KEY) Passwords or secrets Any 凭证 values
If a Sub代理 接收s or 生成s content contAIning sensitive 凭证s, it must redact them before passing to other 代理s or writing to files.
工作流 (4-Layer Architecture) 输入: Stock Ticker (e.g., 300750.SZ) ↓ ┌─────────────────────────────────────────────────────┐ │ Layer 1: In格式化ion Gathering (Parallel) │ │ ├─ Sub代理 1: Fundamental Analyst │ │ ├─ Sub代理 2: Market Analyst │ │ ├─ Sub代理 3: News Analyst │ │ └─ Sub代理 4: Social Media Analyst │ └─────────────────────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────┐ │ Layer 2: Opinion 格式化ion (Parallel) │ │ ├─ Sub代理 5: Bull Re搜索er (Initial 报告) │ │ └─ Sub代理 6: Bear Re搜索er (Initial 报告) │ └─────────────────────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────┐ │ Layer 2.5: Two-Round Debate (Sequential) │ │ ├─ Round 1: │ │ │ ├─ Bear Re搜索er → Bull's Arguments │ │ │ └─ Bull Re搜索er → Bear's Arguments │ │ └─ Round 2: │ │ ├─ Bear Re搜索er → Bull's Rebuttals │ │ └─ Bull Re搜索er → Bear's Rebuttals │ └─────────────────────────────────────────────────────┘ ↓ ┌─────────────────────────────────────────────────────┐ │ Layer 3: Final Decision │ │ └─ Sub代理 7: Re搜索 管理器 │ │ (Synthesizes all 报告s + debate 历史) │ └─────────────────────────────────────────────────────┘ ↓ 输出: BUY/SELL/HOLD + Investment Plan (Markdown)
Step 7: 导出 to Markdown 报告
Re搜索 管理器 输出s the complete 报告 to a markdown file:
~/.OpenClaw/workspace/memory/报告s/trading-代理s-[stock_code]-[timestamp].md
The markdown file contAIns:
Part I: Final Investment Decision Part II: Layer 1 报告s (4 报告s) Part III: Layer 2 报告s (2 initial 报告s) Part IV: Debate 历史 (4 响应s) Part V: 应用endix Execution Steps Step 1: 解析 Stock Ticker
提取 stock ticker from user 输入, 格式化 to standard:
A-分享s: 600519.SH, 300750.SZ HK stocks: 00700.HK US stocks: AAPL Step 2: 执行 Layer 1 Sub代理s in Parallel
Use 会话s_spawn to launch in parallel 4 Sub代理s:
Sub代理 Task 输出 Fundamental Analyst Fundamental analysis Fundamental 报告 Market Analyst Market technical analysis Market analysis 报告 News Analyst News analysis News summary 报告 Social Media Analyst Social sentiment analysis Sentiment 报告 Step 3: Collect Layer 1 报告s
Use sub代理s(action=列出) to 检查 all Sub代理 completion 状态, then collect 报告 content.
Step 4: 执行 Layer 2 Sub代理s in Parallel (Initial 报告s)
Pass Layer 1 报告s to Layer 2, launch in parallel 2 Sub代理s:
Sub代理 Task 输入 输出 Bull Re搜索er Initial bull 报告 Layer 1 4 报告s Bull 报告 (initial) Bear Re搜索er Initial bear 报告 Layer 1 4 报告s Bear 报告 (initial) Step 5: Two-Round Debate
After Layer 2 completes, initiate two rounds of debate:
Round 1: Bear Re搜索er 接收s Bull's initial 报告 → Refutes