I have this dataframe
Poloniex_DOGE_BTC Poloniex_XMR_BTC Daily_rets perc_ret
172 0.006085 -0.000839 0.003309 0
173 0.006229 0.002111 0.005135
you just cannot simply add them all by using cumsum
for example, if you have array [1.1, 1.1], you supposed to have 2.21, not 2.2
import numpy as np
# daily return:
df['daily_return'] = df['close'].pct_change()
# calculate cumluative return
df['cumluative_return'] = np.exp(np.log1p(df['daily_return']).cumsum())