Home / Risk & portfolio
Riskfolio-Lib
CVXPY-based portfolio optimization and strategic asset allocation
What it is
A Python library for portfolio optimization and quantitative strategic asset allocation, built on top of CVXPY and closely integrated with Pandas. It supports mean risk and logarithmic mean risk (Kelly criterion) optimization with multiple objective functions, risk parity optimization, and a broad set of convex risk measures spanning dispersion, downside, and drawdown measures such as CVaR, EVaR, and CDaR. The library is aimed at students, academics, and practitioners who want to build portfolios based on mathematically complex models with low effort. Users should be comfortable with convex optimization concepts, as the library is a modeling tool rather than a ready-made investment product.
At a glance
RecommendedOur rating, based on popularity, maintenance and how ready it is for real use.
| Best for | Professional quants |
|---|---|
| Used for | Strategy research, Data analysis |
| Markets | Multi-market |
| Stack | Python |
| Learning curve | Moderate learning curve |
| Practical value | High practical value |
| Cost | Free and open source |
| Hardware | No GPU needed |
| Maintenance | Last commit 27 days ago |
Popularity snapshots
Daily snapshots of GitHub stars. Star changes are not a count of users or usage. Snapshots since 2026-11-02 (up to 30 days): first-to-last change +50 , latest 4,631. Gaps mean no snapshot was taken that day.
Portfolio Optimization and Quantitative Strategic Asset Allocation 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
Portfolio and risk analytics, a maintained fork of pyfolio
Python library for pricing and risk-managing financial derivatives
Performance analytics, backtesting and factsheet reporting in Python