Assume I have three industry datasets: interest rates, inflation and unemployment. Data contains information of last ten years and it's monthly.

Now, I would like to create N possible scenarios of the next year, also monthly.

The idea is to run a Monte Carlo simulation that calculates a function that has interest rates, inflation and unemployment as input parameters. So I would like to create possible scenarios, but since there's a relationship between the parameters I cannot randomly select values. Is there a method to generate random data of multiple parameters taking into account that they are related?


This is a common occurrence in monte carlo models. I suggest you look into Cholesky decomposition. The basic idea is that if you have a covariance matrix M that describes the relationship between your data, the cholesky decomposition will produce a lower triangular matrix L such that M = L * L'

Now if you generate a vector X of random normals you can take L * X to get a matrix of simulated variables that preserves the covariance structure. I recommend reading https://www.r-bloggers.com/simulating-data-following-a-given-covariance-structure/ which it explains why this is true.

  • 1
    $\begingroup$ Thanks, I use python and they implemented Cholesky in the Scipy library $\endgroup$ – ps0604 May 13 '19 at 19:38

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.