Position concentration calculation

From aifinlab/FinClaw · View interactive version

Position concentration calculation is an AI agent skill from the GitHub repository aifinlab/FinClaw. 用于仓位/集中度的仓位与集中度计算原子 skill,适用于通用行业金融计算场景。

How to use this skill

Skill file

仓位与集中度计算 Skill

数据来源

本 Skill 支持多种组合数据输入格式,核心数据来源包括:

1. 持仓数据

2. 组合数据

3. 数据格式要求

说明:本 Skill 不包含数据采集功能,需要用户提供清洗后的持仓数据。建议持仓数据完整且权重已归一化,以便进行准确的集中度计算。


功能

本 Skill 提供全面的仓位与集中度计算能力,涵盖多种计算方法:

1. 集中度指标计算

2. 行业集中度计算

3. 地区集中度计算

4. 仓位分析

5. 数据处理能力


使用示例

输出示例

{
  "portfolio": "组合A",
  "date": "2024-12-31",
  "concentration": {
    "top1_weight": 8.5,
    "top5_weight": 25.3,
    "top10_weight": 42.8,
    "top20_weight": 65.2,
    "hhi": 0.085,
    "effective_holdings": 11.8,
    "max_single_weight": 8.5
  },
  "industry_concentration": {
    "top1_industry": "科技",
    "top1_weight": 35.2,
    "top3_weight": 58.5,
    "industry_hhi": 0.152,
    "effective_industries": 6.6
  },
  "statistics": {
    "total_holdings": 45,
    "total_weight": 100.0,
    "average_weight": 2.22,
    "median_weight": 1.5
  },
  "distribution": {
    "percentile_25": 0.8,
    "percentile_50": 1.5,
    "percentile_75": 3.2
  }
}

注意事项与限制

1. 数据质量要求

2. 计算方法选择

3. 时间序列分析

4. 综合判断原则

5. 使用限制


参考资料

License

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.