From: Jérôme Benoit Date: Mon, 22 Jun 2026 13:00:18 +0000 (+0200) Subject: refactor(quickadapter): disambiguate label_period_candles vs label_horizon_candles X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=b5d91061d058878bdaa5712638a6eaaa24c53e59;p=freqai-strategies.git refactor(quickadapter): disambiguate label_period_candles vs label_horizon_candles Three distinct issues addressed together for terminology coherence and operator visibility. (1) README: replace "NATR horizon" by "NATR period" in the four rows documenting `label_period_candles` / `min_label_period_candles` / `max_label_period_candles` / `label_candles_step`. The noun "horizon" was also the noun in `label_horizon_candles`, which has the opposite temporal direction (lookahead causal-split guard vs lookback NATR period). "NATR period" matches both the tunable name (`label_period_candles`) and the underlying API (`ta.NATR(..., timeperiod=label_period_candles)`). (2) `QuickAdapterV3.set_freqai_targets`: rename the local `label_period` (a `datetime.timedelta` spanning `len(dataframe) * timeframe_minutes`) to `series_duration`, and update the two log labels (`label_period: 3 days, 12:00:00` → `series_duration: 3 days, 12:00:00`). The previous name collided with `label_period_candles` (an int candle count) at the operator log level; `series_duration` matches the sibling `series_length` (an int) declared two lines below. (3) `QuickAdapterRegressorV3.__init__` startup dump: add `label_horizon_candles` to the "Label Parameters:" section (both HPO-enabled and HPO-disabled branches). The parameter is a training-time data-split lookahead (causal split guards in `_make_train_test_split_datasets` / `_make_timeseries_split_datasets`), NOT an HPO hyperparameter — it is neither sampled (`trial.suggest_int`) nor bounded (`min/max_*`) nor an HPO input to `label_objective`. Placing it in "Label Parameters:" (runtime values) rather than "Label Hyperparameters:" (HPO config) matches its actual semantics. In the HPO-on branch the global value is emitted before the per-pair loop to visually distinguish it; in the HPO-off branch it trails the existing global lines so the natural order is `label_period_candles` → `label_natr_multiplier` → `label_horizon_candles` (the latter falls back to the former when unset). --- diff --git a/README.md b/README.md index bd3a1f8..9b823ea 100644 --- a/README.md +++ b/README.md @@ -100,11 +100,11 @@ 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 horizon. | +| freqai.feature_parameters.label_period_candles | min/max midpoint | int >= 1 | Zigzag labeling NATR period. | | 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 `