1
$\begingroup$

I once read a R example of computing Value-at-Risk and expected shortfall as follows

p = c(0.5,0.1,0.05,0.025,0.01,0.001)

VaR = qnorm(p)

ES = dnorm(qnorm(p))/p

I am not sure why the expected shortfall can be calculated this way?

$\endgroup$
4
  • $\begingroup$ This appears to have little or nothing to do with conventional meanings of VaR. What source are you using for this R code? $\endgroup$
    – whuber
    Commented Jun 19, 2014 at 14:26
  • $\begingroup$ The book of Financial Risk Forecasting, written by Jon Danielsson $\endgroup$
    – user3125
    Commented Jun 19, 2014 at 15:14
  • $\begingroup$ We need an accurate quotation and a clear description of the context, because clearly something is amiss here. $\endgroup$
    – whuber
    Commented Jun 19, 2014 at 15:47
  • $\begingroup$ Are you talking about the code just before section 5.4? You might like to include the couple of lines of mathematics on which it is based, and define the variables.. $\endgroup$
    – Glen_b
    Commented Jun 20, 2014 at 3:51

0

Browse other questions tagged or ask your own question.