Implied Correlation from Gaussian Copula

404 Views Asked by At

I am building a spreadsheet model that allows marginal distributions to be correlated together using a Gaussian copula (with prescribed correlation matrix).

The inputs into the model are the underlying marginals (lets say I choose them all to be Lognormal, and lets say there's only two of them), and also the correlation matrix.

The desire (in our example) is to simulate two lognormal distributions, that are correlated in terms of the input correlation matrix.

The issue, is that the correlation matrix is used to generate correlated uniform margins, that are then 'plugged' in to the inverse lognormal function, to generate the lognormal values (i.e. the "inverse transform method for simulation").

Therefore, the lognormal values I generate are no longer exactly correlated as per the input matrix (and I wasn't expecting they would - I've just applied transformations to the true correlated uniform values). But what I'm not sure on, is if there is an extra transformation step, or "scaling factor" I can apply such that the resulting lognormal marginals do have the same correlation as my input correlation matrix.

I think in my simplistic scenario, I could probably just generate two correlated Normals, and then take the exponent, to arrive at correlated Lognormals, where the updated correlation coefficient could be calculated analyticall. However, what if my marginals are not as 'nice' as this? E.g. Gamma or Pareto, or even a mix.

Would very much appreciate thoughts on this, I'm not quite sure where to start, or if I'm going down a rabbit hole!

Thanks very much

1

There are 1 best solutions below

0
On

Just to answer my specific example (simulating two correlated lognormal random variables).

Firstly, I can easily generate two $N(0,1)$ random variables with correlation coefficient $\rho$ using Cholesky decomposition (note that to then simulate from the "Gaussian Copula" I'm referencing would be to just apply the Normal CDF to these). Call these $Z_1$ and $Z_2$.

I can then take:

$Y_i = e^{\mu_i + \sigma_i Z_{i}}$

as my two lognormal random variables, by definition. I.e.

$Y_i \sim LN(\mu_i,\sigma_i^{2})$

The "issue" I was facing is that:

$\rho \neq corr(Y_1,Y_2)$

However, we can calculate:

$Cov(Y_1,Y_2) = E[Y_1Y_2] - E[Y_1]E[Y_2]$

with

$E[Y_1Y_2] = E[e^{X_1 + X_2}]$, where $X_i \sim N(\mu_i,\sigma_i^2)$

which is the mean of lognormal random variable with:

$X_1 + X_2 \sim N(\mu_1 + \mu_2, \sigma_1^{2} + \sigma_2^{2} + 2\rho\sigma_1\sigma_2)$

And so

$E[Y_1Y_2] = E[Y_1]E[Y_2]e^{\rho\sigma_1\sigma_2}$

Hence we can write:

$Cov(Y_1,Y_2) = E[Y_1]E[Y_2](e^{\rho\sigma_1\sigma_2} - 1)$

And thus, with a bit of re-arranging:

$\rho = ln(\frac{corr(Y_1,Y_2)SD(Y_1)SD(Y_2)}{E[Y_1]E[Y_2]} + 1)(\frac{1}{\sigma_1\sigma_2})$

Which then gives me the input $\rho$ into the original correlation matrix, with desired outcome $corr(Y_1,Y_2)$.

I've checked this works, in Excel (I'm not proficient in R). Happily share if anyone wants.

I'm not convinced I can do something similar where the random variables are not lognormal, or are mixed, and I'm guessing, even with hard work, it's not analytically possible in all cases!

However, further thoughts much appreciated.