A share anomaly detection

From aifinlab/FinClaw · View interactive version

A share anomaly detection is an AI agent skill from the GitHub repository aifinlab/FinClaw. A股量价异常检测/异动监控。当用户说"异常检测"、"异动"、"anomaly"、"量价异常"、"异常波动"、"XX有异动"时触发。量化检测股价和成交量异常。支持formal和brief风格。

How to use this skill

Skill file

A股量价异常检测/异动监控

数据源

SCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts"
python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [日期]
python "$SCRIPTS/cn_stock_data.py" quote --code [CODE]
python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]

Workflow

Step 1: 获取K线数据

Step 2: 统计异常检测

Step 3: 模式异常检测

Step 4: 异常归因

关联近期公告/新闻/资金流,尝试解释异常原因

Step 5: 输出

| 维度 | formal | brief |

|------|--------|-------|

| 异常信号 | 完整异常事件列表 | 最新异常 |

| 统计分析 | Z-score+分布 | 异常等级 |

| 归因 | 可能原因分析 | 一句话 |

默认风格:brief。

关键规则

  1. 异常不等于机会——可能是风险信号
  2. 统计异常需结合基本面/消息面综合判断
  3. A股信息泄露常见——异常可能先于公告
  4. 单日异常可能是噪音——连续异常更值得关注
  5. 成交量异常通常比价格异常更有预测价值

使用示例

示例 1: 基本使用

# 调用 skill
result = run_skill({
    "param1": "value1",
    "param2": "value2"
})

示例 2: 命令行使用

python scripts/run_skill.py --input data.json
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.