ESghyp.attribution {ghyp} | R Documentation |
Risk attribution.
Description
Functions to get the contribution of each asset to the portfolio's Expected Shortfall based on multivariate generalized hyperbolic distributions as well as the expected shortfall sensitivity to marginal changes in portfolio allocation.
Usage
ESghyp.attribution(
alpha,
object = ghyp(),
distr = c("return", "loss"),
weights = NULL,
...
)
Arguments
alpha |
a vector of confidence levels for ES. |
object |
a multivariate fitted ghyp object inheriting from class |
distr |
whether the ghyp-object specifies a return or a loss-distribution (see Details). |
weights |
vector of portfolio weights. Default is an equally-weighted portfolio. |
... |
optional arguments passed from ghyp.attribution to |
Details
The parameter distr
specifies whether the ghyp-object
describes a return or a loss-distribution. In case of a return
distribution the expected-shortfall on a confidence level
is defined as
while in case of a loss distribution it is defined on a confidence
level
as
.
Value
ESghyp.attribution
is an object of class ghyp.attribution.
Author(s)
Marc Weibel
See Also
contribution,ghyp.attribution-method
, sensitivity,ghyp.attribution-method
and weights
for Expected Shortfall.
Examples
## Not run:
data(smi.stocks)
## Fit a NIG model to Novartis, CS and Nestle log-returns
assets.fit <- fit.NIGmv(smi.stocks[, c("Novartis", "CS", "Nestle")], silent = TRUE)
## Define Weights of the Portfolio
weights <- c(0.2, 0.5, 0.3)
## Confidence level for Expected Shortfall
es.levels <- c(0.01)
portfolio.attrib <- ESghyp.attribution(alpha=es.levels, object=assets.fit, weights=weights)
## End(Not run)