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.

ADP.mod.txt (9.79 KB)

Then either your entered equations are wrong or you did a mistake in computing the steady state values. Use the

```
resid;
```

command to see

[quote]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[/quote]

Check why these equations do not solve.

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?

ADP.mod.txt (9.95 KB)

When setting

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

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?

ADP.txt (9.94 KB)

This looks like a timing problem. You need to check your equations whether you classified all predetermined state variables correctly.

I fixed the timing problem and the model works ok. Now I have added a shock and found the following difficulties:

- 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.
- Not all the moments are generated for all variables. Some of them appear as NaN. How can I fix this?
- A message is displayed with a warning about the computation. What about this?

Thanks for your help.

ADP.txt (10.2 KB)

I am trying to fix the issues mentioned above and the results are the following:

- I have used the pruning option and the results have been successful.
- 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.
- Ok

Appreciate your help.

ADP.mod.txt (10.2 KB)

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.

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.

Does anyone knows the answer to the above?

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.