Files
fxhnt/tests/integration
jgrusewski b8bd43480d perf(vrp): batched per-month OPRA backfill — ~1h vs ~45h (2 calls/month vs ~6-8/day)
The per-day backfill did ~6-8 OPRA API round-trips/day (~26k over 2013->), all latency
-> ~45h. Rewrote it batched: fetch_option_chain_range (one range definition/month, deduped)
+ one range ohlcv fetch/month (band-bounded via a coarse median-strike forward, wide enough
for intra-month moves incl. COVID), then every trading day processed LOCALLY (parity forward
+ band + upsert). Extracted the forward/band logic into pure helpers (_forward_from_marks,
_band_contracts, _band_rows_from_marks) shared by the per-day path (_xsp_forward_estimate,
_freeze_xsp_slice — refactored, behaviour unchanged, tests green) and _backfill_month. CLI
iterates per-month. ~1h, ~$70-100 (bulk pulls a wider slice than the tight daily band).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 09:50:19 +02:00
..