ESst {QRMlib} | R Documentation |
calculates expected shortfall for Student t distribution
ESst(p, df, mu=0, sigma=1, scale=FALSE)
p |
probability level |
df |
degrees of freedom |
mu |
mean |
sigma |
standard deviation |
scale |
should t distribution be scaled to have variance one? |
see page 45 of QRM
expected shortfall
#Set up the quantile probabilities p <- c(0.90,0.95,0.975,0.99,0.995,0.999,0.9999,0.99999,0.999999); sigma <- 0.2*10000/sqrt(250); #Now look at Expected Shortfall for student t with 4 degrees of freedom: ES.t4 <- ESst(p,4,sigma=sigma,scale=TRUE); ESst(c(0.95,0.99),4);