Problem Solving Steady State

Hi

Can someone please advise on troubleshooting a problem solving the steady state?

I have changed the specification of quite a large 2-country model (introduce +ve SS inflation). I’m pretty sure I have correctly solved the SS equations although still have errors so clearly have a mistake somewhere. (works fine setting inflation = 1)

The dynare output helps identify the problem equation with the residuals from static equations - in this case it is a condition in one of the price setting equations. To find the problem I took the equation e.g.

RHS - LHS = error

and subbed in all the solved SS expressions and find they cancel out. So I cannot see how the identified equation is the problem.

Any suggestions?

Thanks
Jonathan

P.S. Code attached (model is BFS_model.mod) but as I say its quite a large model.
model.zip (15.9 KB)

Given the displayed residuals, your steady state does not fit the model entered into Dynare. There must be a mistake somewhere. Focus on the equations 65 and 68, which have big residuals. Try the attached steady state file to see the residual.
BFS_model_steadystate.m (7.82 KB)

Thanks for the reply Johannes.
Yes I realised there are a couple of large residuals and I have been focusing on the equations in question.
The strange thing is that substituting in the calculated SS values into one of these, the terms cancel out.

For example, eq 65 is sigmma/(sigmma-1) * X1 - X2 * P,
where:
X1_bar = UC_barMC_barY_bar/term1
X2_bar = UC_bar*Y_bar/term2
MC_bar = P * (sigmma-1)/sigmma * term1/term2

All these terms cancel out so I’m unclear where the residual is coming from. As I understood it, each of the equations was evaluated (LHS-RHS) by substituting in the initial values from the SS solver - is this incorrect? I’m clearly missing something.
I’m sure I’ll get to the bottom of it although I usually find the culprit quite quickly following this process.

Thanks for your help.

As I said, my uploaded steady state file computes the LHS-RHS of this equation using the values you provided (see the bottom of the file) and actually has a residual. Work back from there.

Hi Guys,

Please help me.
I am aware that J. Pfeifer suggested that the tolerance level could be changed manually in the Dynare code. I wonder if it could be relaxed to be as high as 1.0e-003 without distorting the simulation results. Note that I can compute (and have computed) the SS values of all endogenous variables using Matlab fsolve with ‘TolFun’,1e-13,‘TolX’,1e-13. However, when the SS file is called by Dynare, some of the residuals are close but not equal to zero, especially eq. #23.

Residuals of the static equations:

Equation number 1 : 0
Equation number 2 : 0
Equation number 3 : -9.2641e-005
Equation number 4 : 0
Equation number 5 : 0
Equation number 6 : 0
Equation number 7 : 0
Equation number 8 : 0
Equation number 9 : 0
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 : 1.1186e-005
Equation number 20 : 0
Equation number 21 : 0
Equation number 22 : 0
Equation number 23 : 0.00047775
Equation number 24 : 0
Equation number 25 : 0
Equation number 26 : 0
Equation number 27 : 0
Equation number 28 : -2.8668e-006
Equation number 29 : -9.7977e-005
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

??? Error using ==> print_info
The steadystate file did not compute the steady state
Thank you so much

I don’t get your point. If your steady state file results in residuals of this size, there must be a mistake in either the steady state file or the model equations. With your specified tolerance, there should not be any meaningful residuals (unless there is a pathological nonlinear case as e.g. with marginal utility of consumption for very high risk aversions). In any case, they do not match and you should not tweak the tolerance to force the model to solve. Rather, find the source of the problem.

Hi Pfeifer,

Thank you very much for your help.

Fisrt, I thought that -2.8668e-006 for example is -0.0000028668 while -2.8668e+006 is -2.8668e * 10^6. That is the reason why I was thinking of choosing a different tolerance value when Dynare handles the NSS file. By the way, with a different value of one of the parameters and a different form for #19, all residuals are zero except in two equations (#19 : 0.0011 and #23: 0.0004).

Second, when I say that I can solve the NSS it is because once recursive substitutions hit a simultaneous block I use fsolve with ‘TolFun’,1e-13,‘TolX’,1e-13 to get those endogenous variables and plug them back into the SS equations to recover other endogenous variables.

I am sorry I messed up (?) with scientific notation. I need to stick to the other route.

Thank you very much.

Your reading of the scientific notation is correct. Nevertheless, if you use a tolerance of E-13 to compute the steady state and still have residuals in Dynare, there is something wrong. If your residuals go away for one particular value, this gives you an indication which parameter is involved in the problem.

Hi jpfeifer
Thank you so much for your guidance.
I must struggle on with the whole thing.