Page 1 of 1

coding expectation of a product

PostPosted: Wed Mar 06, 2013 12:30 am
by pg28
hi

I want to code in Dynare an equation that can be simplified to something as:
aE[X(t+1)]=bE[X(t+1)*Y(t+1)]
where E[X(t+1)*Y(t+1)] is the expectation of a product of two random variables

Any hint on how can I code this in Dynare?

if I define the variable Z=X*Y and I write:
aX(+1)=bZ(+1)
then Dynare seems to understand:
aE(X(t+1))=bE[X(t+1)]*E[Y(t+1)] , that is, a=bE[Y(t+1)]
but this is not what I want to write.

Many thanks for the help

Re: coding expectation of a product

PostPosted: Wed Mar 06, 2013 1:50 pm
by jpfeifer
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.

Re: coding expectation of a product

PostPosted: Thu Mar 07, 2013 3:18 pm
by pg28
many thanks for the reply. Just to clarify:

in previous posts I read Dynare automatically adds an E_t in front of all equations.
Thus, if I define the variable Z=X*Y, when I write z(+1), then Dynare understands E[X(t+1)*Y(t+1)], not E[X(t+1)]*E[Y(t+1)]. Is this correct?
And a different issue is that up to the 1st order the covariances/variances terms disappear

Thanks again

Re: coding expectation of a product

PostPosted: Thu Mar 07, 2013 3:24 pm
by jpfeifer