function to compute the alpha-Expected Shortfall of a vector.
expectedShortfall(x, alpha = 0.01, sup = F, ...)
a numeric vector. The vector from which to compute the expected shortfall.
a numeric value. The alpha-Expected Shortfall, must take values
between 0 and 1. Please note that alpha
represents the mass lying below the alpha
quantile of x
in the case sup = FALSE
or the mass lying above the 1-alpha
quantile of x
in the other case sup = TRUE
a logical value. If TRUE
the function returns the upper
expected shortfall and otherwise the lower. Default is set to FALSE
.
additional parameters.
a numeric value. The expected shortfall.