Files
fxhnt/tests/unit
jgrusewski 9b88805984 feat(paper): vol_target_leverage warmup (no leverage until vol_lookback obs)
Add a `warmup_obs: int = _VOL_LOOKBACK` (60) keyword to vol_target_leverage
and change the early guard from `len(days) < 2` to `len(days) < warmup_obs`.
Returns 1.0 (unlevered) until there are >= warmup_obs book-return observations,
so a thin cold-start window (tiny, unreliable vol estimate) no longer
over-levers. The pv<=1e-12 / non-finite guard is unchanged.

Existing leverage tests use 60-80 obs series so they still lever (verified).

Per the foundation audit (D3, cold-start over-leverage).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-22 16:59:24 +02:00
..