Add margin
This commit is contained in:
parent
4bc0eec053
commit
bef01d5020
1 changed files with 3 additions and 0 deletions
3
margin.py
Normal file
3
margin.py
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue