Files
fxhnt/tests/unit
jgrusewski e9e6856489 fix(paper): vol_target_leverage falls back to unlevered on non-finite vol
NaN in the trailing return window causes np.std to produce NaN; the prior
guard `pv <= 1e-12` is False for NaN, so `min(max_leverage, nan)` resolved
to max_leverage (3.0) — pinning leverage to max on dirty data. The guard now
checks `math.isfinite(pv)` first, returning the safe unlevered fallback (1.0).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 08:36:45 +02:00
..