# Perfect Foresight Initval (Non-Linear to Linear)

Hello,

I have a small nonlinear PF model that I am trying to solve in dynare. I cannot get rid of a few of my residual errors indicating some kind of an issue with the steady state solution. What is the most likely issue that is causing this? Obviously the initial steady state guess computed analytically does not match the steady state of the static model, which might indicate a problem with the analytical solution.

Also, can I simply write the linearized version of this model and solve it with the default perfect foresight solver or are there any additional options that need to be specified.I read in another thread that this can be done, but I could not find any information on how that needs to be specified. Assuming that one can just plug the linear version of this model without specifying any additional options, the model has a solution and all of my residuals are zero. My other question is what do the residuals in the linear version of a model whether PF or stochastic represent?

Here is my mod file. Another puzzling thing is that with the default steady command half of my equations have residual errors whereas if I try chris sim’s solver steady(solve_algo=3); I get only one residual with my equations. I don’t really understand this.

PF_seg.mod (4.0 KB)

I would appreciate any feedback if possible. Thanks

`b_Lmv=b_Lmv_ss*((b_Lmv(-1)/b_Lmv_ss)^(rho_bl))*u;`
Because `u` is an exogenous variable with mean 0, `b_Lmv` has steady state 0 as well. But this is inconsistent with the other equations and `b_Lmv_ss`
2. Using a linearized model does not help as the steady state values show up as parameters, i.e. you need to compute the steady state of the nonlinear model as well. If your analytically computed steady state is wrong, your linearized model will be wrong as well.
3. Residuals in linearized models typically indicate mistakes in the respective equations like a forgotten constant term.
4. The displayed residuals in your case are after trying to solve for the steady state numerically. Each solver will stop with a different non-solution, explaining the different output. The `resid` thus belongs before `steady`

Thanks for the feedback. Wouldn’t the same issue be present in any NK model with a shock to the taylor rule?Since the shock would have a mean of zero that would also imply a zero short-term rate in SS, but that is not the case in general.Update: Nevermind, I see your point. I would have to back out the mean of the shock in SS, which is not zero in the nonlinear model.

Also, do you have any idea why the default solver (simply) steady; produces residual errors for about half of my equations whereas steady(solve_algo=3) only produces residual for the equation that you mentioned?

Issues with the nonlinear model obviously also imply issues with the linear model, but in general is it still possible to write the linear version of a model in dynare and solve it with the perfect foresight solver just like one can do with stoch_simul?

1. If you have a multiplicative Taylor rule, you have `exp(u)`. Only in the additive version, it is `+u`.
2. Because different solvers try different parameter values and stop at different points.
3. If you do the linearization correctly, that is easily possible.