INNER CODE UNIT · Python
returns_to_prices
dmarienko/QuantTradingResearch · models/helpers.py:31
def returns_to_prices(rets):
return (rets + 1).cumprod() - 1
def norm(x):
return x / x.iloc[0]
class Model:
"""
Abstract class for any tracking models
"""
def __init__(self, description=None):
self.description = description
def fit(self, x, y, **kwargs):
return self