Skip to content
Back to skills

A Share Reinforcement Trading

ASecurity

A股强化学习交易策略。当用户说"强化学习"、"reinforcement learning"、"RL交易"、"RL策略"、"DQN交易"、"PPO策略"、"智能体交易"时触发。基于 cn-stock-data 获取数据,设计RL交易环境与策略。支持 formal/brief 两种输出风格。

  • 232 stars
  • 0 votes
  • 0 copies
  • 7 views
  • Added September 7, 2026
documentationpythonbash

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add aifinlab/FinClaw --skill a-share-reinforcement-trading --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of A Share Reinforcement Trading?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for A Share Reinforcement Trading
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aifinlab-a-share-reinforcement-trading/badge)](https://www.skillsdirectory.com/skills/aifinlab-a-share-reinforcement-trading)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: a-share-reinforcement-trading
description: A股强化学习交易策略。当用户说"强化学习"、"reinforcement learning"、"RL交易"、"RL策略"、"DQN交易"、"PPO策略"、"智能体交易"时触发。基于 cn-stock-data 获取数据,设计RL交易环境与策略。支持 formal/brief 两种输出风格。
---

# 强化学习交易策略助手

## 数据获取

通过 cn-stock-data skill 获取数据:
- **K线数据**: 日线/分钟线序列
- **实时行情**: 环境状态更新
- **账户数据**: 持仓/资金/收益

## 分析工作流

### Step 1: 交易环境设计
- 状态空间:价格序列+技术指标+持仓状态
- 动作空间:买入/卖出/持有(离散)或仓位比例(连续)
- 奖励函数:收益率/Sharpe/风险调整收益
- A股约束:T+1、涨跌停、手续费建模

### Step 2: RL算法选择
- DQN:离散动作空间,适合简单买卖决策
- PPO/A2C:连续动作空间,适合仓位管理
- SAC:最大熵框架,探索与利用平衡好
- 多智能体RL:多股票组合的协同决策

### Step 3: 训练与调优
- 经验回放:打破时序相关性
- 课程学习:从简单市场环境逐步增加复杂度
- 奖励塑形:避免稀疏奖励导致训练困难
- 超参数:学习率/折扣因子/网络结构搜索

### Step 4: 策略评估与部署
- 样本外回测:未见过的市场数据测试
- 与基准策略对比:买入持有/均线策略
- 鲁棒性测试:不同市场状态下的表现
- 实盘模拟:Paper trading验证

### Step 5: 输出报告

## 输出格式

### formal 风格(研报级)
```
# RL交易策略报告

## 一、环境设计
| 组件 | 配置 |
|------|------|

## 二、训练结果
[学习曲线、收敛情况]

## 三、策略表现
[收益/Sharpe/回撤]

## 四、部署建议
[实盘注意事项]
```

### brief 风格(快速分析)
```
## RL策略速览
- PPO算法,状态维度64
- 训练收敛,样本外Sharpe 1.8
- 年化收益 18%,最大回撤 12%
- 优于买入持有基准 +8%
```

参考 `references/reinforcement-trading-guide.md` 获取详细方法论与 A股实证研究。

## 使用示例

### 示例 1: 基本使用

```python
# 调用 skill
result = run_skill({
    "param1": "value1",
    "param2": "value2"
})
```

### 示例 2: 命令行使用

```bash
python scripts/run_skill.py --input data.json
```

Files in this skill

  • SKILL.md2.3 KB
  • references/reinforcement-trading-guide.md407 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in documentation →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.