Skip to content
All library documents

Using Cholesky Factors to Generate Correlated Asset Returns

Article Quant Q&A · Author: Clems

Summary

The document explains why MATLAB’s default Cholesky output can still be appropriate when generating correlated asset paths. The key is how the random observations are arranged in a matrix. For a column vector of random draws, multiplying by the lower triangular Cholesky factor produces the target covariance structure. If each observation is stored as a row, the equivalent operation multiplies on the right by the transpose of that factor, which is upper triangular.

The answer resolves an apparent conflict between a tutorial’s use of the default upper triangular factor and the questioner’s expectation that the factor must be lower triangular. The method depends on matrix orientation, not on a different statistical principle. The document gives a conceptual explanation but no numerical example or validation results, and it does not discuss other practical issues such as estimating the correlation matrix or handling matrices that are not positive definite.

Key ideas

  • The Cholesky factor used in a correlation transform depends on whether observations are stored in rows or columns.
  • For a column vector of random draws, premultiplication by the lower triangular factor gives correlated variates.
  • For observations arranged as rows, postmultiplication by the transposed factor is the equivalent operation.
  • An upper triangular factor in path-generation code does not by itself indicate an error.

Tags

Full text
# Cholesky Decomposition on Correlation Matrix for Correlated Asset Paths


# Cholesky Decomposition on Correlation Matrix for Correlated Asset Paths












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?

Best

## Answer by Enrico Schumann (score 1, accepted)

https://quant.stackexchange.com/a/14461

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.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.