Skip to content

betting_combat.rounds.features.clock_v2

Group 5 v2: layer 1’s clock rebuilt on the market’s prices, refitted before every card.

The clock prices each round from two numbers per fight: p0, the chance the fight goes the distance, and the Bayes finish-time curve (when a finish lands). Until 2024 p0 was the bookmakers’ decision price; since (and live) the bookmakers’ method odds are gone and the yearly clock fell back to a history-only fit that sat near 52% while 36-48% of fights went the distance (2026-10-25). v2:

GoesDistanceModel p0 per fight, by source (the scores: research job step 3): Kalshi priced Kalshi’s ‘goes the distance’ card-start price, as it is sportsbook priced logistic regression on logit(price), a Kalshi flag and the history rates (half-life 1 year), training fights weighted with half-life 4 years (its decision prices ran low); history alone where it cannot price no price logistic regression on the clock’s history inputs (P0_FEATURES), training fights weighted with half-life 2 years KoShareModel P(KO | finish): the market’s share (Kalshi or sportsbook) as it is; else a logistic regression on the KO / sub win and got rates (half-life 8 years), women, 5 rounds and division, training fights weighted with half-life 8 years CardClock the Bayes curve refitted on every finish before each card (all history: a recency weighting predicted worse at every half-life), with production’s robust fit (ClockFeatures.fit_curve), priced through ClockFeatures.curve_columns -> m_p0, m_S_1..4, m_clock_S, m_p_dec_now, m_p_finish_round, m_p_dec_prefight (the history-only p0)

Every model is fitted only on fights before the card it prices (the history: a walk card by card from 2006; live: once before the card). Market: the per-fight prices (market_props). Research: data/ufc/cito/assess/job/j03_p0.py, j04_curve.py, j05_clock.py.

Classes

CardClock

Group 5 v2 for one card: the Bayes curve fitted on every finish before date (seed: the date as YYYYMMDD), priced through ClockFeatures.curve_columns with p0.

columns

columns(f: pd.DataFrame, date: pd.Timestamp, rows: pd.DataFrame, p0: pd.Series, p0_history: pd.Series) -> pd.DataFrame

rows (fight_id, round_idx; the card’s) priced: f the fight_table; p0 / p0_history per fight_id.

finishes

finishes(f: pd.DataFrame, before: pd.Timestamp) -> pd.DataFrame

GoesDistanceModel

p0 per fight by source (module docstring).

walk

walk(f: pd.DataFrame, cards: Sequence[pd.Timestamp] | None = None) -> pd.DataFrame

fight_frame rows -> p0 (the rule) and p0_history (m_p_dec_prefight).

HistoryLogit

A logistic regression on features predicting label, fitted on the fights before a card date with each training fight weighted 0.5 ** (years before / half_life) (None: equal); need: the columns a row must have to be trained on or priced (default: the first feature); missing features filled with the training means.

fit

fit(f: pd.DataFrame, before: pd.Timestamp) -> tuple[object, pd.Series] | None

The model and its fill on f’s fights dated before before (None: too few).

predict

predict(fitted: tuple[object, pd.Series], rows: pd.DataFrame) -> np.ndarray

walk

walk(f: pd.DataFrame, cards: Sequence[pd.Timestamp] | None = None) -> np.ndarray

Card by card (every date in f from WALK_FROM unless cards): each card’s fights priced by the model fitted on the fights before it (NaN where it cannot).

KoShareModel

P(KO | finish) per fight: the market’s share where priced, else history (module docstring).

walk

walk(f: pd.DataFrame, cards: Sequence[pd.Timestamp] | None = None) -> pd.DataFrame

Functions

fight_frame

fight_frame(raw: RawData, profiles: pd.DataFrame, market: pd.DataFrame) -> pd.DataFrame

One row per 3/5-round bout since 2001 (ClockFeatures.fight_table): the labels (y_dist: went the distance, on KO / sub / decision results; y_ko: KO vs submission, on finishes), the context, the market (market: fight_id, mkt_p_dist, mkt_ko_share, mkt_source) and the history rates the models read (RecencyRates, A the dataset’s slot). Sorted by date.