Skills DirectorySkills Directory
SkillsLearnSecurityCategoriesDocsCommunityBlog
Sign InSubmit Skill
Skills Directory

Security-tested agent skills for Claude, coding agents, and AI workflows.

Directory

  • Browse Skills
  • All Skills A–Z
  • Claude Skills
  • Claude Code Skills
  • Agent Skills
  • Categories
  • Authors
  • Submit a Skill

Learn

  • Learn Hub
  • Install Claude Skills
  • Write SKILL.md
  • Skills vs MCP
  • Directories Compared

Security

  • Security
  • Methodology
  • Secure Claude Skills
  • Security Badges

Company

  • About
  • Community
  • Blog
  • API Docs
  • Advertise

2026 Skills Directory. All rights reserved.

ProTermsPrivacyRefunds
Back to skills

Fund Risk Analyzer

ASecurity

基金风险分析器 - 专业基金风险识别与量化分析工具。 当用户需要分析基金风险、计算VaR、评估最大回撤、分析波动率、计算风险指标时使用此技能。 支持VaR/CVaR、最大回撤、夏普比率、Beta系数、下行风险等多种风险指标计算。 触发关键词:基金风险、风险分析、VaR计算、最大回撤、波动率、夏普比率、Beta系数、风险评估。

232 stars
0 votes
0 copies
1 views
Added 9/7/2026
datapythonbashapi

Works with

api

Security Analysis

A100/100

Scanned 9/7/2026

Install to Claude Code

$npx -y skills add aifinlab/FinClaw --skill fund-risk-analyzer --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fund Risk Analyzer?

Add the live security badge to your README — it updates automatically with every re-scan.

