Home / Risk & portfolio

skfolio

Risk & portfolio2,686 GitHub starsPython⏱ Commits today

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 forProfessional quants
Used forStrategy research, Data analysis
MarketsMulti-market
StackPython
Learning curveModerate learning curve
Practical valueHigh practical value
CostFree and open source
HardwareNo GPU needed
MaintenanceCommits 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.

In the author's words

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.

Open on GitHub ↗This week's trending toolsChinese page

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.

Compare the three portfolio optimization libraries