Return.cumulative | R Documentation |
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)
R |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
geometric |
utilize geometric chaining (TRUE) or simple/arithmetic chaining (FALSE) to aggregate returns, default TRUE |
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
Peter Carl
Bacon, Carl. Practical Portfolio Performance Measurement and Attribution. Wiley. 2004. p. 6
Return.annualized
data(managers)
Return.cumulative(managers[,1,drop=FALSE])
Return.cumulative(managers[,1:8])
Return.cumulative(managers[,1:8],geometric=FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.