Home / Risk & portfolio
skfolio
scikit-learn compatible Python library for portfolio optimization
What it is
A Python library for portfolio optimization, factor model construction, and risk management built on top of scikit-learn. It provides a unified interface and sklearn-compatible tools to build, tune, and cross-validate portfolio models. Quant developers who already work in the scikit-learn ecosystem will find the API familiar. As an open-source library rather than a product, it requires users to supply their own data pipelines and Python expertise.
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 | Commits today |
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 +108 , latest 2,686. Gaps mean no snapshot was taken that day.
Python library for portfolio optimization built on top of scikit-learn. It provides a unified interface and sklearn compatible tools to build, tune and cross-validate portfolio models.
Other portfolio optimization libraries
PyPortfolioOpt offers efficient-frontier and Black-Litterman allocation methods; Riskfolio-Lib supports a range of risk measures. Both address portfolio construction alongside skfolio, with different interfaces and model-validation workflows.