Security grade badge for Fund Risk Analyzer
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/aifinlab-fund-risk-analyzer/badge)](https://www.skillsdirectory.com/skills/aifinlab-fund-risk-analyzer)

More formats (shields.io, HTML) on the badges page.

Download with Pro
Files
SKILL.md
---
name: fund-risk-analyzer
description: |
  基金风险分析器 - 专业基金风险识别与量化分析工具。
  当用户需要分析基金风险、计算VaR、评估最大回撤、分析波动率、计算风险指标时使用此技能。
  支持VaR/CVaR、最大回撤、夏普比率、Beta系数、下行风险等多种风险指标计算。
  触发关键词:基金风险、风险分析、VaR计算、最大回撤、波动率、夏普比率、Beta系数、风险评估。
---

# 基金风险分析器 (Fund Risk Analyzer)

专业基金风险识别与量化分析工具,帮助用户全面评估基金风险特征。

## 功能概述

- **VaR/CVaR计算**: 历史模拟法、参数法、蒙特卡洛模拟
- **最大回撤分析**: 历史最大回撤、回撤持续期、回撤恢复时间
- **风险指标计算**: 夏普比率、索提诺比率、特雷诺比率、卡玛比率
- **Beta/Alpha分析**: 系统性风险、超额收益能力
- **波动率分解**: 上行/下行波动率、系统性/非系统性风险
- **尾部风险**: 偏度、峰度、极端风险预警
- **风险归因**: 风险来源分解

## 使用方法

### 命令行调用

```bash
# 全面风险分析
fund-risk --code 000001 --period 252

# VaR计算
fund-risk --code 000001 --var --confidence 0.95

# 对比风险指标
fund-risk --compare 000001,000002,000003

# 风险预警检查
fund-risk --code 000001 --alert
```

### Python API

```python
from fund_risk_analyzer import FundRiskAnalyzer

analyzer = FundRiskAnalyzer()

# 全面风险分析
risk_report = analyzer.analyze('000001', period=252)

# VaR计算
var_result = analyzer.calculate_var('000001', confidence=0.95, method='historical')

# 风险预警
alerts = analyzer.check_risk_alerts('000001')
```

## 风险指标说明

### 收益风险指标

| 指标 | 说明 | 计算公式 | 解读 |
|:---|:---|:---|:---|
| **夏普比率** | 单位总风险超额收益 | (Rp - Rf) / σp | >1优秀,<0较差 |
| **索提诺比率** | 单位下行风险超额收益 | (Rp - Rf) / σd | 只看下跌波动 |
| **特雷诺比率** | 单位系统性风险超额收益 | (Rp - Rf) / βp | 衡量选股能力 |
| **卡玛比率** | 收益与最大回撤比 | Rp / |最大回撤| | >2优秀 |

### 市场风险指标

| 指标 | 说明 | 计算公式 | 解读 |
|:---|:---|:---|:---|
| **Beta** | 相对市场波动 | Cov(Rp,Rm) / Var(Rm) | >1波动大于市场 |
| **Alpha** | 超额收益 | Rp - [Rf + β(Rm-Rf)] | >0有超额收益 |
| **R²** | 风险解释度 | | >0.8高度相关 |

### 极端风险指标

| 指标 | 说明 | 计算方法 | 解读 |
|:---|:---|:---|:---|
| **VaR** | 置信度下的最大损失 | 历史分位数 | 95%VaR=-5%表示95%概率损失不超5% |
| **CVaR** | 超过VaR的平均损失 | 尾部平均 | 比VaR更保守 |
| **最大回撤** | 峰值到谷底最大跌幅 | max(1 - 净值/峰值) | 越小越好 |

## 输出格式

### 风险分析报告

```json
{
  "fund_code": "000001",
  "fund_name": "华夏成长混合",
  "analysis_date": "2026-03-21",
  "period_days": 252,
  "risk_metrics": {
    "volatility": {
      "total": 18.5,
      "upside": 12.3,
      "downside": 15.2,
      "systematic": 14.8,
      "unsystematic": 8.2
    },
    "returns": {
      "annual_return": 25.3,
      "risk_free_rate": 2.5
    },
    "risk_adjusted": {
      "sharpe_ratio": 1.23,
      "sortino_ratio": 1.50,
      "treynor_ratio": 0.15,
      "calmar_ratio": 1.66
    },
    "market_risk": {
      "beta": 1.15,
      "alpha": 3.2,
      "r_squared": 0.82
    },
    "extreme_risk": {
      "var_95": -2.85,
      "var_99": -4.52,
      "cvar_95": -3.65,
      "cvar_99": -5.88,
      "max_drawdown": -15.2,
      "max_drawdown_duration": 45
    },
    "tail_risk": {
      "skewness": -0.35,
      "kurtosis": 3.25,
      "tail_ratio": 1.23
    }
  },
  "risk_assessment": {
    "overall_risk_level": "中高",
    "risk_score": 72,
    "confidence": "中等"
  },
  "risk_alerts": [
    {
      "type": "volatility",
      "level": "warning",
      "message": "波动率高于同类平均"
    }
  ]
}
```

## 风险等级划分

| 风险等级 | 风险评分 | 波动率 | 最大回撤 | 适合人群 |
|:---|:---:|:---:|:---:|:---|
| **低风险** | 0-30 | <10% | <5% | 保守型 |
| **中低风险** | 30-50 | 10-15% | 5-10% | 稳健型 |
| **中等风险** | 50-70 | 15-20% | 10-15% | 平衡型 |
| **中高风险** | 70-85 | 20-25% | 15-20% | 进取型 |
| **高风险** | 85-100 | >25% | >20% | 激进型 |

## VaR计算方法

### 1. 历史模拟法 (Historical Simulation)

```
VaR = 收益率序列的(1-置信度)分位数
优点: 无需假设分布
缺点: 依赖历史数据质量
```

### 2. 参数法 (Parametric / Variance-Covariance)

```
VaR = μ - z * σ
其中: μ=均值, σ=标准差, z=标准正态分位数
优点: 计算简单
缺点: 假设正态分布
```

### 3. 蒙特卡洛模拟 (Monte Carlo)

```
1. 拟合收益率分布参数
2. 随机生成大量收益率路径
3. 计算组合价值分布
4. 取分位数作为VaR
优点: 灵活性强
缺点: 计算量大
```

## 示例

### 示例1: 全面风险分析

**输入**:
```
分析基金000001的风险指标
```

**输出**:
```
📊 华夏成长混合 (000001) - 风险分析报告

收益风险指标:
  夏普比率: 1.23 ⭐⭐⭐⭐ (优秀)
  索提诺比率: 1.50 ⭐⭐⭐⭐⭐ (非常优秀)
  卡玛比率: 1.66 ⭐⭐⭐⭐ (优秀)

市场风险指标:
  Beta系数: 1.15 (波动大于市场)
  Alpha超额收益: 3.2% (有超额收益)

极端风险指标:
  95% VaR: -2.85% (日度)
  99% VaR: -4.52% (日度)
  最大回撤: -15.2% (持续45天)

风险等级: 中高风险 (72/100)
```

### 示例2: 风险预警

**输入**:
```
检查基金000001的风险预警
```

**输出**:
```
⚠️ 风险预警 - 华夏成长混合 (000001)

🔴 高风险预警:
  • 波动率(22.5%)高于历史均值15%
  • 当前回撤(-12.3%)接近最大回撤阈值

🟡 中风险提醒:
  • Beta系数(1.25)较高,市场敏感
  • 尾部风险上升,偏度为负

✅ 正常指标:
  • 夏普比率正常
  • 流动性风险可控

建议: 关注市场波动,适当降低仓位
```

## 注意事项

1. VaR基于历史数据,不代表未来极端风险
2. 风险指标应综合多个维度评估
3. 不同市场环境下风险特征可能变化
4. 建议定期(月度/季度)更新风险分析
5. 风险分析仅供参考,不构成投资建议

## 依赖

```
numpy>=1.20.0
scipy>=1.7.0
pandas>=1.3.0
matplotlib>=3.4.0
```

## 作者

FinClaw - 上海财经大学金融研究工具

Attribution

aifinlabaifinlab
View sourceMore from aifinlab →
SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments (0)

No comments yet. Be the first to comment!

SSkills DirectorySkills Directory

Your tool, in front of Claude Code builders.

3 founder slots · $299/mo · GSC-verified traffic · sponsors can never buy grades.

See placements

Related Skills

Rank Tracker

This skill helps you track, analyze, and report on keyword ranking positions over time. It monitors both traditional SERP rankings and AI/GEO visibility to provide comprehensive search performance insights.

1821 votes

Youtube Competitor Analyzer

Find and analyze YouTube competitor channels using YouTube Data API v3. Discover competitors through keyword search, category matching, content similarity, and related channel discovery. Compare metrics, content strategies, and market positioning. Use when users want to (1) Find competitors for their YouTube channel, (2) Analyze competitor performance metrics, (3) Compare their channel against competitors, (4) Identify content gaps and opportunities, (5) Benchmark against similar creators, (6...

31 votes

Twitter Algorithm Optimizer

Analyze and optimize tweets for maximum reach using Twitter's open-source algorithm insights. Rewrite and edit user tweets to improve engagement and visibility based on how the recommendation system ranks content.

742580 votes

Weather Fetcher

Instructions for fetching current weather temperature data for Karachi, Pakistan from wttr.in API

663750 votes

Weather

Get current weather and forecasts (no API key required).

484900 votes
View all in data →