lib-purgedcvlisted
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