Skip to content
All library documents

Using a Normal Copula to Generate Correlated Normal and Gamma Variables

Article Quant Q&A · Author: Max Li

Summary

The question concerns generating a vector whose components have mixed marginal distributions, with some normal variables and some gamma variables, while also matching a specified correlation matrix. It notes that transforming components of a multivariate normal through inverse cumulative distributions can preserve the desired marginal distributions, but does not generally preserve the original Pearson correlations after transformation.

One response describes the problem as difficult in multivariate modeling, mentioning joint default-intensity modeling as an example, but offers no construction or proof. Another reports using a normal copula in simulation software to generate correlated variates from different risk distributions. The exchange therefore illustrates a practical approach, not a guarantee that the specified correlations will be achieved exactly. A normal copula imposes dependence through latent Gaussian variables; the resulting correlations between observed normal and gamma variables can differ from the input latent correlations, so calibration may be needed. No parameter-fitting procedure or validation evidence is provided.

Key ideas

  • Transforming multivariate normal variables can produce desired normal and gamma marginals.
  • Nonlinear transformations generally change Pearson correlations between the resulting variables.
  • A normal copula is presented as a practical way to simulate mixed marginal distributions with dependence.
  • The discussion does not show that an input correlation matrix will be matched exactly or explain how to calibrate it.

Tags

Full text
# Generate correlated random variables from Normal and Gamma distributions


# Generate correlated random variables from Normal and Gamma distributions












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?

## Answer by Richi Wa (score 4)

https://quant.stackexchange.com/a/5968

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.

## Answer by Samik R (score 1)

https://quant.stackexchange.com/a/7008

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.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.