Pyfolio 业绩分析

Pyfolio 业绩分析:一键生成投资组合 tear sheet——夏普、回撤、年化、换手、行业归因全套图表,覆盖 10+ 核心指标。

✓ 0 人报告成功·v0.1.0·

晶体简介

Pyfolio 业绩分析是基于 stefan-jansen/pyfolio-reloaded 的投资组合绩效分析工具。给回测或实盘的收益序列,一键生成 tear sheet——夏普比率、最大回撤、年化收益、换手率、个股往返交易、行业归因等10+ 核心指标的可视化报告。 典型使用场景:(1) 策略回测后的标准化绩效报告;(2) 多策略对比和选优;(3) 机构季报的投资业绩披露;(4) 策略健康度监控。支持 Alphalens 因子分析联动、Benchmark 基准对比。 本 skill 面向量化研究员和组合经理。内置约束覆盖:return 序列的 NaN 处理、多策略对齐时的时间戳要求、行业归因的 sector mapping 一致性等。

Blueprint Source

finance-bp-106

stefan-jansen/pyfolio-reloaded6b55da72 source files

Constraints

75total
50fatal
50 must-not-violate

Evidence Quality

Confidence88%

Medium confidence — review before critical use

50 条不可违反的约束

FATALarchitecture_guardrailfinance-C-002

WHENWhen estimating intraday positions from transactions

ACTIONApply shift(1) to EOD positions before adding intraday transaction deltas

CONSEQUENCEWithout shift(1), positions at day-start are contaminated with end-of-day values, causing look-ahead bias that makes intraday-adjusted results unrepresentative of actual peak-exposure moments.

FATALdomain_rulefinance-C-018

WHENWhen implementing allocation percentage calculation

ACTIONInclude cash column in the denominator when computing allocation percentages

CONSEQUENCEPortfolio allocation percentages will not sum to 100% if cash is excluded from the denominator, misrepresenting the portfolio's actual composition and misleading risk analysis

FATALdomain_rulefinance-C-019

WHENWhen identifying top positions for analysis

ACTIONExclude cash column when finding top long/short/absolute positions

CONSEQUENCECash would incorrectly appear as a position holding, causing top position analysis to report cash as the largest portfolio holding rather than actual securities

常见问题

讨论 (0)

暂无讨论,成为第一个发言的人吧!

更新历史

v0.1.02026-04-23·贡献者: tangweigang-jpg

v0.1.0: 首次发布。基于 stefan-jansen/pyfolio-reloaded 的投资组合绩效分析工具,中英双语 + 3 条 FAQ。