WealthIndex: WealthIndex

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/pub01_utilityFuncs.R

Description

Compute cumulated financial series, e.g. prices or indexes, from financial returns.

Usage

1
WealthIndex(rtn, geometric = TRUE)

Arguments

rtn

return series, an object of class timeSeries,zoo or xts

geometric

get geometric (TRUE) or simple (FALSE) returns, default TRUE

Details

This is a wrapped function of function cumulated in package timeSeries which is used for timeSeries objects

Value

the wealth index series of the same class of rtn

Author(s)

Ruifei.Yin

See Also

Returns,cumulated

Examples

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)

raphael210/QUtility documentation built on May 26, 2019, 11:05 p.m.