NK_linear_forward_guidance

Dear @jpfeifer Johannes,

I tried to solve the code related to NK_linear_forward_guidance. But, distance.m file gives an error below. mod.file still works and provides outputs.

Not enough input arguments.
Error in distance (line 33)
oo_.exo_simul(M_.maximum_lag+1:M_.maximum_lag+length(shock_values),strmatch(shock_name,M_.exo_names,‘exact’))=shock_values;

Are you using Dynare 4.6.4?

Yes, I am using 4.6.4. Do I need 4.7.1 ?

No, but then I would need to see the full set of files.

I am trying to solve the same NK_linear_forward_guidance model as in your personal page.

Then there is something strange here. Line 33 in distance.m is different in the codes of my repository:

oo_ = perfect_foresight_solver_core(M_,options_,oo_);

What should it be ?

Your error message in contrast states for line 33:

which is originally line 32

Sorry, I do not understand. How can I fix it ?

It seems your file differs from the one I uploaded. Try downloading it again.

distance.m (1.7 KB)

I re-downloaded the file. But it still gives the following error:

Error in distance (line 32)
oo_.exo_simul(M_.maximum_lag+1:M_.maximum_lag+length(shock_values),strmatch(shock_name,M_.exo_names,‘exact’))=shock_values;

I upload the file which I used.

Now the line number fits. But the error message suggests you are trying to call distance.m directly. That will not work. You need to run the mod-file. It will call the m-file.

It works correctly. Thanks a lot…

Dear @jpfeifer:

For perfect foresight simulation, is it compulsory that the model block must be in non-linear form? Or is it possible to use linear model for the simulation?

Dynare can handle both linear and nonlinear models.

Thank you Prof. for the clarification.

I sent you an email last week along with my thesis mod files. I don’t know if you got the email. I will appreciate if I can book an appointment with you to discuss some of my challenges.