calculate a compounded (geometric) cumulative return
Source:R/Return.cumulative.R
Return.cumulative.RdThis is a useful function for calculating cumulative return over a period of time, say a calendar year. Can produce simple or geometric return.
Details
product of all the individual period returns
$$(1+r_{1})(1+r_{2})(1+r_{3})\ldots(1+r_{n})-1=prod(1+R)-1$$
Note that this function calculates the total return over the entire period as a
single scalar value. If you need the time series of cumulative wealth (i.e. a
wealth index), you should use cumprod(1+R) or cumprod(1+R)-1.
References
Bacon, Carl. Practical Portfolio Performance Measurement and Attribution. Wiley. 2004. p. 6
For time series of cumulative wealth, see:
cumprod
chart.CumReturns
Examples
data(managers)
Return.cumulative(managers[, 1, drop = FALSE])
#> HAM1
#> Cumulative Return 3.126671
Return.cumulative(managers[, 1:8])
#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6
#> Cumulative Return 3.126671 4.348599 3.706732 2.52944 0.2650197 0.9858675
#> EDHEC LS EQ SP500 TR
#> Cumulative Return 2.051197 1.761619
Return.cumulative(managers[, 1:8], geometric = FALSE)
#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6 EDHEC LS EQ SP500 TR
#> Cumulative Return 1.4682 1.7679 1.643 1.4542 0.3148 0.7075 1.1454 1.143825