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 7 days ago |
GitHub stars, last 30 days
Daily snapshots since 2026-09-12 (up to 30 days): +47 over the period, now 4,539. 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
Python financial econometrics with ARCH, GARCH and volatility models
C++ financial research terminal with embedded Python analytics
Python library for pricing and risk-managing financial derivatives