# quantopian/pyfolio

Portfolio and risk analytics in Python

Repository: https://github.com/quantopian/pyfolio
Canonical: https://ross.abutalabs.com/products/pyfolio
Homepage: https://quantopian.github.io/pyfolio
Language: Jupyter Notebook
License: Apache-2.0
License Family: permissive
Last push: 2023-12-23T06:14:58+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 4111, "days_push": 984, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 6407, forks 1892 (observed 2026-08-28T04:09:43.179691+00:00)

## What it is
Pyfolio is a Python library for performance and risk analysis of financial portfolios, centered on 'tear sheets' of plots that summarize a trading algorithm's returns, risk, and drawdowns. It integrates well with the Zipline backtesting library and is designed for use in Jupyter notebooks.

## Use cases
- analyze performance of a trading strategy in python
- generate a portfolio risk tear sheet
- visualize backtest results from zipline
- compute sharpe ratio and drawdowns for a portfolio
- bayesian analysis of trading returns
- analyze round trip trades and slippage

## When to choose
- you need comprehensive performance and risk plots for a trading algorithm
- you backtest with Zipline and want integrated tear sheets
- you work in Jupyter notebooks and want quick quantitative finance analytics

## When to avoid
- you need actively maintained software with recent fixes
- you need real-time portfolio monitoring rather than analysis
- you want a web dashboard instead of matplotlib-based tear sheets

## Facets
- artifact type: library
- maturity: maintenance
- function: data-visualization, analytics, data-science
- domain: fintech, data-science, data-visualization, analytics
- platform: python
- tags: portfolio-analysis, risk-analysis, tear-sheet, quantitative-finance, backtesting, jupyter, trading-strategy, matplotlib

## Member repositories
- quantopian/pyfolio (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:43.179691+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:44:56.548201+00:00, confidence not recorded.
  - readme: https://github.com/quantopian/pyfolio (fetched 2026-08-28T04:09:43.179691+00:00, sha 45690e45abda)
  - homepage: https://quantopian.github.io/pyfolio (fetched 2026-08-29T08:41:46.824665+00:00, sha 1a37f8ea4669)
  - registry_pypi: https://pypi.org/pypi/pyfolio/json (fetched 2026-08-29T08:41:46.827075+00:00, sha dabcd79ae2cf)
- Data as of 2026-08-30T08:39:29.467469+00:00.
