]> Piment Noir Git Repositories - freqai-strategies.git/commit
refactor(quickadapter): make pivot confirmation gate statistically honest
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 15 Nov 2026 00:49:04 +0000 (01:49 +0100)
committerJérôme Benoit <jerome.benoit@piment-noir.org>
Sun, 15 Nov 2026 01:28:57 +0000 (02:28 +0100)
commit13f2203405f6f5c7b2e0a745b192daf0df122c7f
tree6feaacf68a19f163b72cf2e506f6db13c18ffe2c
parent4d7f44cda1892b25268d7fba85d08c474349183c
refactor(quickadapter): make pivot confirmation gate statistically honest

The binomial gate treated the nested-window slope indicators that share
one candidate pivot as iid Bernoulli(0.5) trials, so its p-value carried
no valid significance claim. Under a continuous symmetric random-walk
null the agreement count follows the discrete arcsine law (Sparre
Andersen): even unanimity cannot reject at alpha=0.05 below 128
observations.

Replace it with the semantics the rule actually needs: a hard sample
floor (_ZIGZAG_MIN_CONFIRMATION_SLOPES = 5 post-pivot candles) plus the
existing volatility-adjusted ratio gate. Gate outcomes differ only for
windows of 5 to 12 candles across theta in [0.75, 0.95]; n <= 4 stays
blocked (unanimity p >= 0.0625) and n >= 13 gates coincide. Earlier
confirmations can cascade into later pivot positions.

Removing the binomtest comparison also drops a suppressed
reportReturnType diagnostic (numpy bool_); accepted snapshots
212 -> 211.

Bump version 3.13.3 -> 3.13.4.
quickadapter/.basedpyright/diagnostics.json
quickadapter/tests/test_utils_zigzag.py
quickadapter/user_data/freqaimodels/QuickAdapterRegressorV3.py
quickadapter/user_data/strategies/QuickAdapterV3.py
quickadapter/user_data/strategies/Utils.py