More than with the exogenous processes, model_diagnostics indicates the issue might be related with redundant equations and aggregation.
For example, that the bond market clears, like your equation 16 states: B = 0;
is usually implied by the agent’s first-order conditions and the assumption of a balanced government budget.
See also my answer at Generalized Schur (QZ) failed and other useful answers on this topic on the forum.

>> model_diagnostics(M_,options_,oo_)
MODEL_DIAGNOSTICS: The Jacobian of the static model is singular
MODEL_DIAGNOSTICS: there is 2 colinear relationships between the variables and the equations
Relation 1
Colinear variables:
c
c_h
c_r
k
w
b
lambda
mu
zi
y
m
cost
tr
mf
r
inv
Relation 2
Colinear variables:
c
c_h
c_r
k
w
b
lambda
mu
zi
y
m
cost
tr
mf
r
inv
Relation 1
Colinear equations
12 14 15 16 18 19 21
Relation 2
Colinear equations
14
MODEL_DIAGNOSTICS: The presence of a singularity problem typically indicates that there is one
MODEL_DIAGNOSTICS: redundant equation entered in the model block, while another non-redundant equation
MODEL_DIAGNOSTICS: is missing. The problem often derives from Walras Law.

@cmarch Thank you so much for reverting back. As no of equations have to be equal to no of unknowns, I added the B=0 equation. How do I overcome this problem of shortage of equations.

For example pi remains undetermined in this model. There is no equation for pi.How do I overcome that?

That the number of equations and number of endogenous variables be equal is a necessary, yet not sufficient condition for the Jacobian to be full-rank. All equations need to be independent, i.e. each of the them must contain non-redundant information about the variables of the model. If you are short of meaningful equations, you need to go back to your model and ask yourself questions like: Did I specify all of the relevant first-order conditions? Do they imply an equilibrium in this market? If this and that market are in equilibrium given the equations I wrote, is it really needed that I also specify this aggregation condition? The problematic equations identified by model_diagnostics are a good starting point . Again, see my answer at Generalized Schur (QZ) failed and other useful answer on this on the forum.

Yes, it is the downward nominal wage rigidity slackness condition. Is there a way to deal with this. Because for developing countries eta is generally one.

The complementary slackness condition introduces a fundamental non-differentiability into your model. You cannot solve this with perturbation techniques, i.e. stochastic simulations.

Check your timing. In particular the Euler equations seem to be wrong. The capital return is not known in advance while the bond return usually is. Also note that the CS condition you now use is still wrong. The type of problem you are solving either needs to be solved using perfect foresight or with global solution techniques.

Thank you! Is there a guide (as good as dynare) to learn how to use global techniques or perfect foresight (and how to code them) to get solutions for such models. Appreciate your help.

I modified the model and now I am getting impulse responses in line with economic theory. But I still had a question about the impulse responses. I have observed that the impulse responses in my case often breach the horizontal axis and move into the negative quadrant. While in most papers they converge to the x axis. For example for a variable like consumption, why would it move into negative territory. If it is change in consumption, I can still understand. But all my variables are in levels. Where am i going wrong.dem2_2019 .mod (8.7 KB)

Sorry, but I only get a 0 IRF when running your code.
Also, regarding global solution techniques, you might want to look at Schmitt-Grohe/Uribe’s replicated files to their JPE paper with downward nominal wage rigidities.

I have tried to resolve some earlier issues with the model. Now when i run the model, a new variable is getting created AUX_ENDO_LEAD 107 with a value of 0.1545. Can anyone help me with this? Why is it getting created and how should i solve the model now. The moddem_2020_wthprices.mod (7.6 KB) file is uploaded.

As described in the Dynare manual, a model with variables of a lead>1 are transformed into models with only one lead by introducing auxiliary variables. That is nothing to worry about and usually nothing you have to concern yourself with.

I am wondering why I am still facing problems with this model. I am not able to identify.

The steady state values are correct. Timing seems okay. Model diagnostics yields nothing

model_diagnostics(M_,options_,oo_)

SOLVE: maxit has been reached
model diagnostic can’t obtain the steady state

Where I am going wrong. By looking at the residuals, it seems the y (output) equation is causing problems which in turn is causing problems in return on capital ® and wages (w). But i am unable to point out why there is a problem with y. It takes the correct value in steady state. Appreciate any help.dem_2020_wthprices.mod (7.6 KB)