I’m pretty new with Dynare and am trying to reproduce some results from the article of Cochrane (2015; do interest rates raise or lower inflation). However, I’m having trouble putting two equations (with sums) into dynare code. I have read multiple posts already regarding sums as well as an article of Verona & Wolters (2013) regarding sticky information models in dynare. However I can’t really seem to figure it out. Hopefully someone would be able to help me! I’ve attached the two equations below.

I have also attached my .mod file for reference with what I have up to now - it’s the very basic two equation version of the model, which needs to be extended with the said equations. This leads me to another question - do I need to add the Xt+1 and Phi t+1 as separate variables since I will be defining them with seperate equations in the model block? Or not?

Sorry, but I am not familiar with that model. But generally, you have to write the infinite sums recursively/find a state variable that captures them. See [Finite and infinite sums)
I don’t know if that is even possible in Cochrane’s model

Thank you! One other quick question though: in a rational expectations model, so that pi(+1) is known, you do not need to add anything else in the code of the model, correct?

So if it in the equation in the article says:
Pi = Beta * Expectationpi(+1) + Kx

you can write in the dynare code:
Pi= Beta * Pi (+1) + K*x

Is this correct or should I still work with the EXPECTATION command? Or is this only neccesary in case of backward looking expectations?

Rational expectations does not mean pi(+1) is known, but rather that a model-consistent expectation needs to be formed. When you use a timing (+1) Dynare understands that you mean the expectation is there. The EXPECTATION-operator is not needed. You need it for dealing with complicated functions of expectations, e.g. in the case of Epstein-Weil-Zin preferences.