Description Usage Arguments Author(s) References See Also Examples
Table of Mean absolute difference, Monthly standard deviation and annualised standard deviation
1 | table.Variability(R, scale = NA, geometric = TRUE, digits = 4)
|
R |
an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
geometric |
utilize geometric chaining (TRUE) or simple/arithmetic chaining (FALSE) to aggregate returns, default TRUE |
scale |
number of periods in a year (daily scale = 252, monthly scale = 12, quarterly scale = 4) |
digits |
number of digits to round results to |
Matthieu Lestel
Carl Bacon, Practical portfolio performance measurement and attribution, second edition 2008 p.65
StdDev.annualized
MeanAbsoluteDeviation
1 2 3 4 5 6 7 8 9 10 11 | data(managers)
table.Variability(managers[,1:8])
require("Hmisc")
result = t(table.Variability(managers[,1:8]))
textplot(format.df(result, na.blank=TRUE, numeric.dollar=FALSE, cdec=c(3,3,1)),
rmar = 0.8, cmar = 2, max.cex=.9, halign = "center", valign = "top",
row.valign="center", wrap.rownames=20, wrap.colnames=10,
col.rownames=c("red", rep("darkgray",5), rep("orange",2)), mar = c(0,0,3,0)+0.1)
title(main="Portfolio variability")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.