refactor(quickadapter): extract is_finite_number to Utils and reuse it (#122)
* refactor(quickadapter): extract is_finite_number to Utils and reuse it
- move the numeric/finite/non-bool scalar guard from a QuickAdapterV3
static method to a shared Utils.is_finite_number helper
- reuse it across the strategy label getters/setters and the shared
label_natr_multiplier validation guard
- leave the strict positive-int label_period_candles/label_horizon_candles
paths unchanged (distinct predicate)
* refactor(quickadapter): harden label-param fallbacks and per-row NATR guard
Address the #112 re-review findings (landed in this PR):
- coerce the per-row label_period_candles series with pandas to_numeric
before np.isfinite, matching the guarded scalar path (object/str dtype no
longer raises)
- re-validate the persisted _label_params fallback in the label getters via
is_finite_number before use, otherwise fall back to config
- generalize the is_trade_runmode comment (it gates both persisted-param
reuse and per-candle param setting)
- README: drop the inaccurate 'simulated' wording and the runmode-specific
framing on the label_period_candles/label_natr_multiplier rows
* docs(quickadapter): drop per-candle label-param behavior notes from tunables
The label_period_candles/label_natr_multiplier rows describe labeling
tunables; the per-candle strategy-NATR/exit consumption is an internal
behavior detail (already documented inline in the code), not needed to
configure the tunable. Revert both rows to their base description.
* style(quickadapter): wrap set_label_natr_multiplier guard per ruff format
The committed one-liner exceeded the 88-char line length; apply ruff
format wrapping (behavior unchanged).