remap.cumprod: Cumulative geometric values

Description Usage Arguments Value Author(s) See Also Examples

View source: R/remap.cumprod.R

Description

This function computes the cumulative geometric values for a given zoo object.

Usage

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

Arguments

z

a zoo object indexed by event time, typically by the “z.e” component obtained from “phys2eventtime” function.

is.pc

‘logical’, whether input is a percentage. Default value set to ‘FALSE’.

is.returns

‘logical’, whether input is a returns series.

base

an integer specifying the base for cumulative product.

Value

A zoo object with the cumulative product for each series, representing a buy-hold return estimate.

Author(s)

Chirag Anand, Vikram Bahure, Vimal Balasubramaniam

See Also

phys2eventtime

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
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 = TRUE,
                           is.returns = TRUE,
                           base = 100)

print(eventtime[as.character(-3:3), ])

nipfpmf/eventstudies documentation built on June 7, 2020, 3:57 p.m.