]> Piment Noir Git Repositories - freqai-strategies.git/commit
fix(quickadapter): use directional PnL momentum gate (#149)
authorJérôme Benoit <jerome.benoit@piment-noir.org>
Tue, 28 Jul 2026 20:35:17 +0000 (22:35 +0200)
committerGitHub <noreply@github.com>
Tue, 28 Jul 2026 20:35:17 +0000 (22:35 +0200)
commit22d27429eca52d2444c07bbca19c5185cc9e99b3
treeb6d508dcfbd91f253d37a82658fc583c7e72c4f3
parent5aec5259184b4f7ec199c904a4f3fa4da76f5e2c
fix(quickadapter): use directional PnL momentum gate (#149)

Replace the velocity/acceleration t-statistic exit gate with a deterministic
mean per-candle PnL velocity direction rule: once the take-profit target is
reached and the recent window is complete, allow the exit iff recent[-1] <
recent[0] (equivalent to strictly negative mean velocity via telescoping).

Remove the now-dead machinery: decline_quantile, t-critical/effective-df,
acceleration and zero-variance fallbacks, get_pnl_momentum,
get_trade_unrealized_pnl_history, the thresholds_calibration config specs, and
the unrealized_pnl_timeframe_minutes field. A legacy
exit_pricing.thresholds_calibration setting now warns as obsolete and ignored.

Fail-open only where the horizon is unmeasurable (missing candle date,
incomplete window, non-finite value in the selected window); complete finite
windows are deterministic (falling exits; flat or rising blocks).

Fixes #128
README.md
quickadapter/user_data/strategies/QuickAdapterV3.py
quickadapter/user_data/strategies/Utils.py