I'd like to conduct a Monte Carlo simulation with two random variables.

One random variable is generated by geometric Brownian motion, the other random variable is sampled by drawing random values from a Beta distribution. The two variables should be correlated.

My questions are:

How to model the correlation between the two random variables? Is Copula a direction that I should look into?

How to simulate the two variables in Python? Is there any package that would be helpful?

  • $\begingroup$ Is there a specific, exact type of correlation you need? Or is any convenient parametrizable sort of correlation OK? $\endgroup$
    – jwimberley
    Aug 5 '20 at 16:43
  • 1
    $\begingroup$ A Brownian motion is not a random variable but a random function. How do you define the correlation for such an object? $\endgroup$
    – Xi'an
    Aug 6 '20 at 6:51
  • $\begingroup$ Hi jwimberley and Xi'an, thank you for pointing out this! The correlation here is defined as a simple linear correlation captured by Pearson correlation coefficient $\endgroup$
    – Kasa Min
    Aug 11 '20 at 7:44

Assuming that any convenient parametrizable sort of correlation suffices, here is a workable model whose details you can flesh out.

A straightforward way to generate correlated standard-normally distributed variables is via a Cholesky decomposition. Various instructions can be found for this online or in CrossValidated. See, for example,

How to use the Cholesky decomposition, or an alternative, for correlated data simulation

Subsequently, these random standard-normal variables could be converted into your Brownian motion and beta-distribution variables. Distance travelled in Brownian motion typically follows a normal distribution with a specific variance, so would just require rescaling one of the standard normal variables (or N, for N-dimensional motion). To convert one standard normally distributed variable to one following a beta distribution, use their CDFs -- i.e., if the standard normal variable is at percentile p, find the corresponding percentile p value for the Beta distribution in question. In R, for example, a standard normal quantity x would be transformed via


This method of parametrizing correlation would not achieve a desired Pearson correlation coefficient, but would (I believe) result in a Spearman correlation equal to the correlation coefficient used in the first (Cholesky decomposition) step.

  • $\begingroup$ Hi Jwimberley, thank you for the answer! This answer becomes clear to me after I did some research. However, could you elaborate more why this procedure would result in a spearman correlation instead of Pearson correlation? $\endgroup$
    – Kasa Min
    Aug 17 '20 at 10:41
  • $\begingroup$ The function f(x2) = qbeta(pnorm(x2)) is monotonic but nonlinear. The correlation coefficient used to generate correlated normals x1 and x2 will make them tend to cluster around the line x2=x1, but applying the above transformation will tend to make them cluster around b = f(x1). The Pearson correlation coefficient between b and x1 would depend exactly on the shape of the function f(x). $\endgroup$
    – jwimberley
    Aug 17 '20 at 13:54

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