if (FALSE) {
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)
}
Run the code above in your browser using DataLab