mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
935adde6c5
The previous monte_carlo_trade_pvalue() used sum(permuted_trades) as test statistic, which is permutation-invariant (sum is commutative), so beat/n was always 1.0 and MC_p was always 1.00 for every strategy. Replace with a one-sided binomial test on trade win rate vs 50% baseline. Tests whether the observed win rate could occur by chance under H0: p=0.5. Also add _shift_daily_constant_factor_if_needed() to predix_full_eval.py so re-evaluations apply the look-ahead bias correction for daily factors. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>