## data -
# Microsoft Data:
setRmetricsOptions(myFinCenter = "GMT")
MSFT = as.timeSeries(data(msft.dat))[1:10, "Close"]
MSFT
## cumulated -
# Index series to 100:
MSFT = 100 * MSFT/as.numeric(MSFT[1,1])
MSFT
MSFT.RET = returns(MSFT, method = "discrete")
cumulated(MSFT.RET, method = "discrete")
Run the code above in your browser using DataLab