code wiki / (root) / nx_fin_paper.nx

nx_fin_paper.nx

buildroot/runtime/nx_fin_paper.nx

2134 B38 linesdepth 4pulls 4 transitivereach 2 importersview sourcekind librarytopic fin
docsdependenciesstructsconstsfunctions

about

nx_fin_paper.nx -- R5: PAPER / forward simulation = the OVERFIT CHECK before any capital. Splits the bar history into in-sample (train) vs OUT-OF-SAMPLE (test), replays the strategy signals through the R2 engine on the OOS slice ONLY, and asks the honest question: does the edge SURVIVE on data it never saw? An edge that only works in-sample is overfit -- this is the gate before R6 live. Composes R1 (MD_FIELDS) + R2 (bt_run). license_tier: ORIGINAL

dependencies 3 imports · 2 importers

nx_syscalls.nx nx_fin_marketdata.nx nx_fin_backtest.nx nx_fin_paper.nx nx_fin_marketdata_fetch.nx nx_fin_paper_gate.nx

imports: nx_syscalls.nxnx_fin_marketdata.nxnx_fin_backtest.nx

imported by: nx_fin_marketdata_fetch.nxnx_fin_paper_gate.nx

structs

none

consts

9const K_MAGIC_10000: i64 = 10000

functions

12func pp_split(nbars: i64, is_frac_bps: i64) -> i64 { return nbars * is_frac_bps / K_MAGIC_10000 }
called by 1: main
16func pp_oos_run(bars: *i64, nbars: i64, signals: *i64, split_idx: i64, start_equity: i64,
called by 1: main calls 2: sys_mmapbt_run
34func pp_edge_survives(is_expectancy: i64, oos_expectancy: i64, min_retain_bps: i64) -> i64
called by 1: main