I found a matlab example for modelling correlated asset paths: http://www.goddardconsulting.ca/matlab-monte-carlo-assetpaths-corr.html

In this model the author uses the matlab code chol() in order to calculate the cholesky decomposition on the correlation matrix. However, by default, chol(corr) returns the upper triangular matrix but in my understanding the lower triangular matrix is needed for generating correlated random numbers. This can be calculated by chol(corr,'lower'): http://www.mathworks.de/de/help/matlab/ref/chol.html

Now, is this simply a small error in the code example or did I misunderstand some theoretic basics?



1 Answer 1


If you want to create one (column) vector X of correlated random variates, then you premultiply it with the lower triangular matrix L.

But when you create paths, every return observation is one vector of random numbers.

It is then a matter of how you arrange your data: if these observations are columns in an matrix X, you compute LX. But if you have the observations in the rows of a matrix, then you need transpose the product, and you postmultiply with L', which is an upper triangular matrix.

Perhaps the tutorial http://comisef.wikidot.com/tutorial:correlation helps.

  • $\begingroup$ since I have a TxN matrix with T observations and N time series I have to use the upper triangular, if I understood you correctly? $\endgroup$
    – Clems
    Commented Aug 21, 2014 at 6:36
  • $\begingroup$ When the observations are in columns, multiply from the left with the lower triangular matrix. When the observations are in rows, multiply from the right with the upper triangular matrix. $\endgroup$ Commented Aug 21, 2014 at 8:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.