Plot ES contribution
These functions plot the contribution of each asset to the overall portfolio expected shortfall.
plot.ghyp.attrib( x, metrics = c("contribution", "sensitivity"), column.index = NULL, percentage = FALSE, colorset = NULL, horiz = FALSE, unstacked = TRUE, pie.chart = FALSE, sub = NULL, ... )
x |
A |
metrics |
either the |
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 |
Marc Weibel
## 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)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.