nx_fin_pbo.nx
buildroot/runtime/nx_fin_pbo.nx
about
nx_fin_pbo.nx -- Probability of Backtest Overfitting (Bailey/Lopez de Prado CSCV). Completes the overfit-
detection suite (deflated-Sharpe was the multiple-testing correction; PBO is the combinatorial one). Given an
M-strategy x S-group performance matrix, enumerate every C(S, S/2) train/test split (train = set bits of a
popcount-S/2 mask, test = the rest); for each split pick the BEST in-sample strategy and ask whether it lands
in the BOTTOM HALF out-of-sample. PBO = fraction of splits where it does. High PBO => your "winner" is likely
luck. Pure integer combinatorics -- no transcendental functions, exact + gate-checkable. license_tier: ORIGINAL
dependencies 1 imports · 1 importers
imports: nx_syscalls.nx
imported by: nx_fin_pbo_gate.nx
structs
| none |
consts
| 8 | const K_MAGIC_1000000000: i64 = 1000000000 |
functions
| 10 | func pb_popcount(x: i64) -> i64 { var c: i64 = 0; var v: i64 = x; while v > 0 { c = c + (v & 1); v = v >> 1 } return c } |
| 13 | func pb_pbo_permille(perf: *i64, m: i64, s: i64) -> i64 |
| 48 | func pb_overfit_likely(pbo_permille: i64, thresh_permille: i64) -> i64 { if pbo_permille >= thresh_permille { return 1 } return 0 } called by 1: main |