# How to do Hierarchical (Nested) Elliptical Copula simulation sampling

I am doing a project to aggregate about 30 risks into total loss (15 of them are market risks, and 15 of them are insurance risks). The current approach is to simulate millions of scenario with Gaussian copula or T copula for all the 30 risks together, and then find the VaR of the sum of total loss.

As empirical study shows, I would like to apply the T copula within the market risks and Gaussian copula within the insurance risks. After that a Gaussian or other type of the copula high-level above the two copula. This idea comes out of my mind, inspired from the Hierarchical (Nested) Archimedean Copula.

$$C(u, v)=C(C_{Gaussian}(X_{1}, X_{2}, X_{3}, ... , X_{15}), C_{T}(X_{16}, X_{17},...,X_{30}))$$ where $$X_{i}$$ is the cumulative probability of risk margins.

Such hierarchical structure applying to Archimedean copula can be implemented by package of HAC or nacopula in R directly, but it seems that there is few packages to apply the Hierarchical structure directly for elliptical copula.

1. Do you know any packages to implement such structure?

2. I also try to implement it with standard approach.

a) Simulate millions of pairs of $$(u, v)$$ by the high-level copula,

b) Find the $$X_{1}, X_{2}, X_{3}, ... , X_{15}$$ to satisfy the Gaussian cumulative probability is $$u$$, and also other risk cumulative probability for $$v$$.

How can I sample the lower-level copula with the cumulative probability $$u$$? I know it is difficult to find a closed form formula for elliptical copula, or function something like "qGaussianCopula" to get high-dimension quantiles $$X_{1}, X_{2},...X_{n}$$.

Do you have any idea or package to do this?

1. It seems that I can have a band of $$\left [ u-\varepsilon, u+\varepsilon \right ]$$, and randomly sample the segments of $$X_{1}, X_{2}, X_{3}, ... , X_{15}$$ randomly within the band. But intuitively thinking it will consumes or "eats" a huge amount of granularity, especially for high-dimension problems.

Or at least, how can I know the form of relationship of $$X_{i}$$ for a given a cumulative probability (e.g. a curve of $$X_{1} X_{2}$$ for bivatiate case), so that I can easily to sample the $$X_{i}$$.

Any new idea, comments or suggestion are highly appreciated. It is quite an open ended question to discuss.