# How to model time-varying correlation

Suppose I have two time-series variables, $\{x_t\}$ and $\{y_t\}$, where $t\in[1,T]$. I would like to model the correlation $\rho(x_t,y_s)$ as some function of $t$,$s$, and the difference $t-s$. In other words, $\rho_{t,s}$ may take on a different value for any valid combination of $(t,s)$, a total of $\frac {T(T+1)}2$ correlations, but I would like to economize on the number of estimated correlations (as well as possibly improving the output) by applying some sort of model.

In the actual application I have in mind, these are macroeconomic and/or financial variables. The derived correlations are used to derive a full pseudo-correlation matrix, which is transformed into the nearest true P.S.D. correlation matrix using Higham's (2002) algorithm.

• Can you give an idea of the size of the dataset (i.e. T=?,S=?)? Is there a reason why you don't model the time varying correlation matrix directly (DCC garch)? Jul 26, 2011 at 21:18
• @user603 T is the same for both x and y, and it is about 600. Furthermore, there are about 30 such variables, and I need pairwise correlation between each of them. I am not familiar with DCC GARCH, I will look into it. However, the idea here is to find a correlation between $x$ at time $t$ and $y$ at time $s$ (not both at $t$). Jul 27, 2011 at 15:06
• 30 is a bit larger than what i had in mind and probably too large for DCC to work (tough numerical rountines may have improved, check the package rgarch.r-forge.r-project.org). Indeed, a matrix reconstrution approach as in Higham's may be best here. Jul 27, 2011 at 16:00
• I don't think DCC is what you want since it looks like you're asking for constant correlation coefficients? $\big($By the fact that you didn't specify $\rho(x_t,y_s)(t)$, $\rho(x_t,y_s)_t$ or $\rho_t(x_t,y_s)$ $\big)$.
– Jase
Dec 8, 2012 at 15:11