Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to generate a random vector $z$ of dimension $k+m$ with some given correlation matrix $\Sigma$, such that the first $k$ elements of the vector are distributed normally and the last $m$ elements follow the Gamma distribution with some given parameters $a,b$.

Hier is suggested (applied to this case) to generate a normal r.v. Z as $N(0,\Sigma)$ and then solve $G_{[a,b]}(Y_i)=\Phi_{[0,\Sigma]}(Z_i), i\geq m$ and replace the last m elements of Z with Ys, however it's not guaranteed that the vector $(Z_1, ... , Z_k, Y_{k+1}, ..., Y_{k+m})$ will still have the correlation matrix $\Sigma$.

Is there some nice copula out there that does the job or some other approach?

share|improve this question

In Oracle Crystal Ball (or in a few other Excel based MC simulation add-ins), we can do this without much hassle: define $k$ normal distribution and $m$ gamma distributions. Define (or load) the correlation matrix $\Sigma$ and then generate the random variates. Each trial run would give you one random vector $z$ of dimension $k+m$.

We use normal copula to generate correlated random numbers from risk distributions in Oracle Crystal Ball.

share|improve this answer
can you elaborate on "and then generate the random variates"? Do you generate k normals and m gammas and the put it into a copula? – Max Li Jan 16 '13 at 15:51
We generate streams of uniforms, put them through a normal copula to rotate according to the correlation value, and then use inverse PDF to go back to the distribution. – Samik R Jan 17 '13 at 21:51
from these 3 steps, they are correlated with the desired correlation matrix after the 2nd step, but not after the final 3rd step. correct me if I'm wrong – Max Li Jan 20 '13 at 18:57
We get streams of uniform numbers with the desired correlation after 2nd step, and then using the inverse PDF, we retain the correlation structure after 3rd step. – Samik R Jan 21 '13 at 19:37

Look here for multivariate distribution on the positive quadrant ... quite difficult. http://xianblog.wordpress.com/tag/multivariate-analysis/ I have been thinking about this for weeks and months in the context of credit risk (modelling default intensities jointly) and I think this does not work.

share|improve this answer
Assume that this mixture of distribution is given and I can't escape into log-normal and to some extent tolerant towards negative values. Simulating into positive quadrant with given covariance is also interesting, thanks for this! – Max Li Jan 13 '13 at 20:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.