Home / Risk & portfolio
pyfolio
Portfolio performance and risk analysis in Python
What it is
A Python library for performance and risk analysis of financial portfolios, developed by Quantopian. Its core feature is the tear sheet, a collection of individual plots that together give a comprehensive picture of how a trading algorithm performs. The library integrates well with the Zipline open source backtesting framework, and its examples are designed to be run in Jupyter notebooks, making it a good fit for Python-literate quants and researchers who work in that environment. Development activity is centered on the original Quantopian ecosystem, and the related managed service has been discontinued, so the project should be treated as mature research code rather than an actively evolving product.
At a glance
Research onlyOur rating, based on popularity, maintenance and how ready it is for real use.
| Best for | Professional quants |
|---|---|
| Used for | Data analysis, Strategy research |
| Markets | Multi-market |
| Stack | Python |
| Learning curve | Moderate learning curve |
| Practical value | Medium practical value |
| Cost | Free and open source |
| Hardware | No GPU needed |
| Maintenance | No commits in over six months |
GitHub stars, last 30 days
Daily snapshots since 2026-09-12 (up to 30 days): +7 over the period, now 6,427. Gaps mean no snapshot was taken that day.
Portfolio and risk analytics in Python.
Similar tools
Jupyter notebooks companion to Machine Learning for Trading
Goldman Sachs Python toolkit for derivatives and risk
scikit-learn compatible Python library for portfolio optimization
CVXPY-based portfolio optimization and strategic asset allocation
Python financial econometrics with ARCH, GARCH and volatility models
C++ financial research terminal with embedded Python analytics