Skip to content

forecast: energy (EIA) bets systematically VOID — 7d horizon shorter than EIA's ~1wk data lag + settlement grace #5523

Description

@koala73

Symptom (live data, 2026-07-23)

The 4 energy bet_engine bets at deadline 07-19 are still pending 4 days later and are headed for VOID, while the commodity bets at the same deadline resolved cleanly (0% VOID).

Root cause

The energy settlement gate keys on the EIA feed's data date (asOf), which lags reality:

  • Today (07-23) the EIA asOf is 07-17 (from the Wed 07-23 report, covering the week ending ~07-18).
  • The bet deadline is 07-19; the gate resolves only once asOf >= 07-19.
  • asOf reaches 07-19 only with the ~07-30 report (data through ~07-24).
  • But VALUE_SETTLEMENT_MAX_LAG_MS = 10 days → the bet VOIDs at deadline+10d = 07-29, one day before the 07-30 data lands.

So an energy bet with a 7-day horizon (EIA_HORIZON_MS, scripts/_bet-templates-energy.mjs) can essentially never settle within the grace: EIA data lags "now" by ~6 days and only updates weekly, so the data for the deadline week publishes ~1–2 weeks after the deadline.

Fix options

  1. Lengthen the energy horizon to clear the lag — e.g. deadline = generatedAt + ~21d so the covering EIA report lands within the grace. (Simplest.)
  2. Lag-aware grace — a longer VALUE_SETTLEMENT_MAX_LAG_MS for weekly period feeds (EIA) than for live feeds (commodities).
  3. Gate on report availability, not data-date — resolve when the EIA report covering the deadline period publishes.

Given the commodity lane resolves reliably at the deadline (live prices, no lag), the energy lane is lower-value until this is fixed. Recommend option (1) — a ~21d energy horizon — as the minimal change.

Evidence

bet_engine slice (07-23): resolved 8 (all commodity, 0 VOID); 4 energy @07-19 stuck pending; EIA asOf = 07-17.

Refs #5233, #4930. Follow-up from the Gate-1 review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions