Usage
table.RollingPeriods(R,
periods = subset(c(3, 6, 9, 12, 18, 24, 36, 48),c(3, 6, 9, 12, 18, 24, 36, 48) < length(as.matrix(R[,1]))),
scale = 12, rf = 0,
FUNCS = c("mean", "sd"),
digits = 4,
...)
Arguments
R
a vector, matrix, data frame, timeSeries or zoo object of asset returns
periods
number of periods to use as rolling window(s), subset of c(3, 6, 9, 12, 18, 24, 36, 48)
rf
risk free rate, in same period as your returns
scale
number of periods in a year (daily scale = 252, monthly scale = 12, quarterly scale = 4)
FUNCS
list of functions to apply the rolling period to
digits
number of digits to round results to
...
any other passthru parameters