# Multiplying of expected variables

Hi every body.

Im a student working on a DSGE model. I got into trouble with my Dynare code and I really need your help.

Here is the question.

E_t (M_t+1*A_t+1)=1/(1+i_t)

The above equation is of the equations in my code. But when I write it in Dynare as M(+1)*A(+1) =1/1+i, there is a problem here. In other word, my equation is E(XY) while what I write in Dynare is E(X)E(Y) which are different due to covariance (x,y).

This is Professor Pfeifer answer for the exact similar question.
“If you use order=1, this is exactly what you should get. In a linearized version, certainty equivalence holds and the covariances drop out. The trick with the auxiliary variable is usually the correct way for higher order approximations. If it does not work, please post the mod-file.”
Many thanks
I got it.
let me rerun my code

Hi,

Dynare applies the conditional expectation to the whole equations, so there is no problem here : if you consider an approximation of order k\geq 2 you will have the covariance.

It would be trickier if instead you wanted to have \mathbb E_t[X_{t+1}]\mathbb E_t[Y_{t+1}] in an equation. Then you would have to resort to auxiliary variables. A similar problem is discussed here

Best,
Stéphane