betting_combat.rounds.backtest.stop
The order bets are decided in and the daily stop’s P&L, shared by Book and capacity’s
run (research ufc/modeling/execution.py: decision_order, fight_settlement,
SettledStop; fixed 2026-09-30).
ORDER events by decision time (t_entry), ties by (fight_id, round_idx, market, side): a
unique key, so no tie is left to a sort (the research’s unstable sort on t_entry let
pandas decide which of two bets at one minute took the fight’s room first)
SETTLED a fight settles at the latest t_end of its events: the later of the winner
market’s snap (the minute it priced the result; meta.add_lifetimes) and the
fight’s last decision time (a round that started means the fight had not ended)
STOP the daily stop reads SETTLED P&L only: a bet’s P&L counts for a decision at time t
on another fight of its card once its fight settled at or before t, and never for
later decisions on its own fight (the research counted every bet’s P&L the moment it
was placed, including a distance bet on a fight still going: look-ahead)
Classes
SettledStop
The P&L the daily stop reads, per card: bets are added as they are placed with their fight’s settlement time and count once it has passed (see the module doc).
add
add(card: Any, fight: Any, settle: Any, pnl: float) -> Nonepnl
pnl(card: Any, fight: Any, t: Any) -> floatThe card’s settled P&L for a decision at time t on fight (its own bets
excluded). Calls must come in time order (bets settle as t passes them).
Functions
decision_order
decision_order(events: pd.DataFrame) -> pd.DataFrameThe events in the order they are decided (:data:EVENT_ORDER, a unique key).
fight_settlement
fight_settlement(events: pd.DataFrame) -> pd.SeriesPer event (aligned to events), when its fight settles: the latest t_end of the
fight’s events.