
Last chance! 50% off unlimited learning
Sale ends in
This is a useful function for calculating cumulative return over a period of time, say a calendar year. Can produce simple or geometric return.
Return.cumulative(R, geometric = TRUE)
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns
utilize geometric chaining (TRUE) or simple/arithmetic chaining (FALSE) to aggregate returns, default TRUE
product of all the individual period returns
Bacon, Carl. Practical Portfolio Performance Measurement and Attribution. Wiley. 2004. p. 6
# NOT RUN {
data(managers)
Return.cumulative(managers[,1,drop=FALSE])
Return.cumulative(managers[,1:8])
Return.cumulative(managers[,1:8],geometric=FALSE)
# }
Run the code above in your browser using DataLab