Win expectancy (wexp)
The pregame win-expectancy harness for the NFL and college football: market oracles (vig-removed closing probabilities), baselines, rating engines (Elo, ridge, Glickman-Stern), a vintage-keyed feature store that joins each game to the vintage for its week, the walk-forward backtest, scoring, and post-game deserved-win estimates.
Models and calculators
| Function | Summary |
|---|---|
| EloConfig | Tunable Elo parameters (all seeds, none sacred). |
| GSConfig | Glickman-Stern state-space tunables (Axis A6; all seeds, none sacred). |
| VariantConfig | One point in the variation matrix (validated on construction). |
| VintageStore | In-memory registry of vintage-keyed feature frames. |
| append_results | Append result rows to the append-only leaderboard parquet. |
| baseline_probs | Append baseline probability columns to a market-oracle frame. |
| brier_score | Mean squared error between predicted probabilities and binary outcomes. |
| build_cfb_market_oracle | Load the cfb_line_odds archive + ESPN schedules and build the CFB oracle. |
| build_nfl_market_oracle | Load nflverse schedules and build the NFL market oracle. |
| build_predictor | Dispatch a variant config to its implemented week predictor. |
| calibration_table | Bucket predicted probabilities into bins and compare to actual outcome rates. |
| carry_forward_weights | How much of last season's metrics to still believe, by team and week. |
| cfb_continuity_shifts | Compile CFB talent + returning production into Elo prior shifts (Axis D3). |
| cfb_drive_deltas | Per-drive EP deltas from play-by-play (the shared drive substrate). |
| cfb_drive_ep_responses | Per team-game drive-EP efficiency from play-by-play (both sides rated). |
| cfb_market_oracle_from_lines | Build the CFB market oracle from the cfb_line_odds archive + schedules. |
| closing_line_value | Mean closing line value captured by betting the model's disagreements. |
| devig_multiplicative | Remove vig by normalizing raw implied probabilities to sum to 1. |
| devig_shin | Remove vig with Shin's method (insider-trading model). |
| ece | Expected calibration error: n-weighted mean |mean_pred - mean_actual| per bin. |
| elo_predictor | Wrap the margin-Elo engine (Axis A1) as a week predictor. |
| elo_ratings | Walk games chronologically and emit pre-game Elo ratings + P(home). |
| enumerate_variants | Generate the pruned axis cross-product. |
| favorite_bucket_table | FPI-style calibration buckets from the favorite's perspective. |
| glickman_stern_predictor | Wrap the Glickman-Stern (1998) Kalman filter as a week predictor. |
| log_loss_score | Binary cross-entropy loss between predicted probabilities and outcomes. |
| logit_blend | Blend two probabilities in logit space (70/30 by default). |
| mae | Mean absolute error between two arrays. |
| moneyline_pair_prob | Vig-removed home win probability from a two-way American moneyline pair. |
| net_vintages_view | Adapt a net-rating vintage table to the ratings_predictor contract. |
| nfl_market_oracle_from_schedule | Build the NFL market oracle from an nflverse schedule frame. |
| postgame_we | Deserved-win probability per game from per-drive EP deltas. |
| prob_from_american | Convert an American moneyline price to its raw implied probability. |
| prob_from_decimal | Convert a decimal (European) price to its raw implied probability. |
| ratings_predictor | Wrap a registered ratings vintage table as a week predictor. |
| response_ridge_vintages | Weekly opponent-adjusted ridge on per-team-game responses (off + def). |
| result_rows | Build long-format result rows (one row per metric) for the leaderboard. |
| ridge_margin_vintages | Build per-week opponent-adjusted ridge rating vintages from an oracle frame. |
| run_backtest | Walk an oracle frame forward week by week and score the predictions. |
| score_baselines | Score every p_* baseline column per season and pooled. |
| score_probs | Score one probability column per season and pooled into result rows. |
| sos_sor_vintages | As-of strength of schedule + strength of record, per team per week. |
| spearman_corr | Spearman rank correlation between two arrays. |
| spread_to_prob | Map an expected home margin to a home win probability via a normal CDF. |
| variant_hash | Stable 12-hex identifier for a variant config. |
| winner_accuracy | Fraction of games where the model's favorite (p >= 0.5) won. |