'Is an R code to estimate the Value-at-Risk using the hierarchical Archimedean copula approach?
To estimate the Value-at-Risk of a two-dimensional portfolio (d=2) by the archimedean copula approach, the process can be for example :
x<-mvdc(archmCopula(family="gumbel",param=3),c("norm", "norm"),list(list(mean=0.00034,sd=0.0147),list(mean=0.00021,sd=0.0114)))
set.seed(123)
xy.sim <- rMvdc(100,x) ### generate the random variables constituting the portfolio
R.sim = log(0.7exp(xy.sim[,1])+ 0.3exp(xy.sim[,2]))
VaR.95.est = quantile(-R.sim,probs=0.95) ### calculates the Value-at-Risk
The work I am trying to do consists of estimating the Value-at-Risk of a multidimensional portfolio (d>2) using the hierarchical Archimedean copula approach with the R software.
My question is therefore to know which R codes allow: on the one hand to generate the random variables constituting the portfolio; and on the other hand to estimate the Value-at-Risk of this portfolio.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
