evidence / Calibration & market
The Devig Stack -- market math from scratch, used as the yardstick I grade against
I implemented four de-vig methods from scratch -- including the Shin (1992) insider-trading model via a numerically stable bisection solver -- wired them into production, and then used the devigged closing line as the BENCHMARK MY OWN MODEL IS GRADED AGAINST. This is not a marketing prop ("look, I know Shin"): it is the yardstick my model is graded against: it TRAILS the devigged close on MLB moneyline and soccer O/U 2.5, and on NBA moneyline the interval includes zero, so I cannot tell. The single truth-source for any figure below is docs/JOB_EVIDENCE_PACKET.md; edge_claimed = False throughout and no dollar, ROI, or edge figure appears anywhere on this page.
strongest single receipt
the claim
A vigged sportsbook price is not a probability -- it carries the book's margin (the overround). To grade a forecaster against "what the market really thinks" you first have to strip that vig honestly. So src/prediction/devig.py implements four methods from scratch and dispatches between them. Formulas as quoted in method/DEVIG_METHODS.md, with pi_i = 1 / decimal price summing to S > 1 (the overround):
- proportional (alias additive) -- p_i = pi_i / S - multiplicative -- find k with sum_i pi_i^k = 1 (bisection); p_i = pi_i^k - power -- p_i = pi_i^(1/n) / sum_j pi_j^(1/n), n = number of outcomes by default - shin (Shin 1992) -- find z in [0, 1) with sum_i p_i(z) = 1 (bisection), where p_of_z(z, q) = (sqrt(z*z + 4*(1 - z)*q*q / s) - z) / (2*(1 - z))
Which method the headline rows use. Proportional is the primary method on the main pregame rows (MLB moneyline and soccer O/U 2.5); Shin is the sensitivity check. For NBA moneyline both are reported, and the headline row the verdict sentence cites is the Shin one, with the proportional row beside it (docs/papers/PREGAME_VS_CLOSE_2026.md sections 3.2 and 4.1). Multiplicative and power are not used in any headline row.
All four are pure functions over probabilities (with American-odds converters), the library dispatcher devig(vigged, method="shin") and POST /api/devig default to shin, and the code is covered by tests. The point is not that the code exists; it is what it grades against.
receipts
| claim | committed artifact |
|---|---|
| Four devig methods from scratch; Shin via stable bisection on `z` | src/prediction/devig.py |
| Production-wired, defaults to `shin` | api/devig_router.py (POST /api/devig, method="shin" default) |
| Devig unit tests + router tests | tests/test_devig.py, tests/test_devig_router.py |
| Devigged close as the graded yardstick (MATCH/TRAILS) | scripts/platformkit/beat_the_close_scoreboard.py |
| Consolidated candidate-REJECT scoreboard | scripts/platformkit/edge_hunt_scoreboard.py |
| Recorded MATCH/TRAILS table + full write-up | docs/MARKET_EFFICIENCY_PROOF.md |
| Leak-free gate the scoring rides on | scripts/platformkit/eval_gate/walkforward.py, scripts/platformkit/eval_gate/dm_test.py |
| Committed end-to-end proof fixture (private corpora absent on clone) | tests/fixtures/proof/ |
| Honesty truth-source for every number | docs/JOB_EVIDENCE_PACKET.md (rows 81, 82, 87) |
why this matters
Anyone can call a devig library. The hire signal is what the devig is FOR: I built the market math from first principles, reported a second de-vig method as a sensitivity check, and then pointed it AT MY OWN FORECASTER -- making the devigged close the benchmark I am graded against rather than a number I advertise beating. The result: it TRAILS the devigged close on MLB moneyline and soccer O/U 2.5, and on NBA moneyline the interval includes zero, so I cannot tell. Nothing beats the close pregame, and I copied that verdict out without softening it. The instrument that proves it -- honest de-vig plus a leak-free gate -- is the credential.
edge_claimed = False everywhere. Every number is Brier / RMSE / row-count vs a real out-of-sample corpus, never a dollar figure. Retracted measurement artifacts appear only in [JOB_EVIDENCE_PACKET.md](https://github.com/neeljshah/court-vision/blob/master/docs/JOB_EVIDENCE_PACKET.md), never on this page.
reproduce
# devig math + router behaviour (runs on any clone)
python -m pytest tests/test_devig.py tests/test_devig_router.py -q
# pregame baselines vs the close via the committed fixture (proves the pipeline end-to-end)
python -m scripts.platformkit.beat_the_close_scoreboard --corpus tests/fixtures/proof
# consolidated market-efficiency / candidate-REJECT scoreboard (recorded table; <60s)
python -m scripts.platformkit.edge_hunt_scoreboardThis site reports calibration and sharpness only, never a dollar edge, ROI, or bankroll result. An honest null is a success.