搜索

PythonReactSEOPDF
OpenClaw

trading-agents

基于 AgentScope 的多智能体股票诊断系统。用于股票分析、生成投资报告,或构建多智能体协作的 AI 金融分析工作流。

ganyu210 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install ganyu21/trading-agents

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Trading Agents股票投资分析系统

基于 AgentScope 框架的多智能体协作股票诊断系统。

系统架构

智能体团队
  1. 分析师团队 (ReActAgent)

    • MarketAnalyst: 技术面分析
    • FundamentalsAnalyst: 基本面分析
    • NewsAnalyst: 舆情面分析
  2. 研究员团队 (AgentBase)

    • BullishResearcher: 看多研究员
    • BearishResearcher: 看空研究员
    • ResearchFacilitator: 研究主持人
  3. 交易与风控团队

    • Trader: 交易员
    • AggressiveRisk: 激进型风控
    • NeutralRisk: 中性型风控
    • ConservativeRisk: 保守型风控
    • RiskFacilitator: 风控协调人
  4. 基金经理

    • Manager: 最终决策
工作流程
阶段1: 数据采集(分析师团队)
  ↓
阶段2: 研究员辩论
  ↓
阶段3: 交易员决策
  ↓
阶段4: 风险管理讨论
  ↓
阶段5: 基金经理最终决策

快速开始

使用方法

方式一: 作为 OpenClaw 技能使用

将本目录复制到 OpenClaw 项目的 skills 目录:

cp -r trading-agents /path/to/openclaw/skills/

方式二: 作为 Python 包安装

# 安装整个技能包
pip install /path/to/trading-agents/

# 或进入 scripts 目录安装核心代码
pip install /path/to/trading-agents/scripts/
基本用法

OpenClaw 中使用:

# OpenClaw 会自动加载技能
from trading_agents import StockAdvisorSystem

# 或使用完整路径
from trading_agents.scripts import StockAdvisorSystem

独立使用:

from trading_agents import StockAdvisorSystem

# 创建系统实例
advisor = StockAdvisorSystem()

# 诊断股票
result = advisor.diagnose("600519.SH", base_report_dir="report")

# 保存完整报告
advisor.save_report(result)

print(f"报告目录: {result['report_dir']}")
print(f"最终决策: {result['final_decision']}")
使用特定模型
from trading_agents.config import config

# 切换模型
config.model_name = "qwen-max-2025-01-25"  # 或其他支持的模型

# 支持的模型:
# - kimi-k2.5
# - qwen-max-2025-01-25
# - qwen3.5-plus
# - glm-5
# - MiniMax/MiniMax-M2.5

配置说明

环境变量
# Tushare API Token
TUSHARE_TOKEN=your_token_here

# 阿里云百炼 API Key
ALIYUN_BAILIAN_API_KEY=yo...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/ganyu21/trading-agents
Version
—
Commit
eba1605a72afc96c623e4f84f8c37f6f12dd590d
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# Trading Agents股票投资分析系统

基于 AgentScope 框架的多智能体协作股票诊断系统。

## 系统架构

### 智能体团队

1. **分析师团队** (ReActAgent)
   - MarketAnalyst: 技术面分析
   - FundamentalsAnalyst: 基本面分析
   - NewsAnalyst: 舆情面分析

2. **研究员团队** (AgentBase)
   - BullishResearcher: 看多研究员
   - BearishResearcher: 看空研究员
   - ResearchFacilitator: 研究主持人

3. **交易与风控团队**
   - Trader: 交易员
   - AggressiveRisk: 激进型风控
   - NeutralRisk: 中性型风控
   - ConservativeRisk: 保守型风控
   - RiskFacilitator: 风控协调人

4. **基金经理**
   - Manager: 最终决策

### 工作流程

```
阶段1: 数据采集(分析师团队)
  ↓
阶段2: 研究员辩论
  ↓
阶段3: 交易员决策
  ↓
阶段4: 风险管理讨论
  ↓
阶段5: 基金经理最终决策
```

## 快速开始

### 使用方法

**方式一: 作为 OpenClaw 技能使用**

将本目录复制到 OpenClaw 项目的 skills 目录:
```bash
cp -r trading-agents /path/to/openclaw/skills/
```

**方式二: 作为 Python 包安装**

```bash
# 安装整个技能包
pip install /path/to/trading-agents/

# 或进入 scripts 目录安装核心代码
pip install /path/to/trading-agents/scripts/
```

### 基本用法

**OpenClaw 中使用:**
```python
# OpenClaw 会自动加载技能
from trading_agents import StockAdvisorSystem

# 或使用完整路径
from trading_agents.scripts import StockAdvisorSystem
```

**独立使用:**
```python
from trading_agents import StockAdvisorSystem

# 创建系统实例
advisor = StockAdvisorSystem()

# 诊断股票
result = advisor.diagnose("600519.SH", base_report_dir="report")

# 保存完整报告
advisor.save_report(result)

print(f"报告目录: {result['report_dir']}")
print(f"最终决策: {result['final_decision']}")
```

### 使用特定模型

```python
from trading_agents.config import config

# 切换模型
config.model_name = "qwen-max-2025-01-25"  # 或其他支持的模型

# 支持的模型:
# - kimi-k2.5
# - qwen-max-2025-01-25
# - qwen3.5-plus
# - glm-5
# - MiniMax/MiniMax-M2.5
```

## 配置说明

### 环境变量

```bash
# Tushare API Token
TUSHARE_TOKEN=your_token_here

# 阿里云百炼 API Key
ALIYUN_BAILIAN_API_KEY=yo...

相关技能

OpenClaw

dojo.md

edholofy

University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning req...

OpenClaw

wps-macos-helper

lethehades

macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance