压力测试/情景分析助手

SkillDev tools

See how a Chinese A-share portfolio would hold up under market shocks, such as a sharp drop, before they happen. Once added, your AI can run stress tests and what-if scenario analysis on holdings, pulling A-share data it needs and explaining the results in a formal report or a short summary.

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

Add the skill, then simply ask your AI for a stress test or scenario analysis, for example: what happens to my portfolio if the market plunges. It will fetch the data it needs and show how the portfolio would fare.

Then ask your AI: use the 压力测试/情景分析助手 skill

What your AI can do with it

  • Run a stress test on an A-share portfolio
  • Model what-if scenarios, such as a sudden market drop
  • Show worst-case outcomes for the holdings being analyzed
  • Pull the A-share data needed for the analysis
  • Deliver results as a formal report or a brief summary

What this skill tells your AI

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

数据获取

通过 cn-stock-data skill 获取数据:

  • 组合数据: 持仓明细与权重
  • 历史数据: 极端行情期间的价格序列
  • 宏观数据: 利率/汇率/商品价格

分析工作流

Step 1: 历史情景测试

  • 2015股灾:沪指-45%,小盘股跌幅更大
  • 2016熔断:4个交易日-15%
  • 2018贸易战:沪指全年-25%
  • 2020疫情冲击:春节后首日-8%
  • 组合在各历史情景下的模拟损失

Step 2: 假设情景测试

  • 市场暴跌:指数-10%/-20%/-30%
  • 利率冲击:10Y国债收益率+50bp/+100bp
  • 汇率冲击:人民币贬值5%/10%
  • 流动性危机:成交量萎缩50%+价差扩大

Step 3: 敏感性分析

  • 单因子敏感性:逐一变动风险因子
  • 多因子联合冲击:相关性在危机时趋向1
  • 非线性效应:期权/可转债的凸性影响
  • 二阶效应:波动率飙升+流动性枯竭

Step 4: 压力测试报告

  • 各情景下的组合损失金额与比例
  • 最大损失情景识别
  • 风险集中度:哪些持仓贡献最大损失
  • 应对预案:触发止损/减仓/对冲的阈值

Step 5: 输出报告

输出格式

formal 风格(研报级)

# 组合压力测试报告

## 一、历史情景
| 情景 | 组合损失 | 最大回撤 |
|------|---------|----------|

## 二、假设情景
[各假设情景损失]

## 三、敏感性分析
[单因子/多因子敏感性]

## 四、应对预案
[止损阈值、对冲方案]

brief 风格(快速分析)

## 压力测试速览
- 最大历史损失:2015股灾情景 -32%
- 假设暴跌20%:组合损失 -18%
- 风险集中:前3大持仓贡献65%损失
- 建议:增加对冲,降低集中度

参考 references/stress-test-guide.md 获取详细方法论与 A股实证研究。

使用示例

示例 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-stress-test
Source
github.com/aifinlab/finclaw