← ClaudeAtlas

lib-purgedcvlisted

The only genuinely sklearn-protocol-compliant purged and embargoed splitter, and the one that refuses to run until you state when each label resolved - understate evaluation_times and it silently reintroduces the leak while reporting clean folds. TRIGGER - purgedcv, PurgedKFold, PBO, CPCV, probability of backtest overfitting, CombinatorialPurgedCV, PurgedGroupKFold, WalkForwardSplit, prediction_times, evaluation_times, purge_horizon, embargo, audit_splitter, reconstruct_paths, path_metrics, overlapping labels, triple-barrier touch time, mlfinlab.cross_validation. Memory is stale or absent - this package first shipped 2026-05-16 and is at 0.1.6. SKIP for CPCV over portfolio models (lib-skfolio) and for SPA/StepM/MCS (lib-arch). SKIP when the question is WHICH library to choose, or names no library at all - both belong to the domain skill.
howard-lynn-ye/fin-skills · ★ 1 · AI & Automation · score 77
Install: claude install-skill howard-lynn-ye/fin-skills
# purgedcv Purged, embargoed and combinatorial cross-validation for time series with **overlapping labels** — the one splitter that refuses to run until you tell it when each label actually resolved. | | | |---|---| | pip / import | `purgedcv` / `purgedcv` | | Version | **0.1.6** (2026-09-04) · Python `>=3.10` (classifiers 3.10–3.14) | | Licence | **MIT** | | Status | ✅ **actively developed** — `eslazarev/purged-cross-validation`, 31★, **0 open issues**, pushed 2026-09-04; 18 releases since 2026-05-16, ~117 commits, has a JOSS paper | ## The trap that costs you money 🚨 **`evaluation_times` is a *required* argument, and understating it silently reintroduces the leak.** That requirement is the point of the library — you cannot call it without stating your label horizon, which is exactly the fact people omit. But passing `t0 + 1 bar` when the label really resolves ten bars later purges almost nothing: the splitter reports clean folds and the score stays inflated. With triple-barrier labels, `t1` must be the **actual touch time returned by the labeler** — not the vertical barrier, and not a fixed horizon. Overstating it (using the vertical barrier when a barrier was touched early) is merely wasteful; **understating it is a correctness bug** that looks exactly like a correct run. ## Why purging exists at all Financial labels overlap. A triple-barrier label stamped at `t0` is not resolved until `t1`, and `t1` routinely lands inside the next fold. Standard k-fold then trains