Description Usage Arguments Examples
Compute ES takes a VaR function and its arguments and computes the expected shortfall by taking an average of the tail VaRs.
1 | compute_es(.f, ..., conf = 0.9, n = 1000)
|
.f |
a VaR function to compute ES with |
... |
further arguments to pass |
conf |
level of confidence |
n |
number of slices to approximate tail VaR with |
1 2 | # Compute lognormal expected shorfall function using lognormal VaR
compute_es(var_lognormal, conf = 0.9, mu, sigma, investment, holding)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.