Add margin

This commit is contained in:
betbetter 2026-11-14 01:16:53 +01:00
parent 4bc0eec053
commit bef01d5020

3
margin.py Normal file
View file

@ -0,0 +1,3 @@
def margin(prices):
"""Bookmaker margin from decimal prices (0.05 = 5%)."""
return sum(1.0 / p for p in prices) - 1.0