Optimal Policy using OSR


I have been trying to calculate the osr for mi DSGE model for the first time. The parameter I would like to evaluate which is it´s optimal value is called “T”, and in the parameter section of my code I have given it a value “T=0.1;”.

When I run my code I get the following statement


OSR: Initial value of the objective function: 0

f at the beginning of new iteration, 0.0000000000
Norm of dx 0

Improvement on iteration 1 = 0.000000000
improvement < crit termination
zero gradient


T                         0.1

Objective function : 0

When I change the value of T at the parameter section of my code, the Optimal Value is always the one I set as parameter. Any clue why this happens?
Thanks in advance

For some reason your objective function is flat in the parameter T. Maybe it’s not identified or you did a mistake when coding it. Check where T enters the model.

Thanks for your reply!
Is there an example code for optimal policy other than the one in the user guide or manual?
I have tried the command for different parameters other than T, those that influence the procyclicality of government expenditure for example, and I always get the same result.
Thanks in advance for any comment

Please provide me with the file.
Some OSR examples are at github.com/DynareTeam/dynare/tree/master/tests/optimal_policy

I could calculate the optimal value of the parameters in my model thanks to your examples!
I have one extra question, if you have the time, can I fix an upper or lower bound over the value the parameters?

See [Restricting parameters in Dynare)