3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-06-02 13:21:48 +00:00
coope/coopeV3/utils.py

8 lines
171 B
Python
Raw Normal View History

2019-06-23 12:53:18 +00:00
import math
def compute_price(price, a, b, c, alpha):
if price < a:
return price * (a + b * math.exp(-c/(price-alpha)**2))
else:
return price * a