Skip to content

calculations.matches_1_odds_prematch

Captures the first- and last-seen prematch decimal odds (i.e. is_in_play = 0) for home/draw/away. One row per event.

flowchart LR
od[/sources.odds/] --> me[/calculations.matches_1_odds_prematch/]
me --> m11[/matches_11_probability/]
me --> m15[/matches_15_strat_expected_value/]
me --> m16[/matches_16_strat_kelly_criterion/]
me --> m17[/matches_17_strat_predicted/]
me --> m18[/matches_18_strat_bet/]
me --> mart[/mart.matches/]
click od "/sources/odds/" "Open"
click m11 "/calculations/matches_11_probability/" "Open"
click m15 "/calculations/matches_15_strat_expected_value/" "Open"
click m16 "/calculations/matches_16_strat_kelly_criterion/" "Open"
click m17 "/calculations/matches_17_strat_predicted/" "Open"
click m18 "/calculations/matches_18_strat_bet/" "Open"
click mart "/mart/matches/" "Open"
ColumnDescriptionFormula
event_idBet365 event identifier.passthrough
event_dateEvent date.passthrough
event_partition_keyClickHouse partition key.passthrough
odds_prematch_first_homeEarliest prematch home odd.first_value(home_odd) over (partition by event_id order by odd_add_time)
odds_prematch_last_homeLatest prematch home odd.first_value(home_odd) over (partition by event_id order by odd_add_time desc)
odds_prematch_first_drawEarliest prematch draw odd.first_value(draw_odd) over (partition by event_id order by odd_add_time)
odds_prematch_last_drawLatest prematch draw odd.first_value(draw_odd) over (partition by event_id order by odd_add_time desc)
odds_prematch_first_awayEarliest prematch away odd.first_value(away_odd) over (partition by event_id order by odd_add_time)
odds_prematch_last_awayLatest prematch away odd.first_value(away_odd) over (partition by event_id order by odd_add_time desc)

Filtered to is_in_play = 0 and home_odd is not null before the window calculation.