Code dynare to estimate inflation targeting

Hello.
I am working on a paper whose goal is to estimate an inflation targeting model for the WAEMU countries using a Bayesian approach. My problem comes from the fact that I can not perceive how one can integrate the loss function of the central bank in the model. My search for an appropriate code for other countries has yielded nothing.
I would like someone to provide me with a code where the loss function is integrated.

Thank you.

Why do you need the loss function within the model?

Indeed, if I stick to the literature, the optimal rule is determined under the minimization of an intertemporal loss function constrained by the structure of the economy (Svensson, 2000). And the studies in the WAEMU zone have adopted the same procedure except that I use the Bayesian approach to estimate my results.

But you can estimate models under optimal policy, e.g. examples/Ramsey_Example.mod · master · Dynare / dynare · GitLab

Thank for the suggestion. I will take account this point of vew on my estimation.

Thank you :pray:t6: