Description Usage Arguments Details Value Note Author(s) References See Also Examples
The function calculate the contribution in different scales to the portfolio Expected Shortfall.
1 | analyticES(confidence, position, sigma, horizon = 1)
|
confidence |
Confidence interval. |
position |
Vector of positions in monetary terms. |
sigma |
Variance-covariance matrix of the whole portfolio. |
horizon |
Time horizon. |
Returns the marginal, component and relative component Expected Shortfall.
It is also scalable with vectors containing multiple confidence intervals.
Due to the multidimensional nature of this metric we would not suggest using multiple time horizon.
"Delta ES", "Component ES" in monetary terms and "Relative-Component ES" in decimals.
The function can be run for a portfolio with a single exposure, but there will be a single value for "Component ES" and "Relative-Component ES".
Reminder: the central assumption under this function states that underlying market variables is normally distributed. This involves assuming a model for the joint distribution of changes in the market variables and using historical data to estimate the model parameters.
Gatti Riccardo, Lin Francesco
Hull J.C. (2015): "Value-at-Risk and Expected Shortfall" in "Risk Management and Financial Institutions", Wiley.
Hull J.C. (2015): "Model-Building Approach" in "Risk Management and Financial Institutions", Wiley.
Jorion P. (2007): "Portfolio Risk: Analytical Methods" in "Value at Risk", McGraw-Hill.
parametricVaR
parametricES
analyticVaR
1 2 3 4 5 6 7 8 | ##
weights <- c(100000, -100000, 100000)
varcov <- matrix(c(0.05, 0.03, 0.01, 0.03, 0.04, 0.02, 0.01, 0.02, 0.03), nrow = 3)
analyticES(c(0.95, 0.99, 0.999), weights, varcov, 5)
##
analyticES(.99, weights, varcov)
## NOT RUN
analyticES(.99, weights, varcov, c(1, 5))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.