DSGE Model Estimation

When trying to estimate a DSGE model, I keep seeing the message ‘Bad gradient’ until eventually the algorithm gives up trying to improve on the priors and returns a set of modal estimates identical to the prior means with 0 standard deviation. How should I interpret this? None of the parameters are identified? Or the model as a whole cannot be identified given the data I’m using? And are there any ideas as to how to deal with this. Add more shocks and data? Alternative priors? Apologies if this all betrays my naivety when it comes to estimating DSGE models but I would be really grateful for any assistance.

You get “bad gradient” messages if the posterior falls off a cliff whenever one or more parameters are moved by like 0.00001. That is, the small parameter change means that the model’s solution becomes unstable/non-unique, and/or it moves to a parameter value with zero prior probability.

So it’s worth checking that your initial values are well towards the interior of your prior bounds; and you could try running stoch_simuls with slightly different parameter values to check that the model can still be solved in each case.

That’s assuming that you get an OK posterior value at your prior mean — is that the case for you?

I have a similar issue here. I don’t know how to improve the model. My understanding of “cliffs” refer is that the model runs into the indeterminacy/unstable equilibrium region, and likelihood function value change dramatically even some parameter values just move a little bit. In most DSGE models, the indeterminacy issue is caused by economics meanfully parameters, i.e, risk aversion or coefficients in Taylor rule, but not by these “nuisance” parameters to control the magnitude and persistence of shocks. My strategy is to fix all the economic parameters but estimate these nuisance parameters in the first try. Taking the result as a start point, I can add economic parameters in the estimation process gradually. However, I find this strategy fail to work, that is, the code can even cause "cliffs"or "bad gradient"when only alternate the nuisance parameters. Does it mean these parameters matter for the determinacy of the model, which is difficult for me to understand?