[R-SIG-Finance] is there a function that will compute a cumulative return times series

algotr8der algotr8der at gmail.com
Fri May 13 17:54:33 CEST 2011


Do any of you know whether there exists a function that I can use to produce
a cumulative return time series of an xts object (stock price). I have
created my own code to do this but I was wondering if there already exists a
function that does what I want as I would like the resulting object to
remain as a XTS object so I can plot various studies on the same chart.

I have attached an image of a chart that shows the cumulative return time
series of an ETF and its components.


I looked through the 'TTR' package and found very useful functions that
compute running/window SDs, Means, Cov etc...    but was wondering if there
is something similar for cumulative returns.

View this message in context: http://r.789695.n4.nabble.com/is-there-a-function-that-will-compute-a-cumulative-return-times-series-tp3520559p3520559.html
Sent from the Rmetrics mailing list archive at Nabble.com.

More information about the R-SIG-Finance mailing list