lib-skfoliolisted
Install: claude install-skill howard-lynn-ye/fin-skills
# skfolio
The only portfolio library that is a real scikit-learn estimator collection — so portfolio
*construction itself* can be cross-validated, not just the return forecast feeding it.
| | |
|---|---|
| pip / import | `skfolio` / `skfolio` |
| Version | **1.0.3** (2026-08-31) — **1.0.0 landed 2026-08-23** · Python `>=3.10` |
| Licence | **BSD-3-Clause** |
| Status | ✅ **fastest-moving library in the category** — 2,345★ / 41 issues, pushed 2026-09-03; 0.20.2 → 1.0.3 in 18 days |
⚠️ **Positioning, precisely:** skfolio is scikit-learn-***compatible***, part of the sklearn
*ecosystem* — **not** an official sub-project, not `scikit-learn-contrib`-governed.
⚠️ **Pre-1.0 knowledge will break.** 1.0.0 shipped 2026-08-23, so essentially every tutorial, blog post and
model-recalled snippet predates the stability commitment. Check any 0.x example first.
## The trap that costs you money
🚨 **`CombinatorialPurgedCV.split()` yields `(train_index, [test_0, test_1, …])`** — a *list* of test folds per split,
**not** sklearn's 2-tuple contract. Any loop written the normal way — `for train, test in cv.split(X)` — binds `test`
to a list of arrays and then indexes with it. It does not raise. It produces a wrong partition and a wrong score,
which is exactly the failure mode purged CV exists to prevent. The correct shape is in the snippet below.
## `purged_size` and `embargo_size` are OBSERVATIONS, not time
🚨 Under time bars that is merely opaque. Under **dollar or volume bars a fixed co