Serving the Quantitative Finance Community

 
User avatar
audetto
Topic Author
Posts: 0
Joined: March 12th, 2002, 4:08 pm

Correlating distributions

April 15th, 2003, 1:33 pm

I've a problem with correlationsLet's say I know the distribution function of 2 random variables. Indivudually, not the couple!I would like to sample a bidimensional vector of these 2 random variables with specified correlation...I know only how to generate a correlated n-dimensional gaussian vector.could you help me?thanks
Last edited by audetto on April 14th, 2003, 10:00 pm, edited 1 time in total.
 
User avatar
Wolf

Correlating distributions

April 15th, 2003, 2:00 pm

If your variables are almost gaussian (like the returns of two stocks in a local volatility model) you could:1) simulate a vector of correlated gaussian variables;2) compute the (gaussian) cumulative distribution of each variable;3) invert the (non-gaussian) cumulative distribution starting from the values (probabilities) calculated in point 2).I haven't tested it, but it sounds resonable.Anyway, the error should be within the usual mispecification error you accept when dealing with implied correlations.
 
User avatar
ndr
Posts: 0
Joined: October 8th, 2002, 3:19 pm

Correlating distributions

April 15th, 2003, 2:25 pm

In other words, you should use copula methodology, probably Gaussian copula in your case. That would allow establishing dependence for arbitrary marginal distributions.
 
User avatar
Val
Posts: 23
Joined: June 5th, 2002, 12:51 pm

Correlating distributions

April 15th, 2003, 2:52 pm

Audetto,I may sugest you a very good book wich deals with simulations of multivariate distributions: Fishman, G.: (2003) Monte Carlo · Concepts, Algorithms, and Applications
 
User avatar
javgome
Posts: 0
Joined: May 2nd, 2003, 2:41 pm

Correlating distributions

May 7th, 2003, 9:51 pm

Hi The Cholesky descomposition on a matrix of correlation is used for creating correlated variables from series of uncorrelated variables.You need to:Create the 2 variables (uncorrelated. series or vectors)Create a correlation matrix using the coef. you need for you variables. [ 1 , coef ; coef , 1]Calculate the cholesky descomposition of the matrix Finally, use the cholesky matrix to mult. it with the variables. Var Corr = MatChol[] * Var Uncorrgood look.
 
User avatar
audetto
Topic Author
Posts: 0
Joined: March 12th, 2002, 4:08 pm

Correlating distributions

May 26th, 2003, 12:06 pm

Maybe you are right... I need normal copula but I have no idea about a numerical procedure tu compute it... I don't think it is an archimedean copula, isn't it?thanksandrea
 
User avatar
mghiggins
Posts: 0
Joined: November 3rd, 2001, 1:38 pm

Correlating distributions

May 26th, 2003, 2:36 pm

Copulas are what you're looking for.The Gaussian copula is straightforward. The basic idea is to map your two random vars X and Y to two standard normal variables x and y. You do this by matching up cumulative distributions: prob( X > X0 ) = prob( x > x0 ). Since cum distributions are monotonically increasing this mapping is one to one.Now you've got two standard normals; make a joint distribution out of them by using the bivariate standard normal distribution with some correlation you specify. Now you've got your joint distribution.e.g., say you wanted to calculate E[ X Y ] from this distribution. You doIntegrate[ Integrate[ X(x) Y(y) f( x, y ), {x, -Infinity, Infinity } ], { y, -Infinity, Infinity } ]where X(x) is your true random var X as a function of standard normal var x (which you get from matching the cumulative distributions) and f(x,y) is the bivariate std normal distribution.
Last edited by mghiggins on May 25th, 2003, 10:00 pm, edited 1 time in total.
 
User avatar
audetto
Topic Author
Posts: 0
Joined: March 12th, 2002, 4:08 pm

Correlating distributions

May 28th, 2003, 6:49 am

I can't unerstand how to compute the distribution of the multivariate normal copula.I can't do a 10-dimensional numerical integral...
 
User avatar
mrbadguy
Posts: 2
Joined: September 22nd, 2002, 9:08 pm

Correlating distributions

May 28th, 2003, 1:35 pm

Audetto, a joint normal or gaussian distribution also defined a multinormal or multivariate normal distribution could be expressed in different forms. Maybe Ifve found one of the easier: a usual random vector has a joint normal distribution if every linear polynomial of the random vector is itself normal, defining a n-dimensional joint normal distribution with mean vector mu and covariance matrix Sum as Nn (mu, Sum). If and only if Sum is definite, the PDF (probability density function) is: F(x) = exp[-1/2(x-mu)^t Sum^-1(x-mu)/ Sqrt (2 p)^n „ Sum„ Where „ Sum„  is the determinant of the covariance matrixNow your problem is expressing an n-dimensional numerical integral,Having a 2-dim. Integral we write this as:Int2d= int[xo,xf[inty0,yf]]f(x,y)dxdy = integral[xo,xf]g(x)dxAnd g(x)=int[yo,yf]f(x,y)Same rule could be applied to 3 D numerical integral and to n-dimensional defined integrals. Int nd=int[xo,xfc.f(x1,..xn)dx1cdxn=integral[xn0,xnf]f(x1)dx1This could be a possible solution, (although quite complicated) rgds,
 
User avatar
FABIUS
Posts: 1
Joined: July 12th, 2003, 9:17 pm

Correlating distributions

July 13th, 2003, 1:50 am

Hi,here are some C codes to compute variance-covariance matrix and correlation using student and normal copula.It comes from an OCR of a pdf file so be careful with caracters.regards.FABIUS
Attachments
Copula Correl C.zip
(13.55 KiB) Downloaded 78 times