Policy Frontiers over time

Dear all,

I am new to DSGE models and I am sorry if my question is trivial or already answered before, but I haven’t found an answer.

I would like to examine the performance of different Taylor rule specifications in different time periods via OSR and Policy frontiers. I have 24 recursive estimations of my model.

My questions are:

  1. As far as I know, the OSR is affected only by estimated shocks, not by the parameters, is that really true?
  2. Does it make sense to loop over the recursive estimations and set the shock parameters accordingly for each Policy frontier?
  3. I tried running set_param_value, but that does not work for shock (or any exogenous variables probably?). How would I achieve that?

Thank you very much in advance!



  1. The OSR depends on all the parameters in the model. Some may have no effect on the design of the optimal policy, but you cannot exclude parameters a priori.

  2. Why not.

  3. You can rewrite your model imposing that the variance of each innovation is equal to one and multilply each innovation with a parameter to set the standard deviation. Then you should be able to use set_param_values as usual. Otherwise, you can change manually the values on the diagonal of M_.Sigma_e (the innovation variances are ordered as in varexo). I can show you if you post the files.


Thank you very much for the prompt response!

Here is a simplified version of what I am working with:
Policy_Frontiers.rar (31.3 KB)

This code works without setting the shocks with set_param_values, but returns identical results for each recursion. Setting the estimated shock values results in the following error:

Index exceeds the number of array elements (1).

Error in run (line 56)
        set_param_value('etaa', p_etaa(i));

And one more question - I was also not sure from which part of the oo_ to extract the standard deviations of each recursive estimation. I used the posterior_mode for parameter values, so I used oo_.posterior_mode.shocks_std for the standard deviations. Is that the correct approach?

Thank you very much for your help!

Kindest regards,


Hi, I don’t understand your codes.

The error message you show can be easily understood, since the p_etaa variable (the same for all the std) saved in the mat file is a scalar…

You call dynare only once. But even if you called dynare after changing the parameters (in the loop) it would not work since the parameters are reset in the mod file. You need to change the values in the mod file.

If you obtained the parameter estimates using recursive estimation (passing a range to nobs in the estimation command) you should directly read the parameter estimates from oo_recursive_ structure.


What exactly do you mean by

It is only the parameters of the model that matter, including the parameterization of the exogenous processes. The exact shock realizations don’t matter. Thus, I don’t understand why you are conducting the recursive estimations. If you suspect parameter instability, you must allow for a time-varying parameter model. In contrast, the recursive estimation would assume the parameters to be constant over the respective sample, with their true values only slowly revealed over time.

I am sorry for the confusion, the shock stds were of course not supposed to be only scalars, that was a mistake. I adjusted the script and the mod file and it works much better. I am getting results for the first 18 periods, but then it fails on the nineteenth with this error:

Error using barrier
Gradient at initial point contains Inf, NaN, or complex values. Fmincon cannot continue.

Error in fmincon (line 834)
    barrier(funfcn,X,A,B,Aeq,Beq,l,u,confcn,options.HessFcn, ...

Error in dynare_minimize_objective (line 111)

Error in osr.run (line 143)
    [p, f] =

Error in GSW_model.driver (line 1422)
[info, oo_, options_, M_] = osr.run(M_, options_, oo_,

Error in dynare (line 310)
    evalin('base',[fname '.driver']);

Error in run (line 63)
    dynare GSW_model.mod noclearall;

The rank condition is not verified either, so there must be something wrong going on but I don’t know what.

Here is the corrected file, which hopefully at least makes sense now:
Policy_Frontiers.rar (37.0 KB)

In summary, I iterate over the estimated parameters from the recursions and run OSR every time to get a policy frontier for each period.

At first, I thought that parameters had no effect on the frontier, hence my question, but I realize now that is not true, I just had a silly error in my code. As you said yourself, I had to change the values in the mod file.

Your model does not handle parameter dependence correctly. You should use model-local variables with the # operator. If you used the same model for estimation, your estimation results are wrong.

Thank you for your help, professor.