Install any skill in seconds. Free to start, no credit card required.
Get Started Free →A股多因子模型/Barra风格因子分析。当用户说"多因子"、"multifactor"、"Barra"、"因子模型"、"风格因子"、"XX的因子暴露"、"因子收益率"、"风险模型"时触发。基于 cn-stock-data 获取行情和财务数据,构建多因子风险模型,分析因子暴露、因子收益、协方差矩阵。支持研报风格(formal)和快速分析风格(brief)。
.claude/skills/aifinlab-a-share-multifactor-model/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -1% | 0% |
| case-11 | ✗→✓ | ▲ Improved | -8% | 0% |
| case-19 | ✗→✓ | ▲ Improved | -60% | 0% |
| case-20 | ✗→✓ | ▲ Improved | 48% | 0% |
bashSCRIPTS="$SKILLS_ROOT/cn-stock-data/scripts" # 个股K线(计算动量/波动率因子) python "$SCRIPTS/cn_stock_data.py" kline --code [CODE] --freq daily --start [日期] # 实时行情(市值/PE/PB等) python "$SCRIPTS/cn_stock_data.py" quote --code [CODE1],[CODE2],... # 财务指标(ROE/营收增速等基本面因子) python "$SCRIPTS/cn_stock_data.py" finance --code [CODE]
量化计算:
bashQSCRIPTS="$SKILLS_ROOT/a-share-multifactor-model/scripts" # 多因子回归 python "$QSCRIPTS/multifactor_builder.py" --returns returns.csv --factors "size,value,momentum" --method ols
根据用户需求选择因子集:
| 维度 | formal(完整因子报告) | brief(快速分析) | |------|---------------------|-------------------| | 因子定义 | 完整因子体系说明 | 仅列出因子名 | | 因子收益 | 完整时序+统计检验 | 近期因子收益排名 | | 暴露分析 | 个股因子暴露详表 | 关键因子暴露值 | | 风险模型 | 协方差矩阵+特质风险 | 无 | | 图表 | 因子收益累计曲线 | 无 |
默认风格:brief。用户要求"详细"/"完整模型"时切换为 formal。
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 26,131 | 11,955 | -54% | 1 | 1 | 0% | 3,912 | 1,383 | -65% | 0 | 0 | — |
case-02 | fail→pass | 31,240 | 89,798 | +187% | 1 | 1 | 0% | 5,515 | 7,064 | +28% | 0 | 0 | — |
case-03 | fail→fail | 24,635 | 9,476 | -62% | 1 | 1 | 0% | 3,938 | 1,160 | -71% | 0 | 0 | — |
case-04 | pass→pass | 21,133 | 29,348 | +39% | 1 | 1 | 0% | 3,792 | 5,037 | +33% | 0 | 0 | — |
case-05 | pass→pass | 21,103 | 22,835 | +8% | 1 | 1 | 0% | 3,460 | 4,473 | +29% | 0 | 0 | — |
case-06 | pass→pass | 28,659 | 33,459 | +17% | 1 | 1 | 0% | 5,313 | 5,652 | +6% | 0 | 0 | — |
case-07 | pass→pass | 20,637 | 13,070 | -37% | 1 | 1 | 0% | 2,788 | 2,805 | +1% | 0 | 0 | — |
case-08 | fail→fail | 19,248 | 15,903 | -17% | 1 | 1 | 0% | 2,855 | 3,153 | +10% | 0 | 0 | — |
case-09 | pass→pass | 18,232 | 12,420 | -32% | 1 | 1 | 0% | 3,215 | 3,173 | -1% | 0 | 0 | — |
case-10 | fail→pass | 22,263 | 16,626 | -25% | 1 | 1 | 0% | 3,023 | 2,990 | -1% | 0 | 0 | — |
case-11 | fail→pass | 18,144 | 12,518 | -31% | 1 | 1 | 0% | 3,031 | 2,778 | -8% | 0 | 0 | — |
case-12 | pass→pass | 21,563 | 12,205 | -43% | 1 | 1 | 0% | 3,160 | 2,269 | -28% | 0 | 0 | — |
case-13 | pass→pass | 18,197 | 7,048 | -61% | 1 | 1 | 0% | 2,588 | 1,933 | -25% | 0 | 0 | — |
case-14 | pass→pass | 11,066 | 5,788 | -48% | 1 | 1 | 0% | 1,306 | 1,724 | +32% | 0 | 0 | — |
case-15 | pass→pass | 14,368 | 14,185 | -1% | 1 | 1 | 0% | 2,320 | 2,868 | +24% | 0 | 0 | — |
case-16 | pass→pass | 35,427 | 39,602 | +12% | 1 | 1 | 0% | 5,713 | 8,311 | +45% | 0 | 0 | — |
case-17 | pass→pass | 12,720 | 12,000 | -6% | 1 | 1 | 0% | 1,830 | 2,713 | +48% | 0 | 0 | — |
case-18 | fail→fail | 18,757 | 8,746 | -53% | 1 | 1 | 0% | 3,635 | 1,216 | -67% | 0 | 0 | — |
case-19 | fail→pass | 21,191 | 6,305 | -70% | 1 | 1 | 0% | 4,260 | 1,698 | -60% | 0 | 0 | — |
case-20 | fail→pass | 13,615 | 19,235 | +41% | 1 | 1 | 0% | 2,324 | 3,439 | +48% | 0 | 0 | — |
case-21 | pass→pass | 15,681 | 9,794 | -38% | 1 | 1 | 0% | 2,365 | 2,321 | -2% | 0 | 0 | — |
case-22 | fail→pass | 17,721 | 15,297 | -14% | 1 | 1 | 0% | 2,613 | 2,984 | +14% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 19 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +27 percentage points is the difference between those two pass rates over the 19 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/28/2026 | +9% |
Other measured skills in the registry, with their headline benchmark lift.