3
0
Fork 0
mirror of https://github.com/nanoy42/coope synced 2024-05-08 10:12:23 +00:00
coope/coopeV3/utils.py

8 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)