A股机器学习因子挖掘/自动化因子发现。当用户说"因子挖掘"、"ML因子"、"机器学习因子"、"自动因子发现"、"factor mining"、"遗传规划因子"时触发。基于 cn-stock-data 获取数据,使用ML方法自动挖掘有效因子。支持 formal/brief 两种输出风格。
Scanned 9/7/2026
Install to Claude Code
npx -y skills add aifinlab/FinClaw --skill a-share-ml-factor-mining --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of A Share Ml Factor Mining?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aifinlab-a-share-ml-factor-mining-finclaw)More formats (shields.io, HTML) on the badges page.
---
name: a-share-ml-factor-mining
description: A股机器学习因子挖掘/自动化因子发现。当用户说"因子挖掘"、"ML因子"、"机器学习因子"、"自动因子发现"、"factor mining"、"遗传规划因子"时触发。基于 cn-stock-data 获取数据,使用ML方法自动挖掘有效因子。支持 formal/brief 两种输出风格。
---
# 机器学习因子挖掘助手
## 数据获取
通过 cn-stock-data skill 获取数据:
- **K线数据**: 日线(至少3年历史)
- **财务数据**: 季度财务指标
- **行业分类**: 申万行业用于中性化
## 分析工作流
### Step 1: 因子空间构建
- 基础算子定义:加减乘除、排名、滞后、滚动统计
- 遗传规划(GP):随机组合算子生成候选因子表达式
- 公式复杂度控制:限制表达式树深度(≤5层)
- 去重:剔除高相关(>0.9)的冗余因子
### Step 2: 因子有效性检验
- IC/IR检验:因子值与下期收益的秩相关
- 分组回测:按因子值分5组,检验多空收益
- 换手率约束:因子换手率过高则实际不可交易
- 衰减分析:因子IC随持有期的衰减速度
### Step 3: 因子筛选与组合
- LASSO/ElasticNet:稀疏化选择有效因子
- 随机森林特征重要性排序
- 因子正交化:Gram-Schmidt去除因子间共线性
- 最终因子池:10-30个低相关有效因子
### Step 4: 过拟合防控
- 样本外检验:训练集/验证集/测试集严格分离
- 多重检验校正:Bonferroni/BH方法调整p值
- 因子经济学解释:纯数据挖掘因子需谨慎
- 滚动窗口验证:因子在不同时期的稳定性
### Step 5: 输出报告
## 输出格式
### formal 风格(研报级)
```
# 机器学习因子挖掘报告
## 一、因子空间
| 候选因子数 | 有效因子数 | 筛选率 |
|-----------|-----------|--------|
## 二、Top因子表现
[因子表达式、IC、IR、多空收益]
## 三、因子组合
[最终因子池、权重分配]
## 四、过拟合检验
[样本外表现、稳定性评估]
```
### brief 风格(快速分析)
```
## 因子挖掘速览
- 候选因子 5,000 个,筛选出 18 个有效因子
- Top因子 IC=0.05, IR=1.2
- 样本外多空年化 15.3%
- 过拟合风险:低(多重检验通过)
```
参考 `references/ml-factor-mining-guide.md` 获取详细方法论与 A股实证研究。
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!
Create Mermaid diagrams for flowcharts, sequences, ERDs, and
Understand the components, mechanics, and constraints of context in agent systems. Use when designing agent architectures, debugging context-related failures, or optimizing context usage.
Draft release notes and changelog entries from git history or merged PRs between two refs (tags/SHAs/branches), including breaking changes, migrations, and upgrade steps. Use when the user asks for release notes, changelog updates, or a GitHub Release draft.
Documentation style guide enforcer by @planetabhi. Applies and reviews the writing style guide when authoring or editing product documentation and tutorials. Use to check prose for voice, tense, word choice, inclusive language, formatting, code block, UI, Markdown, and number/date conventions.
Quick-reference card for all caveman modes, skills, and commands. One-shot display, not a persistent mode. Trigger: /caveman-help, "caveman help", "what caveman commands", "how do I use caveman".