OLR/OSR Syntax

Hi Michel & Dynare friends,
Pardon the embarrasingly simple nature of these questions. Please assume I illiterate with respect to codespeak (which is not far from the truth).

I have a linear model

model (linear);

Problem #1)
Withing this linear model section I have a simply linear policy rule where the instrument is named “int” and the parameters in the rule are “a,” “b,” and “c.”

intr=aintr(-1) +(1-a)(bpie(+1)+cygap(+1))+eps_intr;

Instead of assuming a,b would like to find out the optimal weights of a*, b* given the parameterization of the model.

How do I provide the param, weights, osr statements? Clearly the following attempt was wrong!
osr_params a b;
var intr(-1), pie(+1), ygap(+1);
osr intr;

In the initial parameters statement, do I include the parameters that are also in the osr_params statement? Do I set values to some inital value?

What do I do, if anything with the intrest rate shock? Do I first find the optimal values and then tag the shock on for stoch_sim?

Case #2)

what to do with a linear-quadratic rule?


Case #3) Assuming I figure out how to do #1 and #2, are there additional steps/considerations to go with the olr for optimal commitment?

Case #4), how can one program in DYNARE optimal discretion, whether the societal loss function may be different from the target regime for which optimal weights are sought?

Thanks! I really do appreicate any help that can be provide, particularly any example code out there.

Cheers, Peter
P.S. I attached the simple NK model code that wish to play with.
nkpmexerxx.mod (609 Bytes)


I have same problem

please help me