Skip to content
Back to skills

A Share Ml Regime Cluster

ASecurity

A股ML市场状态聚类/无监督分类。当用户说"市场聚类"、"无监督分类"、"状态聚类"、"ML聚类"、"K-means市场"、"市场分类"、"聚类分析市场"时触发。基于 cn-stock-data 获取数据,使用无监督学习识别市场状态。支持 formal/brief 两种输出风格。

  • 232 stars
  • 0 votes
  • 0 copies
  • 3 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-ml-regime-cluster --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of A Share Ml Regime Cluster?

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

Security grade badge for A Share Ml Regime Cluster
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aifinlab-a-share-ml-regime-cluster/badge)](https://www.skillsdirectory.com/skills/aifinlab-a-share-ml-regime-cluster)

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-ml-regime-cluster
description: A股ML市场状态聚类/无监督分类。当用户说"市场聚类"、"无监督分类"、"状态聚类"、"ML聚类"、"K-means市场"、"市场分类"、"聚类分析市场"时触发。基于 cn-stock-data 获取数据,使用无监督学习识别市场状态。支持 formal/brief 两种输出风格。
---

# ML市场状态聚类/无监督分类助手

## 数据获取

通过 cn-stock-data skill 获取数据:
- **K线数据**: 指数日线+个股日线
- **市场指标**: 波动率/成交量/涨跌比
- **资金流数据**: 北向/融资/主力资金

## 分析工作流

### Step 1: 市场特征提取
- 收益率特征:均值/波动率/偏度/峰度
- 成交量特征:量能水平/量比/换手率
- 市场宽度:涨跌家数比/涨停跌停数
- 资金特征:北向净流入/融资余额变化

### Step 2: 聚类算法选择
- K-Means:简单高效,需预设K值
- GMM:高斯混合模型,软聚类概率输出
- DBSCAN:密度聚类,自动发现簇数
- 层次聚类:树状图可视化市场状态层次

### Step 3: 状态识别与标注
- 典型状态:牛市/熊市/震荡/转折
- 状态转移概率矩阵:各状态间的转换概率
- 当前状态判断:实时特征→最近邻状态
- 状态持续时间分布:各状态平均持续天数

### Step 4: 状态适配策略
- 不同状态下的最优策略选择
- 状态转换信号:提前识别状态切换
- 仓位管理:按状态调整股票/现金比例
- 因子轮动:不同状态下有效因子不同

### Step 5: 输出报告

## 输出格式

### formal 风格(研报级)
```
# ML市场状态聚类报告

## 一、聚类结果
| 状态 | 特征 | 占比 | 当前概率 |
|------|------|------|----------|

## 二、状态转移
[转移概率矩阵]

## 三、当前状态
[判断结果与置信度]

## 四、策略建议
[当前状态下的最优策略]
```

### brief 风格(快速分析)
```
## 市场状态速览
- GMM识别4种状态
- 当前状态:震荡偏多(概率68%)
- 转向牛市概率 22%
- 建议:维持6成仓位,偏向动量因子
```

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

Files in this skill

  • SKILL.md2.2 KB
  • references/ml-regime-cluster-guide.md502 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…