Serving the Quantitative Finance Community

 
User avatar
myopicone
Topic Author
Posts: 0
Joined: June 30th, 2005, 1:33 pm

correlated random walk q --help

October 17th, 2005, 10:34 am

If i want to generate n correlated randon walks when I know the correlation matrix Cij. How do I ensure that each random walk is consistent with each other?for instance if we have 2 stocks, the proceedure I use is to generate 2 normal walks gaus1 and gaus2Then correlated random walk gaus3 is given by gaus3 = gaus1[j]*Cij+sqrt( (1-Cij*Cij) )*gaus2[j]How do I ensure I remain consitent for 3 randon walks?ThanksTom
 
User avatar
myopicone
Topic Author
Posts: 0
Joined: June 30th, 2005, 1:33 pm

correlated random walk q --help

October 17th, 2005, 10:36 am

Btw gaus is just a vector that holds my time series so i corresponds to t
 
User avatar
mutley
Posts: 20
Joined: February 9th, 2005, 3:51 pm

correlated random walk q --help

October 17th, 2005, 11:14 am

You need something called the Cholesky factorisation of a correlation matrix - look up the numerical recipes source code for it.james
 
User avatar
myopicone
Topic Author
Posts: 0
Joined: June 30th, 2005, 1:33 pm

correlated random walk q --help

October 17th, 2005, 2:45 pm

thanks