using stoch_simul I can get the matrix of theoretical contemporaneous cross correlations between HP filtered variables. Is there a way to obtain theoretical cross correlations of HP filtered variables at various leads and lags?

The (theoretical and simulated) cross autocorrelations are not displayed by Dynare but are computed. You will find the autocorrelation function in oo_.gamma_y. By default the order of the autocorrelation function is five. To display the autocorrelation of order h (0<h<=5 if you do not change the default) you just have to type

oo_.gamma_y{h+1}

oo_.gamma_y is a cell of arrays this explains the curly braces. The first element of this cell is the covariance of the endogenous variables, the 5 following elements are for the autocovariance function, last element is for the variance decomposition.

Hi Stéphane,
I’m using V 4.4.2, and I want to get the cross-correlations 5 lags 5 leads, How do I get it, and is there a command to do it easily, if so, what and where do I have to type it.
Many Thanks
Martin