A股风格分析/Sharpe风格归因

SkillDev tools

This skill lets your AI analyze the investment style of A-share funds and portfolios. Once added, you can ask whether a fund leans toward large-cap or small-cap stocks and get a quantitative style exposure breakdown based on Sharpe style attribution. Results come back in either a formal or a brief format.

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

Add the skill, then ask your AI for a style analysis on a fund or portfolio, for example by asking whether it favors large-cap or small-cap stocks.

Then ask your AI: use the A股风格分析/Sharpe风格归因 skill

What your AI can do with it

  • Run a Sharpe style attribution on a fund or portfolio
  • Quantify a fund's or portfolio's exposure to different A-share investment styles
  • Tell you whether a portfolio leans toward large-cap or small-cap stocks
  • Deliver results in a formal or a brief format
  • Respond to plain questions like style analysis, style exposure, or large-cap versus small-cap

What this skill tells your AI

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

数据源

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: 获取组合/基金净值+风格指数

Step 2: Sharpe风格分析

约束回归: R_p = Σ(w_i × R_style_i) + ε 约束: w_i ≥ 0, Σw_i = 1

Step 3: 风格漂移检测

滚动窗口分析风格权重变化

Step 4: 输出

维度formalbrief
风格权重完整分解主要风格
风格漂移时序变化图是否漂移
默认风格:brief。

关键规则

  1. Sharpe风格分析用约束二次规划(权重非负且和为1)
  2. 风格指数选择影响结果——需覆盖主要风格维度
  3. 风格漂移是基金评估的重要维度
  4. A股常用风格维度:大盘价值/大盘成长/小盘价值/小盘成长
  5. R² > 0.9 说明风格指数解释力强

使用示例

示例 1: 基本使用

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

示例 2: 命令行使用

python scripts/run_skill.py --input data.json

Signals

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