Table of Annualized Return, Annualized Std Dev, and Annualized Sharpe
table.AnnualizedReturns(R, scale = NA, Rf = 0, geometric = TRUE, digits = 4)
R | an xts, vector, matrix, data frame, timeSeries or zoo object of asset returns |
---|---|
scale | number of periods in a year (daily scale = 252, monthly scale = 12, quarterly scale = 4) |
Rf | risk free rate, in same period as your returns |
geometric | utilize geometric chaining (TRUE) or simple/arithmetic chaining (FALSE) to aggregate returns, default TRUE |
digits | number of digits to round results to |
Return.annualized
StdDev.annualized
SharpeRatio.annualized
data(managers) table.AnnualizedReturns(managers[,1:8])#> HAM1 HAM2 HAM3 HAM4 HAM5 HAM6 EDHEC LS EQ #> Annualized Return 0.1375 0.1747 0.1512 0.1215 0.0373 0.1373 0.1180 #> Annualized Std Dev 0.0888 0.1272 0.1265 0.1843 0.1584 0.0825 0.0708 #> Annualized Sharpe (Rf=0%) 1.5491 1.3732 1.1955 0.6592 0.2356 1.6642 1.6657 #> SP500 TR #> Annualized Return 0.0967 #> Annualized Std Dev 0.1500 #> Annualized Sharpe (Rf=0%) 0.6449require("Hmisc")#>#> Warning: there is no package called ‘Hmisc’result = t(table.AnnualizedReturns(managers[,1:8], Rf=.04/12)) 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)#> Error in format.df(result, na.blank = TRUE, numeric.dollar = FALSE, cdec = c(3, 3, 1)): could not find function "format.df"title(main="Annualized Performance")#> Error in title(main = "Annualized Performance"): plot.new has not been called yet