def compound(r):
    '\n    returns the result of compounding the set of returns in r\n    '
    return np.expm1(np.log1p(r).sum())
returns the result of compounding the set of returns in r
def compound(r):
    '\n    \n    '
    return np.expm1(np.log1p(r).sum())