A股ML市场状态聚类/无监督分类。当用户说"市场聚类"、"无监督分类"、"状态聚类"、"ML聚类"、"K-means市场"、"市场分类"、"聚类分析市场"时触发。基于 cn-stock-data 获取数据,使用无监督学习识别市场状态。支持 formal/brief 两种输出风格。
Scanned 9/7/2026
Install to Claude Code
npx -y skills add aifinlab/FinClaw --skill a-share-ml-regime-cluster --agent claude-codeInstalls 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 automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/aifinlab-a-share-ml-regime-cluster-finclaw)More formats (shields.io, HTML) on the badges page.
---
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股实证研究。
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".