Learn R Programming

PerformanceAnalytics (version 0.9.5)

cum.utils: wrapper to calculate cumprod on all columns in a matrix

Description

calculate cumulative values for the observation series given, including multicolumn extensions to cummax and cumprod ll{ cummax.column cumulative maxima by column, useful for drawdowns cumprod.column cumulative product by column, useful for compound returns }

A prior version of thesefunctions included specific NA handling. This was removed due to a conflict with the general cumulative functions in the R core. Please be aware that you may have issues with series of different lengths, and may need to explicitly handle NAs as a result.

Usage

cumprod.column(x)
cummax.column(x)

Arguments

x
a vector, matrix, data frame, timeSeries or zoo object of observations

Value

  • transformed matrix of cumprod's or cummax's

See Also

cumprod cummax