Optimal policy in dynare

Is it possible to obtain in the dynare the trajectory of the monetary policy instrument?
that is, is it possible to extract the optimal policy rule?

Thank you in advance

Dynare supports various optimal policy tools. The answer to your question depends on what you are trying to do: discretion, commmitment, or optimal simple rule.

Hi Johanes,

thank you for your reply.
I am trying to do discretion and commitment.

Both should be doable in Dynare.

how should I proceed to do this?

By using the discretionary_policy or the ramsey_policy-command. See e.g. the examples of Chapter 5 of https://github.com/JohannesPfeifer/DSGE_mod/tree/master/Gali_2015

Galí’s textbook models do not seem to have capital stock as I understand. Is there any Ramsey optimal policy exercise with capital stock worked out in dynare?

Why should capital change anything?