From: Jérôme Benoit Date: Thu, 23 Jul 2026 18:31:00 +0000 (+0200) Subject: fix(quickadapter): preserve label params per candle (#112) X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=bccb1c3e7d5232e462ce3e6f6b8612cacfb34ca2;p=freqai-strategies.git fix(quickadapter): preserve label params per candle (#112) * fix(quickadapter): preserve label params per candle * fix(quickadapter): reject invalid dynamic label params * refactor(quickadapter): harden label-param validation and dedupe runmode gate - add _is_finite_number guard rejecting bool and non-numeric before np.isfinite (which raised on str/object) across the label getters/setters - factor the duplicated runmode-in-TRADE_MODES predicate into the is_trade_runmode cached_property - document the per-candle NATR construction and drop the redundant fillna after where() in the per-row NATR path - note that backtest and hyperopt (not only backtest) retain the per-candle label period in the README --- diff --git a/README.md b/README.md index e8c83c4..b2bcc1d 100644 --- a/README.md +++ b/README.md @@ -100,12 +100,12 @@ docker compose up -d --build | freqai.label_pipeline.sigmoid_scale | 1.0 | float > 0 | Scale parameter for `sigmoid` normalization, controls steepness. | | freqai.label_pipeline.gamma | 1.0 | float (0,10] | Contrast exponent applied to labels after normalization: >1 emphasizes extrema, values between 0 and 1 soften. | | _Feature parameters_ | | | | -| freqai.feature_parameters.label_period_candles | min/max midpoint | int >= 1 | Zigzag labeling NATR period. | +| freqai.feature_parameters.label_period_candles | min/max midpoint | int >= 1 | Zigzag labeling NATR period. When label HPO is enabled, backtest and hyperopt retain the period produced for each simulated candle when calculating strategy NATR. | | freqai.feature_parameters.label_horizon_candles | `label_period_candles` | int >= 1 | Number of candles after a label row before the label is considered known by causal split guards. Recommended: cover the zigzag pivot confirmation lag (the smoothing kernel half-width is added automatically by `set_freqai_targets`). Used by causal split guards and `