Optimal policy "NaN elements are present in the solution."

This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location where you will have to reset your password.
Forum rules
This forum is closed. You can read the posts but cannot write. We have migrated the forum to a new location (https://forum.dynare.org) where you will have to reset your password.

Optimal policy "NaN elements are present in the solution."

Postby nk178 » Tue Oct 13, 2015 2:05 pm

Dear all,

I am trying to solve my model under discretionary policy but the following error is appeared:

"Discretionary policy: NaN elements are present in the solution. Procedure failed."

If I add the command "check;" before the command for discretion, the following error is appeared:

"Subscripted assignment dimension mismatch.
Error in stochastic_solvers (line 182)
b(:,cols_b) = jacobia_(:,cols_j);"

I attach my .mod file in case which someone wants to have a look in order to understand where the problem is. Just to give you the general picture of what I have/haven't done:

1) When I solve for stoch_simul or for osr, the Taylor rule (equation for the nominal interest rate) is present. When I calculate the optimal policy (Ramsey/discretion), I delete the Taylor rule. That is, when I solve for the optimal policy, I have one equation less. This is consistent with the suggestions of Dynare guide). We should get rid of the taylor rule when solve for optimal policy.

2) Ramsey policy seems to work. Only discretion is problematic.

3) I choose one instrument. I have tried many variables as instruments but no one works. I also tried more than one instruments. They do not work as well.

4) The "model(linear);" command is used as it is required for discretion

5) The planner objective is quadratic (some terms are in ^2 and some others are displayed as a product but this should be fine)


Thank you very much in advance,
Attachments
discretion policy.mod
ramsey, discretion and osr are presented in the .mod. The problem is with discretion.
(19.92 KiB) Downloaded 174 times
nk178
 
Posts: 32
Joined: Sat May 24, 2014 1:05 pm

Re: Optimal policy "NaN elements are present in the solution

Postby jpfeifer » Sat Oct 17, 2015 11:47 am

1. The check command does not work with optimal policy as there is one instrument equation less here.
2. You cannot do Ramsey with a linear model. The results are in general nonsense due to the naive linear-quadratic approach.
3. Try working with a simpler version, i.e. use a simple objective and an instrument whose economics you understand and try to work from there. Given your complex objective it is not clear whether a finite value for the objective function exists.
------------
Johannes Pfeifer
University of Cologne
https://sites.google.com/site/pfeiferecon/
jpfeifer
 
Posts: 6940
Joined: Sun Feb 21, 2010 4:02 pm
Location: Cologne, Germany


Return to Dynare contributions and examples

Who is online

Users browsing this forum: No registered users and 5 guests