I want to simulate a correlation matrix which has some off-diagonal structures and also should have some hierarchical structures. For simulating correlation matrices which contain hierarchical structures, I am using this paper. But, I don't know how to add off-diagonal structures to it. I want to simulate a correlation matrix which somewhat have off-diagonal structures as below image

enter image description here

An example of a hierarchical structure in the correlation matrix is below image enter image description here

Does anyone have a suggestion on how to simulate such correlation matrices?

  • $\begingroup$ Dunno if this is helpful, but with mvnorm in R you can generate data for whatever correlation matrix you want. But I'm guessing you don't want to sit there typing out each individual element in that matrix. Oh well, hope this helps a little anyway. $\endgroup$ – Huy Pham Nov 24 '18 at 12:21
  • 2
    $\begingroup$ Possible duplicate of Simulate correlation matrix using a given structure $\endgroup$ – Xi'an Nov 28 '18 at 5:07
  • $\begingroup$ If you can translate "hierarchical structure" to "eigenvalue structure" (clumpiness), see scipy.stats.random_correlation. Or, generate R' Λ R with random orthonormal R in a language of your choice. $\endgroup$ – denis May 22 '20 at 10:34

You can have a look at this paper: CorrGAN: Sampling Realistic Financial Correlation Matrices Using Generative Adversarial Networks

The idea is to use a Generative Adversarial Network to learn the empirical structure in your matrices. Then, one is able to sample from this empirical distribution of correlation matrices.

For example, output of the model trained on financial correlation matrices (correlations between S&P 500 stocks returns): example of model output

You can find an example how to use such model here, on this Google Colab.


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.