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