Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

table.RollingPeriods

Rolling Periods Summary: Statistics and Stylized Facts


Description

A table of estimates of rolling period return measures

Usage

table.RollingPeriods(
  R,
  periods = subset(c(12, 36, 60), c(12, 36, 60) < length(as.matrix(R[, 1]))),
  FUNCS = c("mean", "sd"),
  funcs.names = c("Average", "Std Dev"),
  digits = 4,
  ...
)

table.TrailingPeriodsRel(
  R,
  Rb,
  periods = subset(c(12, 36, 60), c(12, 36, 60) < length(as.matrix(R[, 1]))),
  FUNCS = c("cor", "CAPM.beta"),
  funcs.names = c("Correlation", "Beta"),
  digits = 4,
  ...
)

Arguments

R

an xts, 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)

FUNCS

list of functions to apply the rolling period to

funcs.names

vector of function names used for labeling table rows

digits

number of digits to round results to

...

any other passthru parameters for functions specified in FUNCS

Rb

an xts, vector, matrix, data frame, timeSeries or zoo object of index, benchmark, portfolio, or secondary asset returns to compare against

Author(s)

Peter Carl

See Also

Examples

data(edhec)
table.TrailingPeriods(edhec[,10:13], periods=c(12,24,36))

result=table.TrailingPeriods(edhec[,10:13], periods=c(12,24,36))
require("Hmisc")
textplot(format.df(result, na.blank=TRUE, numeric.dollar=FALSE, 
                   cdec=rep(3,dim(result)[2])), rmar = 0.8, cmar = 1.5,  
                   max.cex=.9, halign = "center", valign = "top", row.valign="center", 
                   wrap.rownames=15, wrap.colnames=10, mar = c(0,0,3,0)+0.1)
title(main="Trailing Period Statistics")

PerformanceAnalytics

Econometric Tools for Performance and Risk Analysis

v2.0.4
GPL-2 | GPL-3
Authors
Brian G. Peterson [cre, aut, cph], Peter Carl [aut, cph], Kris Boudt [ctb, cph], Ross Bennett [ctb], Joshua Ulrich [ctb], Eric Zivot [ctb], Dries Cornilly [ctb], Eric Hung [ctb], Matthieu Lestel [ctb], Kyle Balkissoon [ctb], Diethelm Wuertz [ctb], Anthony Alexander Christidis [ctb], R. Douglas Martin [ctb], Zeheng 'Zenith' Zhou [ctb], Justin M. Shea [ctb]
Initial release
2020-02-05

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.