Returns a basic set of statistics that match the period of the data passed in (e.g., monthly returns will get monthly statistics, daily will be daily stats, and so on)

table.Stats(R, ci = 0.95, digits = 4)

Arguments

R

an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns

ci

confidence interval, defaults to 95%

digits

number of digits to round results to

Details

This was created as a way to display a set of related statistics together for comparison across a set of instruments or funds. Careful consideration to missing data or unequal time series should be given when intepreting the results.

Examples

data(edhec) table.Stats(edhec[,1:3])
#> Convertible Arbitrage CTA Global Distressed Securities #> Observations 152.0000 152.0000 152.0000 #> NAs 0.0000 0.0000 0.0000 #> Minimum -0.1237 -0.0543 -0.0836 #> Quartile 1 0.0009 -0.0115 -0.0002 #> Median 0.0092 0.0052 0.0097 #> Arithmetic Mean 0.0064 0.0065 0.0080 #> Geometric Mean 0.0062 0.0062 0.0078 #> Quartile 3 0.0146 0.0227 0.0182 #> Maximum 0.0611 0.0691 0.0504 #> SE Mean 0.0016 0.0020 0.0015 #> LCL Mean (0.95) 0.0032 0.0025 0.0050 #> UCL Mean (0.95) 0.0096 0.0105 0.0109 #> Variance 0.0004 0.0006 0.0003 #> Stdev 0.0200 0.0251 0.0183 #> Skewness -2.6837 0.1345 -1.6746 #> Kurtosis 16.1782 -0.1133 6.4390
t(table.Stats(edhec))
#> Observations NAs Minimum Quartile 1 Median #> Convertible Arbitrage 152 0 -0.1237 0.0009 0.0092 #> CTA Global 152 0 -0.0543 -0.0115 0.0052 #> Distressed Securities 152 0 -0.0836 -0.0002 0.0097 #> Emerging Markets 152 0 -0.1922 -0.0114 0.0136 #> Equity Market Neutral 152 0 -0.0587 0.0024 0.0063 #> Event Driven 152 0 -0.0886 0.0000 0.0102 #> Fixed Income Arbitrage 152 0 -0.0867 0.0023 0.0060 #> Global Macro 152 0 -0.0313 -0.0036 0.0062 #> Long/Short Equity 152 0 -0.0675 -0.0037 0.0102 #> Merger Arbitrage 152 0 -0.0544 0.0018 0.0077 #> Relative Value 152 0 -0.0692 0.0018 0.0084 #> Short Selling 152 0 -0.1340 -0.0254 -0.0002 #> Funds of Funds 152 0 -0.0618 -0.0033 0.0068 #> Arithmetic Mean Geometric Mean Quartile 3 Maximum #> Convertible Arbitrage 0.0064 0.0062 0.0146 0.0611 #> CTA Global 0.0065 0.0062 0.0227 0.0691 #> Distressed Securities 0.0080 0.0078 0.0182 0.0504 #> Emerging Markets 0.0082 0.0075 0.0289 0.1230 #> Equity Market Neutral 0.0060 0.0060 0.0101 0.0253 #> Event Driven 0.0076 0.0075 0.0186 0.0442 #> Fixed Income Arbitrage 0.0042 0.0041 0.0100 0.0365 #> Global Macro 0.0077 0.0075 0.0165 0.0738 #> Long/Short Equity 0.0078 0.0075 0.0214 0.0745 #> Merger Arbitrage 0.0068 0.0067 0.0137 0.0272 #> Relative Value 0.0067 0.0066 0.0145 0.0392 #> Short Selling 0.0042 0.0027 0.0359 0.2463 #> Funds of Funds 0.0059 0.0058 0.0152 0.0666 #> SE Mean LCL Mean (0.95) UCL Mean (0.95) Variance Stdev #> Convertible Arbitrage 0.0016 0.0032 0.0096 0.0004 0.0200 #> CTA Global 0.0020 0.0025 0.0105 0.0006 0.0251 #> Distressed Securities 0.0015 0.0050 0.0109 0.0003 0.0183 #> Emerging Markets 0.0031 0.0021 0.0144 0.0015 0.0386 #> Equity Market Neutral 0.0007 0.0046 0.0074 0.0001 0.0090 #> Event Driven 0.0015 0.0047 0.0106 0.0003 0.0184 #> Fixed Income Arbitrage 0.0011 0.0020 0.0065 0.0002 0.0142 #> Global Macro 0.0014 0.0049 0.0104 0.0003 0.0170 #> Long/Short Equity 0.0018 0.0042 0.0113 0.0005 0.0222 #> Merger Arbitrage 0.0009 0.0050 0.0086 0.0001 0.0112 #> Relative Value 0.0011 0.0046 0.0088 0.0002 0.0132 #> Short Selling 0.0045 -0.0047 0.0130 0.0030 0.0551 #> Funds of Funds 0.0015 0.0030 0.0088 0.0003 0.0182 #> Skewness Kurtosis #> Convertible Arbitrage -2.6837 16.1782 #> CTA Global 0.1345 -0.1133 #> Distressed Securities -1.6746 6.4390 #> Emerging Markets -1.2575 5.1026 #> Equity Market Neutral -2.7476 17.4073 #> Event Driven -1.7184 6.1131 #> Fixed Income Arbitrage -3.7072 19.5102 #> Global Macro 0.8153 1.7658 #> Long/Short Equity -0.3818 1.2465 #> Merger Arbitrage -1.6474 5.7932 #> Relative Value -2.1019 9.1646 #> Short Selling 0.5778 2.2486 #> Funds of Funds -0.4594 3.2993
result=t(table.Stats(edhec)) require("Hmisc")
#> Loading required package: Hmisc
#> Warning: there is no package called ‘Hmisc’
textplot(format.df(result, na.blank=TRUE, numeric.dollar=FALSE, cdec=c(rep(1,2),rep(3,14))), rmar = 0.8, cmar = 1.5, max.cex=.9, halign = "center", valign = "top", row.valign="center", wrap.rownames=10, wrap.colnames=10, mar = c(0,0,3,0)+0.1)
#> Error in format.df(result, na.blank = TRUE, numeric.dollar = FALSE, cdec = c(rep(1, 2), rep(3, 14))): could not find function "format.df"
title(main="Statistics for EDHEC Indexes")
#> Error in title(main = "Statistics for EDHEC Indexes"): plot.new has not been called yet