Question about Timing of Covariance Matrix in Dynare

Dear all,

I have a quick question about timing of the covariance matrix in dynare

I have the standart definition for SDF

  • {{\Lambda}}_{t}={{\beta}}\, \frac{{{U^{C}}}_{t}}{{{U^{C}}}_{t-1}}

and the standard Euler Equation

  • 1= \mathbb{E}[\Lambda_{t+1}\, R_{t+1}]

I am confused whether oo_.gamma_y{2,1}(strmatch(‘Lambda’,M_.endo_names,‘exact’),strmatch(‘R’,M_.endo_names,‘exact’); gives me

  1. =cov[\Lambda_{t+1},R_{t+1}]


  1. cov[\Lambda_{t},R_{t+1}]=cov[\Lambda_{t+1},R_{t}]

if the latter is correct then in order to get cov[\Lambda_{t+1},R_{t+1}]

do i need redefine two auxiliary variables ie


and then look for


I tried both ways and I got different results so wanted to ask you

Thanks for your help


You should be getting Cov(\Lambda_t,R_t), which for covariance stationary series is the same as Cov(\Lambda_t,R_t), because we are considering unconditional moments.

Dear Professor Johannes,

thanks for the reply. I attached your dynare code for replicating ‘Benjamin Born and Johannes Pfeifer (2014): “Risk Matters: A comment”, American Economic Review’

I just added two auxiliary variables:
exp(lambda_TP1)=exp(lambda(+1)); line 218
r_tp1=r(+1); line 219

then I look at covariance of


They have different values. Is it because with auxiliary variables in fact I have
cov(\mathbb{E}[\Lambda_{t+1}],\mathbb{E}[R^{*}_{t+1}]) (but covariance of two scalars (Expectations) should be 0)
or is it because it is open economy model with a unit root?

Maybe it is something very trivial that I am missing.

What I am after is the risk adjustment effect after linearizing the model around the risky steady state (not \Lambda_{t} but around \Lambda_{t+1}) that is why I am looking for the cov(\Lambda_{t+1},R^{*}_{t+1})

Using the answer you provided that for cov-stationary series cov(\Lambda_{t},R^{*}_{t})=cov(\Lambda_{t \pm i},R^{*}_{t \pm i}). I just wanted to be sure before I proceed further

Thanks a lot for your help and wish you a wonderful weekend


Born_Pfeifer_RM_Comment.mod (9.1 KB)

I guess it’s all about the information set. There is a difference between the unconditional covariance between R_t and \Lambda_t, cov(R_t,\Lambda_t) and the unconditional covariance between the conditional expectations of the same variables cov(E_t(R_{t+1}),E_t(\Lambda_{t+1})). The latter is what you get with your auxiliary variables.