Page 1 of 1

Steady State

PostPosted: Thu Oct 15, 2015 10:27 pm
by Marcos Remis
Hello,

I am replicating the model of the paper "A Credit and Banking Model for Emerging Markets and an Application to the Philippines" by Anand, Delloro and Peiris. Before I try to introduce a shock in the model, Dynare sends a message that the model does not have a steady state. I have calculated manually the steady state and introduced that values as the initial ones. However, I obtain the same error. Appreciate your advise.

Re: Steady State

PostPosted: Sat Oct 17, 2015 8:08 am
by jpfeifer
Then either your entered equations are wrong or you did a mistake in computing the steady state values. Use the
Code: Select all
resid;

command to see
Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : 0
Equation number 4 : 0.54644
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : -1e-06
Equation number 10 : 0
Equation number 11 : 0
Equation number 12 : 0
Equation number 13 : 0
Equation number 14 : 0
Equation number 15 : 0
Equation number 16 : 0
Equation number 17 : 0
Equation number 18 : 0
Equation number 19 : 0
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : -6.1882e-07
Equation number 23 : 0
Equation number 24 : 0
Equation number 25 : 0
Equation number 26 : 0
Equation number 27 : 0
Equation number 28 : 0
Equation number 29 : 0
Equation number 30 : 0
Equation number 31 : 0
Equation number 32 : 0
Equation number 33 : 0
Equation number 34 : 0
Equation number 35 : 0
Equation number 36 : 0
Equation number 37 : 0
Equation number 38 : 0
Equation number 39 : 0
Equation number 40 : 0
Equation number 41 : 0
Equation number 42 : 0
Equation number 43 : 0
Equation number 44 : 0
Equation number 45 : 5.6e-07
Equation number 46 : 0
Equation number 47 : 0
Equation number 48 : 0
Equation number 49 : 0
Equation number 50 : 0
Equation number 51 : 0
Equation number 52 : 0
Equation number 53 : -0.5
Equation number 54 : 0
Equation number 55 : 0
Equation number 56 : 5.1508
Equation number 57 : 0
Equation number 58 : -0.5
Equation number 59 : 0
Equation number 60 : -0.025057
Equation number 61 : 0
Equation number 62 : 5.5556e-06
Equation number 63 : 0
Equation number 64 : 0

Check why these equations do not solve.

Re: Steady State

PostPosted: Thu Oct 22, 2015 9:55 pm
by Marcos Remis
I have tried to fix the initial values to make all residuals zero. Unfortunately, the new residuals are not all different from zero including some residuals that I can see as inf, -inf and nan. How can I fix this?

Re: Steady State

PostPosted: Fri Oct 23, 2015 6:01 am
by jpfeifer
When setting
Code: Select all
c = c_h/alpha;

in the initval block, c_h is not yet defined. That makes e.g. zeta_l NaN.

Re: Steady State

PostPosted: Tue Oct 27, 2015 4:30 am
by Marcos Remis
I have arranged the order in which I declare the initial values and it worked. However, now I am facing with the problem that when the rank condition is verified, Dynare shows a message telling that there are 15 eigenvalues larger than 1 in modulus for 20 forward looking variables. How can I attempt to solve this?

Re: Steady State

PostPosted: Tue Oct 27, 2015 9:00 am
by jpfeifer
This looks like a timing problem. You need to check your equations whether you classified all predetermined state variables correctly.

Re: Steady State

PostPosted: Wed Nov 11, 2015 7:45 pm
by Marcos Remis
I fixed the timing problem and the model works ok. Now I have added a shock and found the following difficulties:

1. When a bigger shock was added, Dynare sends me an error message. To fix this the shock added is smaller. Is this ok? Just want to check if this does not mean some other problem.
2. Not all the moments are generated for all variables. Some of them appear as NaN. How can I fix this?
3. A message is displayed with a warning about the computation. What about this?

Thanks for your help.

Re: Steady State

PostPosted: Thu Nov 12, 2015 3:42 pm
by jpfeifer
1. You can also use the pruning option.
2. Your model has three unit roots. Because of this, these moments do not exist for those variables. Find out whether the unit roots are a bug or a feature.
3. Ignore the warning for now. Given the unit roots and the size of the model, some inaccuracy can be expected.

Re: Steady State

PostPosted: Thu Nov 26, 2015 12:46 am
by Marcos Remis
I am trying to fix the issues mentioned above and the results are the following:

1. I have used the pruning option and the results have been successful.
2. I have found there is a bug for version 4.4.1 related to Unit Root Models and also a bug in version 4.1.2 related to the fact that when a stochastic simulation is done, Dynare shows a "NaN" result in the mean column. What I tried to do is to run my .mod with the option debug, however the results obtained for the variable moments are the same. Not sure if what I am trying is correct. Appreciate your advise in this issue. Also it is important to mention that the version I am using is 4.4.3.
3. Ok

Appreciate your help.

Re: Steady State

PostPosted: Thu Nov 26, 2015 8:51 am
by jpfeifer
What type of bug do you encounter? But if it is not present in the most recent stable version 4.4.3 you should use that one.

Re: Steady State

PostPosted: Thu Nov 26, 2015 5:36 pm
by Marcos Remis
What do you mean with type? Don't know if what I will tell is the information you are referring to, so I will try. The first bug has the following text:

VERSION 4.4.1
•For unit root models, theoretical HP filtered moments were sometimes erroneously displayed as NaN

The second bug is the following:

VERSION 4.1.2
•stoch_simul: in the presence of non-stationary variables, and when selecting only a subset of variables for the output, the "NaN"s in the "mean" column may be wrongly placed

Regarding what you just told, actually I am using version 4.4.3 where those bugs are not found. However, I am still facing the same problem. Any idea how to correct the file?

As always, thanks for your help.

Re: Steady State

PostPosted: Tue Dec 01, 2015 7:22 pm
by Marcos Remis
Does anyone knows the answer to the above?

Re: Steady State

PostPosted: Wed Dec 02, 2015 9:59 am
by jpfeifer
Sorry, but I lost track of your original question. The bugs in the older versions you describe have all been fixed. So I presume the current output of Dynare is correct.
The last time I looked at your model, it featured three unit roots that cause some variables to be non-stationary. Only economic theory can tell you whether this is correct and intended.