Discretionary Policy under Perfect Foresight

Hi all,
I would like to solve the discretionary monetary policy of Monetary Union under ZLB (so I am experimenting with Perfect Foresight Solver).

However, according to Groll and Monacelli(2020), there is following issue:

if we let s_{t} denote log-linearized terms of trade, then it follows:
\Delta s_{t} = \pi^{*}_{F,t} - \pi_{H,t}
where \Delta is difference, \pi^{*}_{F,t} is the foreign inflation rate, while \pi_{H,t} home inflation rate.

When solving for the issue, I thought putting two structural equations s_{t} - s_{t-1} = \pi^{*}_{F,t} - \pi_{H,t}
and s_{t+1} - s_{t} = \pi^{*}_{F,t+1} - \pi_{H,t+1} and take differentiation with respect to s_{t} is enough.

However, it seems that because s_{t} is an endogenous state variable, a ‘Markov-perfect equilibrium’ must be found (by Groll and Monacelli), and that Dennis (2007) is the right algorithm.
According to Dynare Manual, it seems that the Discretion Policy Command is built around this algorithm.
Now, under perfect foresight model, is the differentiation method described above wrong? If so, is there anyway I can use Dynare Perfect Foresight Solver to get around this problem?

Thank you in advance!

This is a hard problem. The Dennis algorithm is for linear rational expectations models. Your model will be nonlinear and not rational expectations. My understanding is that once you have set up the problem under perfect foresight based on the equivalent assumptions

policymaker acts as a Stackelberg leader, whereas the private agents and the
future policymakers act as followers

you should able to solve a normal equation system as in DSGE_mod/Gali_2015_chapter_5_discretion_ZLB.mod at master · JohannesPfeifer/DSGE_mod · GitHub. But I may be completely wrong as I don’t know what happens in case of endogenous states.

Thanks, Johannes!

I will think more about this issue then.
It seems like the problem might be more complicated than I originally thought.