View source: R/risk_measures.R
| est_es | R Documentation |
The Expected Shortfall at level \alpha is defined as the expected value
of the returns under the condition that the returns are smaller than the
Value at Risk for the same \alpha level. Note that an absolutely
continuous distribution of the returns is assumed.
The three estimation methods are:
mean the mean of the samples that fall under the corresponding VaR.
median the median of the samples that fall under the corresponding VaR.
mc Calculation of the expected value using Monte Carlo integration over
the \alpha levels. One draws mc_samples Monte Carlo samples .
est_es(sample, alpha, method = c("mean", "median", "mc"), mc_samples = 100)
sample |
Numeric vector representing the sample upon which the Expected Shortfall is calculated. |
alpha |
Numeric vector with entries in (0,1) specifying the levels at which the ES is calculated. |
method |
Method of estimation one of |
mc_samples |
Number of Monte Carlo samples used for the |
Numeric vector with Expected Shortfall estimates
(same length as alpha).
est_var()
est_es(0:100, c(0.1, 0.2, 0.3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.