fix(reforcexy): align training, inference and reward analysis contracts
* fix(reforcexy): account for portfolio transition returns
* fix(reforcexy): align training inference and reward analysis contracts
* fix(reforcexy): resolve statistical reporting and type-narrowing findings
- BH correction filters undefined p-values out of the finite family;
non-applicable tests keep significant flags None and NaN adjusted values.
- Bootstrap percentile CIs validate finite ordered bounds only; constants
keep exact degenerate bounds in both diagnostic modes without widening.
- Distribution diagnostics mark constant columns as N/A (skewness/kurtosis
None, normality tests and Q-Q omitted) and reject fabricated fallbacks.
- Explicit independent_observations contract across hypothesis tests,
bootstrap, shift metrics and report sections; trajectory report is
descriptive (no inferential p-values/CIs unless declared independent).
- Distribution shift computes exact ks_2samp statistics on raw values;
KS p-value reported only for independent observations.
- PBRS certification requires ordered-episode evidence: local identity
F = gamma*next - prev, continuity, discounted boundary residual;
non-canonical configurations are never certified from raw sums.
- Report renders actual bootstrap resample count, independent sections
and N/A constant rows; transforms rename bounded asinh to softsign_sqrt
without aliases; loss-potential bound docs corrected.
- Narrow Optional callback/env/attr types and force float arrays so the
BasedPyright snapshot holds 142 diagnostics; ruff clean.
* docs(reforcexy): align HPO continuation contract with merged behavior
* fix(reforcexy): harden inference contracts and reward accounting
Isolate deployed policy on continuation, account open positions at
terminal liquidation, guarantee Python bool terminated, handle OHLC
drop without holdout, prune no-learning DQN trials, preserve replay
buffer and chronology across restarts and splits, propagate complete
observation validity, reset temporal caches on discontinuities, fix
terminal neutral potential in analysis, align history events with
transitions, enforce loss amplification threshold, honor simulated
unrealized PnL, keep idle duration past threshold, reject missing
real_episodes files and unknown overrides. Transport inference dates
through dk.data_dictionary with explicit length alignment guard.
* fix(reforcexy): address review follow-ups
* refactor(reforcexy): consolidate constants and helpers
Remaining 4 are by-design, not user-facing message-convention items:
- 3 internal 'persisted ...' ValueErrors are immediately re-raised by
the conforming 'Training [%s]: cannot continue ...' DependencyException
wrapper; prefixing them would double-scope the surfaced text.
- FileExistsError(path) carries no literal message.
fix(reforcexy): port applicable QuickAdapter PR #261 fixes (#263)
* fix(reforcexy): port applicable QuickAdapter PR #261 fixes
- Align prediction history to requested candle dates and exact strategy
indexes (recorded/produced provenance, dedupe, exact-index attach).
- Freeze deployment feature coordinates for continual learning with
independent cache/disk state restoration and explicit rejection of
legacy or incompatible artifacts.
- Keep raw OHLC environment prices out of feature preprocessing; cold
HPO trials use fresh candidate pipelines while the final continuation
reuses the frozen deployment pipeline on the raw split.
- Return the current finite evaluation best checkpoint (best_model.zip)
with final-policy fallback.
- Optional per-pair produced-observation action statistics with session
warmup, numeric coercion and population standard deviation.
- Refresh BasedPyright snapshot; 2 argument-type errors resolved.
* fix(reforcexy): align resumed gamma and invalidate incompatible HPO state
* docs(reforcexy): clarify continuation and objective compatibility
* docs(reforcexy): condense continuation guidance
* fix(reforcexy): preserve replay buffer on best checkpoint selection
fix(quickadapter): preserve zero power mean exponent in label selection
_validate_power_mean_p returns 0.0 for p=0 (a finite float accepted by
README), and the falsy fallback silently rewrote it to 1.0, turning the
documented generalized-mean p=0 (geometric) into arithmetic. Use an
explicit None check for the fallback; map-based metrics are unchanged.
Verified in the QA image (Freqtrade 2026.8): p=0 now matches
geometric_mean selection (winner 1, identical distances), while p=None
keeps the arithmetic default.
chore(basedpyright): drop resolved reward_space_analysis ExtensionArray.size diagnostic
pandas-stubs 3.0.5.260914 resolves the previously-recorded
reportAttributeAccessIssue on ExtensionArray.size at
reward_space_analysis.py:2720, so the accepted ReforceXY snapshot no
longer matches current diagnostics. Remove the stale entry to unblock
the BasedPyright (ReforceXY) required check.
fix(qa): tolerate tool version drift in snapshot comparison
Compare snapshots with basedpyrightVersion normalized out: a tool upgrade that changes no diagnostics no longer fails the check. The recorded version stays in snapshots and --write output as provenance, is still validated nonempty on both sides, still appears in the failure diff, and both versions are reported in the success message. Diagnostics, file inventory and schema stay byte-exact, so changed output still fails closed. Covers scripts/test_check_basedpyright.py (stdlib unittest): version-only drift matches, diagnostic change mismatches, empty version and missing key rejected.
fix(renovate): anchor managed version values to digit-start
Require managed version values to start with a digit in both Dockerfile ARG and compose matchStrings. Kills the false-positive class where any *_version key with a non-version scalar (e.g. latest, stable) becomes a pypi lookup. Verified no-op on the current corpus: identical 26-capture set before/after.
chore(qa): refresh BasedPyright snapshots for 1.40.1
Repin accepted snapshots for the basedpyright 1.40.0 -> 1.40.1 bump. Diagnostics are unchanged in both projects (242 quickadapter / 159 reforcexy) — only the version marker moves. Snapshots generated with the same --pull docker build as CI.
feat(docker): manage xgboost installation and version
Pin xgboost as a managed build dependency, harmonized with the existing catboost/ngboost pattern: ARG xgboost_version in quickadapter/Dockerfile, matching build arg in docker-compose.yml, and automatic updates via the existing renovate custom regex manager (pypi datasource).
The freqtrade stable_freqai base image ships xgboost 3.2.0; this pins 3.4.1 so the QA and production images track the latest release independently of base image lag. ReforceXY is untouched: it does not use xgboost. BasedPyright snapshots unchanged (242/159 diagnostics verified with the rebuilt QA images).
chore(qa): refresh BasedPyright snapshots for 1.40.0
Repin accepted snapshots for the basedpyright 1.40.0 bump (pyright 1.1.412). QuickAdapter diagnostics are unchanged; ReforceXY keeps one message-only update from the re-pulled base image (base class step() return dict value inferred as dict[str, float] instead of dict[str, Unknown]) with the same rule, location, and severity. No added or removed diagnostics. Snapshots generated with the same --pull docker build as CI.
Jérôme Benoit [Fri, 28 Aug 2026 16:18:38 +0000 (18:18 +0200)]
fix(quickadapter): gate final take-profit on retracement
Replace the elapsed-time final take-profit exit with a persisted volatility-scaled retracement, harden its state invariants, and harmonize final-exit terminology.
Jérôme Benoit [Sun, 23 Aug 2026 21:14:34 +0000 (23:14 +0200)]
chore(quickadapter): update label_weighting and label_smoothing templates
- set label_smoothing method to kaiser_bessel_derived with window_candles 6
- add commented alternative label_weighting example (amplitude strategy,
epsilon_gaussian fill, knn bandwidth)
- align commented per-label beta example with canonical default (8.0)