npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

fund-screener

v1.2.0

Published

固收+基金筛选器 - 基于AkShare的基金分析工具

Downloads

437

Readme

固收+基金筛选器

通过 AkShare 获取中国公募基金数据,筛选高夏普比率、低回撤的固收+基金产品。

功能特性

批量筛选模式

  • ✅ 自动分析 50+ 只知名固收+基金
  • ✅ 计算夏普比率、最大回撤、年化收益率等关键指标
  • ✅ 结果导出 CSV,便于对比分析

单基金深度分析模式

  • ✅ 深度分析单个基金的所有指标
  • ✅ 获取基金经理信息(从业年限、管理规模、历史业绩)
  • ✅ 查看基金持仓(前10大重仓股、行业分布)
  • ✅ 分析阶段收益(近1年、近2年、近3年)
  • ✅ 年度收益表现统计
  • ✅ 生成完整的投资建议报告

数据支持

  • ✅ 支持偏债混合型、二级债基、可转债等多种固收+类型
  • ✅ 获取基金规模、股票/债券仓位等配置信息
  • ✅ 涵盖主流基金公司产品(易方达、华夏、南方、招商等)

安装

方式1:克隆仓库

git clone https://github.com/yourusername/fund-screener.git
cd fund-screener
pip install -r requirements.txt

方式2:pip安装

pip install fund-screener

依赖

akshare>=1.10.0
pandas>=1.5.0
numpy>=1.21.0

使用方法

命令行直接运行

模式1:批量筛选(默认)

分析50+只知名固收+基金,输出CSV结果:

python fund_screener.py

模式2:单基金深度分析

分析指定基金的完整信息:

# 只提供基金代码
python fund_screener.py 000215

# 提供基金代码和名称
python fund_screener.py 000215 "广发趋势优选灵活配置混合A"

使用 npx(无需安装)

# 批量筛选
npx fund-screener

# 单基金分析
npx fund-screener 000215
npx fund-screener 000215 "广发趋势优选灵活配置混合A"

作为模块导入

批量分析

from fund_screener import analyze_funds

funds = [
    ('002015', '南方荣光A', '偏债混合'),
    ('001316', '安信稳健增值混合A', '偏债混合'),
]
results = analyze_funds(funds)

单基金深度分析

from fund_screener import analyze_single_fund, print_fund_analysis

# 分析单个基金(会自动查找基金名称)
analysis = analyze_single_fund('000215')
print_fund_analysis(analysis)

# 或者指定基金名称
analysis = analyze_single_fund('000215', '广发趋势优选灵活配置混合A')
print_fund_analysis(analysis)

# 获取详细数据
print(f"基金经理: {analysis['基金经理']['基金经理']}")
print(f"夏普比率: {analysis['风险指标']['夏普比率']}")
print(f"近1年收益: {analysis['阶段收益']['近1年']}%")

获取基础指标

from fund_screener import get_fund_metrics

result = get_fund_metrics('004010', '华泰柏瑞鼎利混合A')
print(f"夏普比率: {result['夏普比率']}")
print(f"最大回撤: {result['最大回撤(%)']}%")

输出指标

| 指标 | 说明 | 参考标准 | |------|------|----------| | 夏普比率 | 风险调整后收益 | >0.5 良好,>1.0 优秀 | | 最大回撤 | 历史上最大亏损 | <-10% 优秀,<-20% 可接受 | | 年化收益率 | 平均每年收益 | >5% 良好 | | 股票仓位 | 股票占净值比例 | 5-20% 典型固收+范围 | | 基金规模 | 资产管理规模 | 2-500亿较为合理 |

筛选逻辑

默认筛选条件:

  • 夏普比率 ≥ 0.3
  • 最大回撤 ≥ -25%(回撤控制在25%以内)
  • 年化收益率 > 2%
  • 数据长度 ≥ 2年

输出示例

批量筛选模式

🏆 优质固收+基金 TOP 5:

  基金代码      基金名称       类型    夏普比率  最大回撤(%)  年化收益率(%)
003859    招商招旭纯债A      纯债     2.24      -2.25       4.76
002015      南方荣光A    偏债混合     0.92      -4.64       5.48
000121    华夏永福混合A   偏债混合     0.91     -16.33       9.37
001182  易方达安心回馈混合  偏债混合     0.90     -18.07      10.23
001316  安信稳健增值混合A   偏债混合     0.88      -7.20       5.90

单基金分析模式

================================================================================
                         基金深度分析报告
================================================================================

【1. 基本信息】
--------------------------------------------------------------------------------
基金代码: 000215
基金名称: 广发趋势优选灵活配置混合A
最新净值: 1.7705
累计净值: 2.1695
日增长率: -0.25%
手续费: 0.15%
申购状态: 开放申购
赎回状态: 开放赎回

【2. 风险指标】
--------------------------------------------------------------------------------
夏普比率: 0.34
最大回撤(%): -14.01%
年化收益率: 4.89%
年化波动率: 7.38%
风险评级: 较高风险(需谨慎)

【3. 阶段收益】
--------------------------------------------------------------------------------
近1年: 6.37%
近2年: 4.4%
近3年: 1.93%

【4. 年度收益表现】
--------------------------------------------------------------------------------
2022年: -0.51%
2023年: -1.38%
2024年: +1.31%
2025年: +4.97%

【5. 资产配置】
--------------------------------------------------------------------------------
股票仓位: 8.4%
估算债券仓位: 86.6%
报告期: 2025年1季度股票投资明细

【6. 基金经理】
--------------------------------------------------------------------------------
基金经理: 谭昌杰
所属公司: 广发基金
从业年限: 13.6年
管理规模: 19.18亿元
最佳回报: 88.46%

【7. 持仓信息】
--------------------------------------------------------------------------------
报告期: 2025年1季度股票投资明细
持仓数量: 10只
股票仓位: 8.3%

前10大重仓股:
  1. 阳光电源(300274) - 1.02%
  2. 皖能电力(000543) - 0.99%
  3. 广日股份(600894) - 0.97%
  4. 赛力斯(601127) - 0.95%
  5. 万华化学(600309) - 0.93%

【8. 综合评价】
--------------------------------------------------------------------------------
✅ 优点:
  • 股票仓位适中(8.4%),风险可控
  • 债券仓位较高(86.6%),收益稳定

⚠️  注意:
  • 最大回撤-14.01%较大,需关注风险控制
  • 夏普比率0.34处于中等水平,风险调整后收益一般

================================================================================

数据来源

  • 基金净值数据:东方财富网(通过 AkShare)
  • 基金规模数据:基金经理持仓数据
  • 资产配置数据:基金季度持仓报告

风险提示

⚠️ 免责声明

  • 本工具仅供学习研究使用
  • 历史业绩不代表未来表现
  • 基金投资有风险,入市需谨慎
  • 不构成任何投资建议

许可证

MIT License

贡献

欢迎提交 Issue 和 PR!

更新日志

v1.1.0 (2026-02-14)

  • ✨ 新增单基金深度分析功能
    • 支持分析基金经理信息(从业年限、管理规模、历史业绩)
    • 支持查看基金持仓(前10大重仓股)
    • 支持阶段收益和年度收益分析
    • 自动生成投资建议报告
  • 🔧 优化命令行交互,支持两种模式切换
  • 📊 完善风险评级系统

v1.0.0 (2026-02-14)

  • 初始版本发布
  • 支持基础指标计算
  • 包含50+只知名固收+基金

联系方式

  • 作者:Your Name
  • 邮箱:[email protected]
  • GitHub:https://github.com/yourusername/fund-screener