finds.dev← search

// the find

dcajasn/Riskfolio-Lib

★ 4,275 · C++ · BSD-3-Clause · updated Jun 2026

Portfolio Optimization in Python

Riskfolio-Lib is a Python portfolio optimization library built on CVXPY that implements an unusually wide range of quantitative finance models — mean-risk, risk parity, hierarchical clustering, Black-Litterman, entropy pooling, and more. It targets quants and finance students who want to run institutional-grade portfolio math without writing the optimization formulations from scratch. The 58 Jupyter notebook tutorials make it genuinely accessible for the target audience.

1. The breadth of risk measures is real: 26+ convex measures covering dispersion, downside, and drawdown, each with correct CVXPY formulations across LP/QP/SOCP/SDP/EXP/POW — the solver compatibility table alone saves hours of debugging. 2. HRP and HERC implementations with 37 risk measures give you graph-theoretic clustering that most competing libraries skip entirely. 3. The C++ extension (Eigen 3.4 via pybind11) for the hot paths means it won't fall over on realistic portfolio sizes; Tutorial 17 runs 612 assets × 4943 observations with MOSEK. 4. Excel report generation via xlsxwriter and the Jupyter report tools mean outputs are usable directly in finance workflows without a second tool.

1. MOSEK or GUROBI is effectively required for anything exotic (EVaR, RLVaR, GMD, Tail Gini) — the readme admits CLARABEL fails and SCS is too slow for those; that's a paid dependency or academic license dependency most teams haven't budgeted for. 2. There is no time-series backtesting built in — it delegates to vectorbt, which is unmaintained and has its own dependency hell; the backtesting story is genuinely incomplete. 3. The C++ submodule vendor-copies the full Eigen 3.4.0 source tree into the repo, which is 50MB+ of headers that should be a build dependency, not committed source. 4. No support for transaction cost models or rebalancing frequency constraints, which are table stakes for live portfolio management — this is an academic optimizer, not a production rebalancing engine.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →