I have a predefined correlation matrix for N variable and want to generate time series for these variables satisfying their correlation. The time could be of any number of data points (i.e., 300).

I tried as follows but couldn't preserve the correlation of all N variable.

  • generated a time series (randomly) for one of the variables and stored.
  • manipulated the time series of first variable by adding some noise to get desired correlation value between 1st and second.
  • once second time series reflects the predefined correlation between 1st and 2nd, then stored and generated time series for all N variables in same way satisfying the predefined correlation of all with first variable.
  • now, moving to test the correlation of 2nd and 3rd and try to modify the times series of 3rd to maintain its predefined correlation with 2nd but its correlation with 1st is disturbed.
  • beyond this my method doesn't work.
  • Any suggestion(s) or already written script(s) in MATLAB, R or Python will be much appreciated.

    More Ishfaque Ahmed's questions See All
    Similar questions and discussions