How to generate time series with a predefined auto correlation and cross-correlation among the series

I want to generated $$N$$ time series, each with length of $$N_t$$, i.e., I am considering $$N_t$$ time instants. The generated time series must have an auto correlation of $$\rho_a$$, i.e., the correlation between every two successive samples taken at $$t$$ and $$t-1$$ must have a correlation of $$\rho_a$$. Also, the cross correlation between every two time series $$i$$ and $$j$$ must be $$\rho_{ij}$$. Neglecting the cross correlation between the different time series, this is a straightforward and it can be done by auto regressive model AR(1). For each of the N time series, I do the following (assume 3 time series to be generated). I generate the time samples according to $$X_t=\rho_a X_{t-1}+u_t$$, $$Y_t=\rho_a Y_{t-1}+v_t$$ and $$Z_t=\rho_a Z_{t-1}+\epsilon_t$$ where $$u_t,v_t,\epsilon_t$$ are $$N(0,1)$$. However, considering the cross correlation, this is not applicable as the generated time series does not have the predefined cross correlation. Note that a similar question addresses a similar problem but it is only valid for two time series (not multiple time series). Here is the link :How to simulate two correlated AR(1) time series?

• The answer you refer to is written in a way to make it clear how it generalizes to multiple time series. – whuber Jul 28 '20 at 13:54
• Thanks @whuber. I do not understand how we got the equation for the covariance matrix which is written after this sentence (If we denote by Σ the covariance matrix of Zt and Q the covariance matrix of εt then it can be checked that). Any related topic I can google so I understand the math behind it. – mohamed Jul 28 '20 at 15:47
• It's unclear what your $\Sigma$ and $Q$ are because your statement of the problem may be ambiguous. For instance, do you really use the same $\epsilon$ for $X_t,$ $Y_t,$ and $Z_t$? Do you use the same $\epsilon$ for all $t$? Most likely not, despite what you write. – whuber Jul 28 '20 at 16:09
• @whuber. I edited the question per your comment. I hope it is clear now – mohamed Jul 28 '20 at 16:43
• Presumably all the $u_t,$ $v_t,$ and $\epsilon_t$ are independent, and therefore uncorrelated: this gives the matrix $Q$. You have specified the matrix $\Sigma$ via $\rho_{ij}.$ It looks like you're ready to apply the referenced thread :-). – whuber Jul 28 '20 at 18:22