# Calculating covariance matrix

1. Jan 10, 2012

### foges

So I need to calculate the square root of the covariance matrix $\sqrt{\Sigma_tR\Sigma_t}$ (the matrix square root, not the element-wise square root). $\Sigma_t$ is a diagonal matrix with the square root of the variance on the diagonal (these values are time dependent) and $R$ is the correlation between my variables (this is assumed to be independent of time). Here is an example:

$\sqrt{\left(\begin{array}{cc}\sigma_1 & 0 \\ 0 & \sigma_2\end{array}\right) \cdot \left(\begin{array}{cc}1 & \rho \\ \rho & 1 \end{array}\right) \cdot \left(\begin{array}{cc}\sigma_1 & 0 \\ 0 & \sigma_2\end{array}\right) }$

Now the thing is, it is awfully slow to recalculate the square root of this matrix for every time step. Seeing as my correlation is constant I was thinking there might be a more computationally efficient method of calculating this root, but haven't been able to come up with anything. Does anyone have any suggestions?

2. Jan 10, 2012

### aesir

3. Jan 11, 2012