betting_combat.features.price_features
price_features — what a market’s price has done up to each 30-second block’s end (Sam 2026-11-19): ONE function for any price path of a fight - Kalshi’s real block quotes or a simulated draw’s (the same columns in, the same columns out), so a row’s price features do not depend on where its prices came from.
block_price_features per market m (winner / distance / finish_round / ko), from its bid / ask at each block's end ({m}_bid, {m}_ask on bout_id, round, block - a fight's blocks in order: each round's break -2, -1, then its blocks), as of the block's end: pxf_{m}_bid / _ask / _mid / _spread the quote, its middle and its width pxf_{m}_chg_blk / _chg_3 the middle's change since the block before / three blocks before pxf_{m}_chg_bell since the last bell (a round's block: its bell, the -1's end; a break's block: the round before's bell) pxf_{m}_chg_fight since the fight's first quoted block pxf_{m}_range_rnd the round's (its break's) high less low so far pxf_{m}_vol3 the spread of its last three changes pxf_{m}_spread_vs_fight the spread less the fight's median spread so farThe same arithmetic as features.full_blocks.market_features (the real venues’ columns, checked equal on Kalshi’s finish-round market 11-19). A simulated path is built from how the round ended (models.block_price_simulator): whether a model may lean on these on history is the test’s to say - train on history, score the real cards real and simulated.
Functions
block_price_features
block_price_features(Q: pd.DataFrame, markets: tuple[str, ...] = MARKETS) -> pd.DataFrameQ: one price path a fight - bout_id, round, block and each market’s {m}_bid / {m}ask at the block’s end (blank: no
quote); every block row of the fight on the grid. Returns Q’s keys (its order) with the pxf columns (module doc).