Skip to content

betting_combat.services.rounds_health

Strategy 4’s daily health (ROUND_SYSTEM_FLOW §4 rounds_health, §9):

freshness every rounds data surface’s size and latest time, every recent card’s coverage (services.rounds_data_health), plus the inputs the live run and the refit cannot do without: the UFCStats mirror and the Wikipedia list landed within STALE_DAYS, and every settled card a day old with its fights_kalshi rows -> Data & Jobs rows (data_health) and grouped findings edge the edge CUSUM per mode (the view rounds_edge_cusum: AFML 17.3.2, one- sided, fixed start at the latest anchor) -> rounds_health_series points edge_cusum:<mode> (value S_t / c_t, the alarm line 1) and edge_cum_residual:<mode> (the cumulative residual), and a finding while the current segment has alarmed (it stays until Sam sets a new anchor)

Functions

alias_needed

alias_needed(cards: Iterable[Mapping[str, Any]]) -> tuple[dict[str, Any], Counter[str]]

The names the upcoming-card loader could not resolve (rounds_upcoming_cards’ excluded bouts, reason ‘fighter not resolved’), as a Data & Jobs row and one finding per name: each can be mapped by hand in rounds_name_aliases (a spelling -> the UFCStats fighter id).

cusum_series

cusum_series(rows: Iterable[Mapping[str, Any]], anchors: Iterable[Mapping[str, Any]] = ()) -> tuple[list[dict[str, Any]], dict[str, bool]]

(rounds_health_series rows, mode -> whether its CURRENT segment has alarmed) from the view’s rows. One point per series and settlement time (bets settled at one moment: the last of them, the statistic after all of them). The current segment starts at the mode’s latest anchor (anchors): an anchor set after the last settled bet starts a segment with no bet yet, so the alarm clears until a bet in it alarms again.

fights_kalshi_gaps

fights_kalshi_gaps(winner_markets: Sequence[Mapping[str, Any]], derived: set[str], today: dt.date) -> Counter[str]

Settled fights (two YES/NO winner markets, one YES) of cards at least two days old without a fights_kalshi row, per card.

freshness

freshness(store: RoundsStore, today: dt.date) -> tuple[list[dict[str, Any]], Counter[str]]

The Data & Jobs rows of every rounds surface and recent card, and the findings.