A股特征工程/因子合成。当用户说"特征工程"、"因子合成"、"feature engineering"、"特征构造"、"因子加工"、"特征变换"时触发。基于 cn-stock-data 获取数据,进行系统化特征工程与因子合成。支持 formal/brief 两种输出风格。
Scanned 9/7/2026
Install to Claude Code
npx -y skills add aifinlab/FinClaw --skill a-share-feature-engineering --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of A Share Feature Engineering?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aifinlab-a-share-feature-engineering)More formats (shields.io, HTML) on the badges page.
---
name: a-share-feature-engineering
description: A股特征工程/因子合成。当用户说"特征工程"、"因子合成"、"feature engineering"、"特征构造"、"因子加工"、"特征变换"时触发。基于 cn-stock-data 获取数据,进行系统化特征工程与因子合成。支持 formal/brief 两种输出风格。
---
# 特征工程/因子合成助手
## 数据获取
通过 cn-stock-data skill 获取数据:
- **K线数据**: 日线+分钟线
- **财务数据**: 季度财务报表
- **另类数据**: 舆情/资金流等
## 分析工作流
### Step 1: 基础特征构造
- 量价特征:收益率/波动率/换手率/振幅等
- 技术特征:均线/MACD/RSI/KDJ/布林带
- 基本面特征:估值/盈利/成长/质量指标
- 时序特征:滞后值/滚动统计/差分/变化率
### Step 2: 高阶特征合成
- 交叉特征:特征间的乘积/比值/差值
- 非线性变换:log/sqrt/rank/分位数映射
- 时序聚合:多周期(5/10/20/60日)滚动特征
- 行业相对特征:个股值 - 行业均值
### Step 3: 特征质量评估
- 覆盖率:缺失值比例,<20%为可接受
- IC检验:与下期收益的秩相关系数
- 稳定性:IC的时序标准差,ICIR>0.5为稳定
- 换手率:因子值变化导致的组合换手
### Step 4: 特征选择与降维
- 过滤法:IC/互信息/方差筛选
- 包装法:递归特征消除(RFE)
- 嵌入法:LASSO/树模型特征重要性
- 降维:PCA/因子分析提取主成分
### Step 5: 输出报告
## 输出格式
### formal 风格(研报级)
```
# 特征工程报告
## 一、特征池概览
| 类别 | 数量 | 有效率 |
|------|------|--------|
## 二、Top特征
[特征名、IC、ICIR、覆盖率]
## 三、特征组合
[最终特征集、相关性矩阵]
## 四、建议
[特征优化方向]
```
### brief 风格(快速分析)
```
## 特征工程速览
- 构造 200 个候选特征
- 有效特征 45 个 (IC>0.02)
- Top特征:20日动量IC=0.05
- 建议:加入行业中性化特征
```
参考 `references/feature-engineering-guide.md` 获取详细方法论与 A股实证研究。
## 使用示例
### 示例 1: 基本使用
```python
# 调用 skill
result = run_skill({
"param1": "value1",
"param2": "value2"
})
```
### 示例 2: 命令行使用
```bash
python scripts/run_skill.py --input data.json
```
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".