Combinatorial purged cross-validation
An open, mathematically robust implementation of Purged K-Fold and Combinatorial Purged Cross-Validation (CPCV). Designed to eliminate data leakage and serial correlation in financial time series and market psychology research.

Leakage prevention with index purging
Standard cross-validation fails in financial research due to overlapping labels across barrier evaluation intervals. Our core helper routine identifies every training observation whose lifespan intersects test intervals, extracting and eliminating contaminated indices before model calibration.

Embargo windows and path generation
Autocorrelation persists well beyond label resolution dates. By enforcing a strict post-test embargo window (typically 1% to 2% for daily data and higher for intraday regimes), the combinatorial splitter generates uncompromised, leak-free historical testing paths across all group combinations.

Objective institutional validation
The SRBMPR framework prioritizes scientific reproducibility over optimistic backtests. Integrating Purged K-Fold and CPCV into behavior modeling ensures that Sharpe ratios, drawdowns, and structural market psychological signatures reflect genuine statistical resilience rather than look-ahead bias.
Create Your Own Website With Webador