I am looking for a way to compute approximation with perturbation approach around a point different from the steady state. I tried with histval (but it only changes the starting point of the simulation), and init followed by steady(no check) but double checking oo_.dr.ghx never changes.
Has anyone done it? Is it possible to do that in Dynare? I would say that it is doable, but I am afraid the algorithm of stoch_sim has to be changed in order to take in consideration the fact that it has to be considered x_{t+1}=h(x_t,0) instead of x_{ss}=h(x_{ss},0), and so on. Am I wrong?
Probably I understand where is the problem, but I still have some doubt on how to solve it.
Consider that I was using init + steady(no check) inside a loop, changing the new point every iteration. However for the first iteration, I am using the filename_steadystate.m.
It could be that since a filename_steadystate.m exist, when I call steady(no check) it supersedes the init command calling instead the filename_steadystate.m file?
Hence I have few questions:
Is there any difference between setting the steady state through init (without using neither steady_state_model or filename_steadystate.m) or setting steady state using steady_state_model when then I use call steady with the nocheck option?
If my intuition is correct and having filename_steadystate.m neglects the init commands, is it enough to use a stead_state_model block, or it also will be neglected? In case any idea on how could I solve this issue?
Just for your information, unfortunately I cannot share the code.
Whenever you have initval without a steady state file or steady_state_model block, Dynare will internally try to compute the steady state. Hence steady(nocheck) will only instruct Dynare to accept the result of that computation at its face value.
That is different whenever you have a steady state file or a steady_state_model block. In that case, steady(nocheck) instructs Dynare to accept the values provided as steady states, without trying to solve for a steady state. initval will generally be ignored for all variables set in the steady state file. It is only useful for optimal policy exercises where you need to provide initial values for the instruments and the steady state file is a conditional one.
Thanks for explaining the difference. Then I have two more questions
In the case where I have both a steady_state_model block and a filename_steadystate.m file, which of the two is used and which is neglected?
I want to loop over different steady state points that are stored in a matrix where the columns contain the value of each variable of the model for a different steady state (this matrix comes from another code). Is there a smarter way to automate this, rather than overwriting filename_steadystate.m with the new values?
I tried to dynamically set the values of the variables inside the steady_state_model, doing like this:
The filename_steadystate.m takes precedence in that case.
Define a new parameter that takes as its value the index of the parameter vector. Then within the filename_steadystate.m load the steady state matrix and use the passed index in the parameter to select the columns. That does exactly what you are trying to do in the steady_state_model block.
Thank you for the answers.
I have hence a final question: if the point I set as steasystate using nocheck, is not a steady state point (hence with residuals different from zero), the approximation around this point correctly takes in consideration the fact that the point is not a steadystate, or all the computations called by stoch_sim are assuming the point as a steadystate (hence with residuals equal to zero)?
In case stoch_sim assumes the point as steadystate, is it possible to correctly compute the approximation of the policy function around a non-steadystate point?
I am not sure what you mean with that question. Dynare will correctly compute a linear approximation about the point you provide. That point won’t be the steady state. Or what did you mean?
I wasn’t sure whether stoch_sim assumed to be in a steadystate point, or if instead it was able to compute approximation also around any other point. However, if I correctly understood it is able to compute the linear approximation also for non steady state point.