Learn R Programming

eventstudies (version 1.0)

remap.cumprod: Returns geometric returns.

Description

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

Usage

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

Arguments

Value

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

See Also

phys2eventtime

Examples

Run this code
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)

Run the code above in your browser using DataLab