Description Usage Arguments Details Value Author(s) See Also Examples
View source: R/pub01_utilityFuncs.R
Compute cumulated financial series, e.g. prices or indexes, from financial returns.
1 | WealthIndex(rtn, geometric = TRUE)
|
rtn |
return series, an object of class timeSeries,zoo or xts |
geometric |
get geometric (TRUE) or simple (FALSE) returns, default TRUE |
This is a wrapped function of function cumulated
in package timeSeries
which is used for timeSeries objects
the wealth index series of the same class of rtn
Ruifei.Yin
1 2 3 4 | rtn.long <- zoo(rnorm(100,0.001,0.02),as.Date("2010-01-01")+1:100)
rtn.short <- rtn.long + rnorm(100,-0.001,0.003)
rtn <- merge(rtn.long,rtn.short)
prices <- WealthIndex(rtn)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.