# How do I generate $n$ random variables that follow a correlation matrix with individually log normal distributions?

Short and sweet: I'd like to model $$n$$ random variables representing price changes of individual assets. Each of these should be distributed as a log normal variable with a median of 1. Is there a way to generate these variables with a given correlation matrix?

Longer explanation: I'd like to model a price change from time $$t_0$$ to $$t_1$$ assuming price grows with probability 50%. For a single asset, we could model the growth as log normal.

$$G \sim \text{lognormal}(\mu, \sigma)$$

Setting $$\mu = 0$$, the median will be $$\text{exp}(\mu) = 1$$. Meaning price will increase ($$G > 1$$) with probability 50%.

We could also get any variance we would like by changing $$\sigma$$.

Now lets assume we have $$n$$ such assets that can grow and they are correlated according to a correlation matrix A. The traditional way to generate random variables that are correlated would be to generate independent variables and then adjust them using Cholesky decomposition.

In this case that wouldn't work as it would disrupt our goal of having the median be equal to 1. Moreover, the linear sum of two lognormal distributions is not lognormal.

Questions:

• Is there an algorithm to generate such numbers?
• Is this a reasonable model for and a reasonable set of constraints to model stock price movement from $$t_0$$ to $$t_1$$ or is a different set of assumptions commonly used?
• Use stats.stackexchange.com/questions/6853 to relate the correlations to correlations of the logarithms -- then generate the logarithms using any of the many standard methods for multivariate Normal variables.
– whuber
Jul 9 at 14:56
• Where does this correlation matrix come from? If it comes directly from observed asset prices, you could get the correlations of the log-prices instead, then create a normal model with that correlation matrix, and then take exponentials of that normal model. Jul 10 at 23:01
• Hey @MattF, thanks, yeah that's exactly what I'm doing in practice right now, and worst case will have to find the raw data feeds, but would like to leave the question as written. Jul 11 at 22:07