1
$\begingroup$

I am in trouble with a task:

I have a portfolio of 5 assets, and I Have the correlation among them, with a 5x5 matrix.

Since each asset follows the BS formula: enter image description here, I need to perform a montecarlo simulation, with a number of simulations (N) for instance equal to 10000, for a period of 1 year, with 12 payments (monthly payment).

So I need to simulate the trajectory of each asset, considering the correlation among them. How can I do this? I have seen something regarding the Cholesky decomposition, but I have not understood how do it, since when we simulate the trajectory of each asset, we have a matrix made by: 5 row (asset) and 10000 element inside each row (trajectory each asset)

Thank you!

$\endgroup$
1
$\begingroup$

The Cholesky decomposition works in the following way: Suppose you have a vector of $n$ independent normal realisations: $Z$. Set the elements of $\Sigma$ to be $\rho_{i,j}$ where $i$ indicates the row and $j$ indicates the column. Obviously $\rho_{i,i}=1$. We set the Cholesky decomposition of $\Sigma$ to be $L$ (a lower triangular matrix) such that $\Sigma=L\cdot L^{\top}$. Then $X=L\cdot Z$ is normally distributed with mean 0 and covariance matrix $\Sigma$.

Functioning R code is for the simple case of $n=2$ with one sample is given below

Sigma<-matrix(c(1,0.9,0.9,1),nrow=2)

L<-t(chol(Sigma)) #transpose as R uses upper triangular for cholesky
L%*%t(L) #check


Z<-rnorm(2)
X<-L%*%Z

You only have to calculate $L$ once, but have to calculate $Z$ and $X$ once per point on the trajectory.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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