A Problem of Writting Equations in Dynare

There is a good reason for this and it involves i)Jensen’s Inequality, ii) auxilary variables, and iii) the convention that there is a conditional expectation around every single equation you enter into Dynare.

What you have in your problem is basically an Euler equation with Omega being the stochastic discount factor. Say the SDF between t and t+1 is given by the standard

Omega=beta*(C(+1)/C)^(-sigma)

What you want to evaluate is

mu=E_t(SDF_{t,t+1} R_{t+1});

Note that the SDF depends on things not yet known at time t and that the pricing kernel involves a conditional expectation as of time t around the product of SDF and future return. This implies that at higher order, the covariance between the SDF and the return plays a role for pricing the asset. With your model-local variable, you get exactly the above expression, because whenever the SDF is encountered, it is substituted in. When you have

#Omega=beta*(C(+1)/C)^(-sigma)
mu=Omega*R(+1)

this is equal to

mu=E_t(beta*(C(+1)/C)^(-sigma)*R(+1))

where the E_t comes from the Dynare convention that there is a conditional expectation around every line.

Now consider your definition of Omega as a separate auxiliary variable

Omega=beta*(C(+1)/C)^(-sigma) mu=Omega*R(+1)
The first line tells Dynare that

Omega=E_t(beta*(C(+1)/C)^(-sigma))

This means Omega is not an expression anymore, but the conditional expectation of the SDF as of time t, which is not random anymore. Substituting this into the pricing equation gives

mu=E_t(E_t(beta*(C(+1)/C)^(-sigma))*R(+1))=E_t(beta*(C(+1)/C)^(-sigma))*E_t(R(+1))

which is very different from before, because now Jensen’s Inequality does not apply anymore and the covariance drops out.