MichaelJMath
7/20/2017 - 2:25 AM

Compute price from returns Indexed to 100 (need to add code to add the initial value of 100).

Compute price from returns Indexed to 100 (need to add code to add the initial value of 100).

def compute_price_from_returns(returns):
    """Compute a price string indexed to 100
    given a series of returns"""
    returns = 1 + (returns / 100.)
    return returns.cumprod()