机器学习因子挖掘助手

SkillDev tools

A-share machine learning factor mining / automated factor discovery. Triggers when the user says "因子挖掘", "ML因子", "机器学习因子", "自动因子发现", "factor mining", or "遗传规划因子". Uses cn-stock-data to fetch data and ML methods to automatically mine effective factors. Supports two output styles: formal/brief.

Available today. Use it from your connected AI after setup.

Connect ahel once, and every AI you use reads what you have installed.

Then ask your AI: use the 机器学习因子挖掘助手 skill

What this skill tells your AI

The instructions your AI receives, as published by aifinlab/finclaw in skills/a-share-ml-factor-mining/SKILL.md and read by ahel’s review.

数据获取

通过 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股实证研究。

Signals

GitHub stars
241
Forks
38
Last commit
May 2026
Advanced
Catalog kind
skill
Gateway key
a-share-ml-factor-mining
Source
github.com/aifinlab/finclaw