ESghyp.attribution: Risk attribution.

ESghyp.attributionR 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 ghyp.

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 qghyp and integrate.

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 \alpha is defined as \hbox{ES}_\alpha := \hbox{E}(X| X \leq F^{-1}_X(\alpha)) while in case of a loss distribution it is defined on a confidence level \alpha as \hbox{ES}_\alpha := \hbox{E}(X | X > F^{-1}_X(\alpha)).

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)

ghyp documentation built on Aug. 21, 2023, 5:12 p.m.