Browse Source

Add overround helpers

betbetter 1 week ago
parent
commit
9006adaf87
1 changed files with 7 additions and 0 deletions
  1. 7 0
      overround.py

+ 7 - 0
overround.py

@@ -0,0 +1,7 @@
+def overround(prices):
+    """Sum of implied chances; 1.05 = 5% margin."""
+    return sum(1.0 / p for p in prices)
+
+def fair_prices(prices):
+    o = overround(prices)
+    return [p * o for p in prices]