Skip to content
Back to skills

A Share Model Risk

ASecurity

A股模型风险/回测过拟合分析。当用户说"模型风险"、"model risk"、"过拟合"、"overfitting"、"回测失真"、"样本外失效"、"模型验证"时触发。基于 cn-stock-data 获取数据,评估量化模型的过拟合与模型风险。支持 formal/brief 两种输出风格。

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

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-model-risk --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of A Share Model Risk?

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

Security grade badge for A Share Model Risk
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aifinlab-a-share-model-risk/badge)](https://www.skillsdirectory.com/skills/aifinlab-a-share-model-risk)

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-model-risk
description: A股模型风险/回测过拟合分析。当用户说"模型风险"、"model risk"、"过拟合"、"overfitting"、"回测失真"、"样本外失效"、"模型验证"时触发。基于 cn-stock-data 获取数据,评估量化模型的过拟合与模型风险。支持 formal/brief 两种输出风格。
---

# 模型风险/回测过拟合分析助手

## 数据获取

通过 cn-stock-data skill 获取数据:
- **回测结果**: 策略回测的绩效数据
- **模型参数**: 模型配置与超参数
- **样本外数据**: 未参与训练的数据

## 分析工作流

### Step 1: 过拟合检测
- 训练集vs测试集表现差距:差距>30%疑似过拟合
- 参数敏感性:微调参数后表现大幅变化=过拟合
- 策略复杂度:参数越多过拟合风险越大
- 多重检验:测试了N个策略,需调整显著性水平

### Step 2: 回测陷阱识别
- 前视偏差(look-ahead bias):使用了未来信息
- 幸存者偏差(survivorship bias):只用存活股票
- 数据窥探(data snooping):反复优化直到好看
- 交易成本低估:未考虑滑点/冲击/流动性

### Step 3: 模型验证方法
- 样本外测试:严格的时间外推验证
- Combinatorial Purged CV:Lopez de Prado方法
- Walk-forward分析:滚动窗口前推验证
- 蒙特卡洛排列检验:随机打乱标签的基准

### Step 4: 模型风险管理
- 模型多样化:不依赖单一模型
- 定期重验证:每季度重新评估模型有效性
- 模型衰减监控:IC/Sharpe的滚动趋势
- 模型退役标准:连续N月表现低于阈值则停用

### Step 5: 输出报告

## 输出格式

### formal 风格(研报级)
```
# 模型风险评估报告

## 一、过拟合检测
| 指标 | 训练集 | 测试集 | 差距 |
|------|--------|--------|------|

## 二、回测陷阱
[各类偏差检查结果]

## 三、验证结果
[样本外/CV/排列检验]

## 四、风险管理建议
```

### brief 风格(快速分析)
```
## 模型风险速览
- 训练Sharpe 3.2 vs 测试 1.8,差距44%
- 过拟合风险:中等
- 未发现前视偏差
- 建议:简化模型,减少参数数量
```

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

Files in this skill

  • SKILL.md2.2 KB
  • references/model-risk-guide.md468 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.

Comments

Loading comments…