$npx skillfedfor your agent

skfolio

Portfolio optimization built on top of scikit-learn

Worth itPyPI Software DevelopmentReleased Aug 202692.0K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — skfolio-0.20.2-py3-none-any.whl
v0.20.2 · released 2026-08-13 · Python >=3.10 · 8 runtime deps: numpy, scipy, pandas, cvxpy-base, clarabel, scikit-learn, joblib, plotly

Yes. skfolio is actively maintained, has no known vulnerabilities, uses a permissive license, and offers low install friction. It is well-suited for anyone building quantitative portfolio models in Python who wants scikit-learn-style workflows, multiple optimization methods, and robust cross-validation. The 2101 GitHub stars and recent release cycle signal a mature, community-backed project. Install it if you need portfolio optimization; skip it if you only need basic mean-variance calculations or prefer a different API.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python >= 3.10; cvxpy-base and clarabel are compiled dependencies that may require a C compiler or prebuilt wheels on some platforms.
  • Low install friction with a pure-Python wheel and eight well-established dependencies (numpy, scipy, pandas, scikit-learn, plotly, cvxpy-base, clarabel, joblib).
  • Actively maintained with a release 1 day old and 2101 GitHub stars.

License · maintenance · safety

permissive license (permissive) — Distributed under the permissive BSD 3-Clause License, which permits commercial and private use with minimal restrictions—only requiring retention of copyright and license text in source distributions.

last release 2026-08-13 (1 days) · last repo commit 2026-08-14 · 2,101 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 92,039 downloads/mo, #13,485 on PyPI

Verify before relying

pip install skfolio

from skfolio.optimization import MeanRisk
from skfolio.datasets import load_sp500_dataset

prices = load_sp500_dataset()
model = MeanRisk()
model.fit(prices)
  • Whether the library handles missing data or late-inception assets automatically or requires preprocessing.
  • Performance characteristics and scalability limits for large universes of assets or long time series.
  • Whether enterprise support from Skfolio Labs is included or requires a separate contract.
Same gist for agents: .md · .json

What it is and what it does

skfolio is a machine-learning-focused portfolio optimization framework built on scikit-learn's API. It addresses shortcomings in classical mean-variance optimization by offering a unified toolkit for model selection, validation, and parameter tuning while mitigating overfitting and data leakage. The library provides naive allocation strategies (equal-weight, inverse-volatility), convex optimization methods (mean-risk, risk budgeting, maximum diversification), clustering-based approaches (hierarchical risk parity), and ensemble techniques. It also includes estimators for expected returns, covariance matrices, distributions, and priors, plus cross-validation and hyperparameter tuning compatible with scikit-learn's ecosystem.

The package is designed for quantitative finance practitioners and researchers who need to experiment with multiple portfolio construction methods and compare their out-of-sample performance. Its dependencies—numpy, scipy, pandas, scikit-learn, plotly, cvxpy-base, and clarabel—provide numerical computing, optimization, data handling, and visualization. The library targets Python 3.10 and later and is actively maintained with recent releases.

Use it for

  • Build and backtest mean-risk portfolio models with different covariance estimators and risk measures.
  • Compare naive allocation strategies against optimized portfolios using walk-forward or purged cross-validation.
  • Construct hierarchical risk parity or equal-risk-contribution portfolios for diversification.
  • Stress-test portfolio allocations under different market regimes or synthetic scenarios.
  • Tune portfolio optimization hyperparameters (e.g., regularization, constraints) via grid or randomized search.
  • Estimate expected returns and covariance using shrinkage, denoising, or regime-adjusted methods.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

skfolio is actively maintained, has no known vulnerabilities, uses a permissive license, and offers low install friction. It is well-suited for anyone building quantitative portfolio models in Python who wants scikit-learn-style workflows, multiple optimization methods, and robust cross-validation. The 2101 GitHub stars and recent release cycle signal a mature, community-backed project. Install it if you need portfolio optimization; skip it if you only need basic mean-variance calculations or prefer a different API.

Install

skfolio on PyPI

Before you install

Low install friction with a pure-Python wheel and eight well-established dependencies (numpy, scipy, pandas, scikit-learn, plotly, cvxpy-base, clarabel, joblib). Actively maintained with a release 1 day old and 2101 GitHub stars.

Requires Python >= 3.10; cvxpy-base and clarabel are compiled dependencies that may require a C compiler or prebuilt wheels on some platforms.

License in practice

Distributed under the permissive BSD 3-Clause License, which permits commercial and private use with minimal restrictions—only requiring retention of copyright and license text in source distributions.

Quickstart

pip install skfolio

from skfolio.optimization import MeanRisk
from skfolio.datasets import load_sp500_dataset

prices = load_sp500_dataset()
model = MeanRisk()
model.fit(prices)

Verify before relying

  • Whether the library handles missing data or late-inception assets automatically or requires preprocessing.
  • Performance characteristics and scalability limits for large universes of assets or long time series.
  • Whether enterprise support from Skfolio Labs is included or requires a separate contract.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
8 packages
numpyscipypandascvxpy-baseclarabelscikit-learnjoblibplotly
MaintenanceActively maintained 1 days since the last release
Last repo commit
First released
Downloads92,039 / month, #13,485 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Intended Audience :: DevelopersIntended Audience :: Financial and Insurance IndustryIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Topic :: Office/Business :: Financial :: InvestmentTopic :: Scientific/Engineering :: MathematicsTopic :: Software Development

Evidence: skfolio-0.20.2-py3-none-any.whl

Tags

Capabilities
portfolio optimization pythonmean-variance optimization libraryrisk management asset allocationscikit-learn portfolio modelshierarchical risk parityconvex portfolio optimizationportfolio backtesting frameworkcovariance estimation finance
Topics
portfolio-optimizationquantitative-financescikit-learn-compatible
PyPI keywords
portfoliooptimizationoptimisationfinanceassetallocationquantitativequantinvestmentstrategymachine-learningscikit-learndata-miningdata-science

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “portfolio optimization python”

  • skfolioskfolio is a Python library for portfolio optimization and risk…
  • pyportfoliooptPyPortfolioOpt implements portfolio optimization methods including…
  • riskfolio-libRiskfolio-Lib builds optimized investment portfolios using…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also pyportfolioopt · riskfolio-lib · quantstats · QuantLib · empyrical-reloaded · gs-quant · scikit-learn · backtesting · quantile-forest · numpy-financial