Returns geometric returns.

Share:

Description

This function returns the geometric returns for a given zoo object.

Usage

1
remap.cumprod(z, is.pc = TRUE, is.returns = TRUE, base = 100)

Arguments

z

z is the zoo object returned from phys2eventtime.

is.pc

Logical flag if input is a percentage.

is.returns

Logical flag if input is returns.

base

The base for the cumulative product.

Value

The frame returned has each column replaced by base * the cumulative product of the column.

See Also

phys2eventtime

Examples

1
2
3
4
5
data(StockPriceReturns)
data(SplitDates)
es.results <- phys2eventtime(z=StockPriceReturns, events=SplitDates,width=5)
es.w <- window(es.results$z.e, start=-5, end=+5)
eventtime <- remap.cumprod(es.w, is.pc=FALSE, is.returns=TRUE, base=0)