This function gives the cumulative total of the values ( in level or percentage form ).

Share:

Description

This function gives the cumulative total of the values.

Usage

1
remap.cumsum(z, is.pc = TRUE, base = 0)

Arguments

z

z is the zoo object returned from phys2eventtime.

is.pc

is.pc is a logical flag to indicate that the values are in percentage form.

base

base for the cumulative sum (default: base = 0).

Value

The frame returned has each column replaced by the cumulative sum of the column.

See Also

eventDays, eventstudyData, 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.cumsum(es.w, is.pc=FALSE, base=0)