pyfolio-reloaded — Portfolio Performance Analytics
Maintained fork of Quantopian's pyfolio providing comprehensive risk and return analytics, tear sheets, and performance attribution for quantitative strategies.
pyfolio-reloaded — Portfolio Performance Analytics
pyfolio-reloaded is the actively maintained fork of Quantopian's pyfolio, providing deep quantitative portfolio analytics. It generates beautiful tear sheets covering returns, drawdowns, Sharpe/Sortino ratios, rolling beta, factor exposures, transaction costs, and round-trip analysis — essential for evaluating backtested and live trading strategies.
Key Features
- Full tear sheets: returns, drawdowns, risk metrics, position analysis, transaction analysis
- Rolling performance metrics: Sharpe, beta, volatility, correlation
- Bayesian tear sheet (posterior distributions of performance metrics)
- Integration with Zipline, QuantConnect, and any returns Series
- Interactive Plotly output supported
Quick Start
import pyfolio as pf
import pandas as pd
# Load daily returns (index=DatetimeIndex, values=float)
returns = pd.read_csv("strategy_returns.csv", index_col=0, parse_dates=True).squeeze()
pf.create_full_tear_sheet(returns)
npx ai-supply add pyfolio-reloaded-portfolio-analytics
Curated mirror of the open-source pyfolio-reloaded (Apache-2.0). Get it from the source.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/pyfolio-reloaded-portfolio-analytics/check). Click a policy:
Consume pyfolio-reloaded — Portfolio Performance Analytics programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/pyfolio-reloaded-portfolio-analytics
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/pyfolio-reloaded-portfolio-analytics/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add pyfolio-reloaded-portfolio-analytics
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/pyfolio-reloaded-portfolio-analytics/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "pyfolio-reloaded-portfolio-analytics" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.