f_ES | R Documentation |
The function allows to calculate Expected-shortfall for a given distribution. It takes as parameters alpha (risk level), a distribution and the parameters associated with this distribution. For example, for a normal distribution, the user must enter the mean and the standard deviation. Currently, the function can calculate the Expected-shortfall for the normal distribution and for the skew-t distribution (Azzalini and Capitianio, 2003)
f_ES(alpha, dist, params, accuracy = 1e-05)
alpha |
Numeric argument for Expected-Shortfall, between 0 and 1 |
dist |
String for the type of distribution (gaussian or skew-t) |
params |
Numeric vector containing parameters of the distribution |
accuracy |
Scalar value which regulates the accuracy of the ES (default value 1e-05) |
Numeric value for the expected-shortfall given the distribution and the alpha risk
Azzalini, Adelchi, and Antonella Capitanio. "Distributions generated by perturbation of symmetry with emphasis on a multivariate skew t‐distribution." Journal of the Royal Statistical Society: Series B (Statistical Methodology) 65.2 (2003): 367-389.
Azzalini, Adelchi, and Maintainer Adelchi Azzalini. "Package ‘sn’." The skew-normal and skew-t distributions (2015): 1-3.
f_ES(0.95, "gaussian", params=c(0,1))
f_ES(0.95, "gaussian", params=c(0,1), accuracy=1e-05)
f_ES(0.95, "gaussian", params=c(0,1), accuracy=1e-04)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.