agentsclimarketplace

China fund analysis

Skill ChandlerF97/china-fund-analysis

分析基金持仓数据,生成区域分布、策略分布、相关性分析报告,输出Markdown和PDF格式。适用于基金E账户APP导出的Excel文件分析。From its SKILL.md

Install
npx -y skills add ChandlerF97/china-fund-analysis

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.9 KB, ~1.5k tokens by cl100k_base, as published. Nobody here has run it

基金持仓分析助手

概述

本Skill用于分析用户基金持仓数据,生成详细的分析报告和可视化图表。

使用场景

当用户需要分析基金持仓时使用,例如:

  • 分析基金E账户APP导出的持仓数据
  • 查看基金资产的区域分布(A股、QDII、港股通、债券、黄金、货币)
  • 查看基金策略分布(指数型、债券策略、主动股票、货币策略、红利/高股息、量化策略)
  • 生成持仓相关性分析
  • 输出Markdown和PDF格式报告

输入

  • 基金持仓Excel文件:基金E账户APP导出的基金E账户App投资者公募基金持有信息-日期.xlsx文件
  • 输出目录(可选):报告和图表的输出目录,默认为Excel所在目录

输出

  • Markdown报告 (.md):包含详细分析解读的文本报告
  • PDF报告 (.pdf):包含嵌入式图表的完整报告
  • 图表文件 (.png):
    • fund_distribution_charts.png - 区域和策略分布饼图+条形图
    • fund_correlation_heatmap.png - 相关性热力图
    • fund_radar_chart.png - 资产配置雷达图
    • fund_top_holdings.png - 前15大持仓

分类规则

区域分类

关键词区域分类
QDII(不含港股通)海外股票(QDII)
港股通、港股港股通
黄金、金ETF、商品黄金/商品
债券、短债、纯债债券基金
货币货币基金
其他A股/国内

策略分类

关键词策略分类
货币货币策略
债券、短债、纯债债券策略
ETF联接、指数、ETF指数型
红利、高股息、股息红利/高股息
量化量化策略
科技、成长、创新、信息科技/成长
主动股票、股票主动股票

分析流程

Step 1: 数据读取与解析

  1. 使用pandas读取Excel文件
  2. 解析基金代码、名称、份额、市值等关键字段
  3. 过滤有效持仓记录

Step 2: 自动分类

根据基金名称中的关键词,自动进行:

  • 区域分类(A股/国内、海外股票QDII、港股通、债券基金、黄金/商品、货币基金)
  • 策略分类(指数型、债券策略、主动股票、货币策略、红利/高股息、量化策略、科技/成长)

Step 3: 数据统计分析

  1. 计算各区域/策略的持仓金额和占比
  2. 统计基金数量分布
  3. 识别前十大持仓

Step 4: 可视化图表生成

生成以下图表:

  • 饼图:区域分布和策略分布占比
  • 条形图:各分类金额对比
  • 雷达图:资产配置多维度展示
  • 热力图:区域-策略相关性矩阵

Step 5: 报告生成

生成包含以下内容的Markdown报告:

  1. 持仓概况(核心指标)
  2. 区域分布分析(含解读)
  3. 策略分布分析(含解读)
  4. 相关性分析
  5. 持仓明细(前十大)
  6. 投资建议

Step 6: PDF输出

使用reportlab将Markdown报告和图表整合生成PDF文件。

代码模板

详细实现代码见 references/fund_analysis.py

依赖库

pandas
matplotlib
seaborn
numpy
reportlab
jieba

核心函数

  • load_fund_data(excel_path) - 读取Excel数据
  • classify_fund(fund_name) - 分类基金
  • analyze_holdings(df) - 分析持仓
  • generate_charts(region_data, strategy_data, output_dir) - 生成图表
  • generate_markdown_report(data, output_path) - 生成Markdown报告
  • generate_pdf_report(markdown_path, charts_dir, output_path) - 生成PDF报告

使用示例

# 分析基金持仓
请分析 /path/to/your/fund_data.xlsx

注意事项

  • Excel文件需为基金E账户APP导出格式
  • 确保Python环境已安装所需依赖库
  • PDF生成需要系统安装中文字体支持

What ships with it: 4 files

33.6 KB alongside SKILL.md, 1 of them executable

Keep looking

Skills are one crate of 326,512. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.