3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-11-22 03:13:12 +00:00
coope/coopeV3/utils.py
2019-06-23 15:31:55 +02:00

7 lines
206 B
Python

import math
def compute_price(price, a, b, c, alpha):
if price < alpha:
return float(price) * (1 + float(a) + float(b) * math.exp(-c/(price-alpha)**2))
else:
return price * (1 + a)