Learn R Programming

PerformanceAnalytics (version 2.0.8)

table.DownsideRisk: Downside Risk Summary: Statistics and Stylized Facts

Description

Creates a table of estimates of downside risk measures for comparison across multiple instruments or funds.

Usage

table.DownsideRisk(
  R,
  ci = 0.95,
  scale = NA,
  Rf = 0,
  MAR = 0.1/12,
  p = 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%

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

MAR

Minimum Acceptable Return, in the same periodicity as your returns

p

confidence level for calculation, default p=.99

digits

number of digits to round results to

Author

Peter Carl

See Also

DownsideDeviation
maxDrawdown
VaR
ES

Examples

Run this code

data(edhec)
table.DownsideRisk(edhec, Rf=.04/12, MAR =.05/12, p=.95)

result=t(table.DownsideRisk(edhec, Rf=.04/12, MAR =.05/12, p=.95))

 # don't test on CRAN, since it requires Suggested packages

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="Downside Risk Statistics")

Run the code above in your browser using DataLab