Validate overfitting (CSCV)
validate_overfittingCompute probability that best backtested variant is overfitting via CSCV. Input a returns matrix to get the overfitting probability.
Instructions
Probability (0 to 1) that picking the best of several backtested variants was overfitting, by CSCV over every variant's returns. A deflated Sharpe or overfitting probability above or below any threshold is not admission to anything and is not a forecast.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Sampling seed; default 42. | |
| matrix | Yes | Returns as fractions: one row per period, one column per variant. | |
| n_splits | No | Even number of blocks, at least 2; default 16. | |
| max_combinations | No | Most splits evaluated, up to 2000 (default). |