how to simulate copula
楼主 · 1 楼
I have a problem on simulate gaussian copula:
Suppose I have two risk capital X1, X2, they are normally distributed
X1-N(3,
10), X2-N(5,16). The correlation coefficient of X1 and X2 is 0.5. Now I want to use Gaussian copula to simulate the aggregated risk.
Could somebody tell me how to use monte carlo simulation to deal with it?
Thanks a lot!
Suppose I have two risk capital X1, X2, they are normally distributed
X1-N(3,
10), X2-N(5,16). The correlation coefficient of X1 and X2 is 0.5. Now I want to use Gaussian copula to simulate the aggregated risk.
Could somebody tell me how to use monte carlo simulation to deal with it?
Thanks a lot!
2 楼
Thank you very much!
3 楼
yours is a bivariate normal distribution, simulation is very
simple:
1. find the correlation matrix A,
2. then calculate the Cholesky decomposition matrix C, such that A = C'C,
3. generate a pair of independent standard normal errors, e1, e2,
4. make matrix operations (E1,E2)' = C'* (e1,e2)',
5. then X1 = 3 + square root of (
10) * E1; and X2 = 5 + square root of (16) * E2.
done.
1. find the correlation matrix A,
2. then calculate the Cholesky decomposition matrix C, such that A = C'C,
3. generate a pair of independent standard normal errors, e1, e2,
4. make matrix operations (E1,E2)' = C'* (e1,e2)',
5. then X1 = 3 + square root of (
10) * E1; and X2 = 5 + square root of (16) * E2.
done.
4 楼
| 引用 (mfae @ 2005年05月06日 21时46分) |
| I have a problem on
simulate gaussian copula: Suppose I have two risk capital X1, X2, they are normally distributed X1-N(3, 10), X2-N(5,16). The correlation coefficient of X1 and X2 is 0.5. Now I want to use Gaussian copula to simulate the aggregated risk. Could somebody tell me how to use monte carlo simulation to deal with it? Thanks a lot! |
Gaussian copula is not a suitable issue for your modelling. Copula is usually used to model the correlation structure between uniformly distrubuted variables.
Yours problem is to simulate Gaussian variables.
5 楼
Thank you very much for you answer!
I've already used your approach to simulate it. But I still have a question. In
most copula literature,to simulate random variables of a multivariable
distribution, the generating approach is nearly the same as your method, except
the final step:
1.Calculate Cholesky factorization C;
2.Generate a column vecor of independent normal random variable Y;
3.Take the martix product of Z=C*Y;
4.Set Ui=Φ(Zi);
5.Set Xi=inverseFxi(Ui);
Could you explain me little bit the difference on the final steps?
Thank you again!
I've already used your approach to simulate it. But I still have a question. In
most copula literature,to simulate random variables of a multivariable
distribution, the generating approach is nearly the same as your method, except
the final step:
1.Calculate Cholesky factorization C;
2.Generate a column vecor of independent normal random variable Y;
3.Take the martix product of Z=C*Y;
4.Set Ui=Φ(Zi);
5.Set Xi=inverseFxi(Ui);
Could you explain me little bit the difference on the final steps?
Thank you again!
6 楼
final step allows you to gengerate r.v.s from marginal distributions
other than normal. Mine works for the special case you have.
7 楼
So that you mean we can generate random variables of a multivariable
distribution from any marginal distribution. Here Gaussian copula Ui is the
probability of inverse function of Xi? In this special case, if I use Matlab to
generate random variables of the gaussian copula, the function should be
x=[norminv(Ui,3,sqrt(
10)); norminv(Ui,5,sqrt(16)]. Then I got different results
from these two approaches.
Maybe I misunderstand the relation of gaussian copula Ui and inverse function
of Xi? I mean the way to insert Ui to the inverse function of Xi.
distribution from any marginal distribution. Here Gaussian copula Ui is the
probability of inverse function of Xi? In this special case, if I use Matlab to
generate random variables of the gaussian copula, the function should be
x=[norminv(Ui,3,sqrt(
10)); norminv(Ui,5,sqrt(16)]. Then I got different results
from these two approaches.
Maybe I misunderstand the relation of gaussian copula Ui and inverse function
of Xi? I mean the way to insert Ui to the inverse function of Xi.
8 楼
remember, Ui in your case is a vector of two uniform r.v.s.
try to define ui as the first column of Ui and vi as the second column of Ui, then generate: Xi = [norminv(ui, 3, sqrt(
10)),norminv(vi, 5, sqrt(16))]
try to define ui as the first column of Ui and vi as the second column of Ui, then generate: Xi = [norminv(ui, 3, sqrt(
10)),norminv(vi, 5, sqrt(16))]