Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot-ghyp.attribution

Plot ES contribution


Description

These functions plot the contribution of each asset to the overall portfolio expected shortfall.

Usage

plot.ghyp.attrib(
  x,
  metrics = c("contribution", "sensitivity"),
  column.index = NULL,
  percentage = FALSE,
  colorset = NULL,
  horiz = FALSE,
  unstacked = TRUE,
  pie.chart = FALSE,
  sub = NULL,
  ...
)

Arguments

x

A ghyp.attribution object.

metrics

either the contribution or sensitivity will be plotted.

column.index

which column of the object.

percentage

plot contribution or sensitivity in percent.

colorset

vector of colors for the chart.

horiz

plot horizontally.

unstacked

unstacked plot.

pie.chart

should a pie chart be plotted.

sub

subtitle.

...

arguments passed to plot function.

Author(s)

Marc Weibel

See Also

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)
 
 ## Plot Risk Contribution for each Asset
 plot(portfolio.attrib, metrics='contribution')  

## End(Not run)

ghyp

Generalized Hyperbolic Distribution and Its Special Cases

v1.6.1
GPL (>= 2)
Authors
Marc Weibel, David Luethi, Wolfgang Breymann
Initial release
2020-04-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.