Problem with finding steady state

Dear all

I have a problem with steady state of my model and it seems that there is no steady state there.

Let me elaborate more about my model. I have modeled my economy mostly based on Gerali et al (2009) (Credit and Banking in a DSGE Model of the Euro Area) with following modifications:

1- There is no impatient household in the model (I have modeled only patient households and entrepreneurs);

2- In the model, economy enjoys a competitive labor market;

3- Having the effect of government spending on infrastructures in mind, I have added a new factor “kg^(theta)” to entrepreneur production function in which “kg” represents stock of government capital (infrastructures and …);

4- In addition to tax revenue, government owns oil revenue which is mostly driven by development of oil price in international markets. Based on this, government oil revenue has been modeled as a simple AR(1) process.

5- On expenditure side, government spends its revenue on consumption and investment. Government investment in infrastructures has some persistence and beyond that in each period it is affected only by oil revenue gap (relative to steady state amount of oil revenue) and respective shock.

After solving model for F.O.Cs, due to some complexity in the equations I could not compute steady state values for variables analytically using pencil and paper. Instead, when I made some conjectures on steady state values based on rough intuitions such as setting Tobin’s Q equal to 1, there was no way to solve the steady state model but to set value of a parameter in such a way that right and left sides of some equations become squared. Actually I have set the parameter by trial and error. By doing so, unfortunately the model cannot be estimated and technically dynare_sensitivity analysis cannot be performed in a meaningful manner (results indicate that 0% of prior gives unique saddle path solution). It seems to me that steady state block does not work for every sample draw from parameters’ prior distributions since in each draw at least one parameter should be set by trial and error to square the steady state equations as I have mentioned before.

So I tried to make a steady state file without imposing any intuitions or restrictions but the file does not converge.

Finally, using an adhoc method, I found that if I assign a value to production in steady state, I can solve other variables step by step and in this context it seems that dynare_sensitivity function works for my model. However, model diagnosis indicates a singularity issue and there are remarkable persistence in some IRFs.

It is worth mentioning that because of problems I faced in calculating steady state values, I had to use “steady_state()” function in dynamic model. I found that using this function could be a ground for singularity issue I mentioned before. But I cannot replace each steady_state function used in my model by a simple formula which calculates steady state values based on model parameters. Additionaly, by replacing steady_state functions with some specific numbers, dynare_sensitivity analysis cannot be applied in a meaningful manner as I mentioned before (results indicate that 0% of prior gives unique saddle path solution). Again in this case I guess steady state block does not work for every sample draw from parameters’ prior distributions since I assigned the numbers replacing steady_state function in such a way that in base model (I mean the model in which values of parameters are set in parameter block at begining of file) right and left sides of some equations become squared.

I would be appreciated if anyone can help me to solve these problems?

Best Regards.

I am not sure I can follow. Why don’t you write a steady state file that sets the parameter values to satisfy a calibration target? An example would be https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Jermann_Quadrini_2012/Jermann_Quadrini_2012_RBC/Jermann_Quadrini_2012_RBC_steadystate.m

Hi professor
I tried to use gali (2010) dsge model (gali_2010_calib_target) for finding steady state, but the model give an error that model can not find steady state. It’s amazing for me that model can’t recognize two variable rd and rb, and i got #nan error for equations (i.e. equations 17 and 18) related to them.
could you please check the model and help me to solve the error?
Best regards

AAA.mod (16.3 KB) AAA_steadystate.m (4.6 KB) solve_calibration.m (2.8 KB)

It’s amazing for me that model can’t recognize two variable rd and rb

Dynare is not a model, and the program understands rd and rb to be endogenous variables because you have told it as much. It requires a steady state to solve the model, and the files you are providing fail to produce one. The values produced by solve_calibration.m are complex at the initial values provided. This is probably either because you are providing poor starting values or because you have incorrectly written down the residuals in solve_calibration.m.

If you think it is an issue of starting values you could try changing them or using a different algorithm to try to compute the solution. fsolve does not allow for constraints, but lsqnonlin does, which could help you avoid issues with complex values. The solver is not an economist and does not know that many endogenous variables have natural restrictions placed on their values.

I would recommend only to do the exp()-substitution once the model works.