Hi,
I have a rookie question and I hope I’m posting it in the right place: I’m playing with model A, which can be solved by A.mod and steadystate_A.m file.
Now I’m adding a new policy instrument to model A, this will change both the model block in A.mod and the steady state equations in steadystate_A.m file. I call these new files A1.mod and steadystate_A1.m.
However, I cannot produce IRFs based on these two new files, it keeps saying steadystate cannot be computed. BUT if I introduce the new policy variable as a parameter(with assigned value) in A.mod and set it to be a global parameter, then I can run A.mod file with steadystate_A1.m (obviously properly redefining the function name). It will produce similar IRFs compared to those generated by running A.mod and steaystate_A.m, with some minor changes in magnitude.
Does that tell me there are some mistakes in A1.mod file? Because steadystate_A1.m obviously can be used to compute steady state.
I hope my question makes sense. Thanks!
That sounds like a programming issue that is impossible to debug without access to the files.
Dear @jpfeifer, I’m attaching the mod and steady-state files in this email.
- A.mod is a model without tariffs (the policy shock I want to introduce to the model).
- A1.mod is a model with tariffs, where the tariffs follow a similar process as TFP. Tariffs both show up in the model block, as well as the analytical solution of the rest of the model.
- steadystate.m is the file that should solve the steady state solutions for both A.mod and A1.mod. Note, when t1_bar=t2_bar=1, the equations in the steadystate.m collapses to the steady-state equations for A.mod.
A.mod (8.0 KB)
A1.mod (8.7 KB)
steadystate.m (2.6 KB)
I’m not sure if this is a programming issue, or the tweak I did to the model causes the dynamic model to be inconsistent to the steady state equations. Any thoughts would be greatly appreciated! Thank you!
In A1.mod
, line 118 uses Cbar
, but it is only defined in line 125.
1 Like
Dear @jpfeifer, thanks a lot for pointing out the error!
Given T1 and T2 depend on C and C2, I removed them and rewrite the aggregate accounting equations. This time, the NaN’s are gone, but still not able to produce impulse responses. Now I’m leaning toward to believe the model block is inconsistent with the steady state. Please advise, thank you!
A1.mod (9.3 KB)
Given such a residual at the initial value:
Equation number 11 : -554.5303 : 11
there must be an inconsistency. Focus on that equation.
1 Like