Writing a linearized model


I have a rather general question concerning writing a Dynare code. One possibility is just to write the equations of the model and specify the variables as “exp(x)” so as to get linear approximation of the logs of the variables. On the other hand, it is possible to write down in Dynare a log-linearazed model where all variables are expressed as percentage deviations from steady-state.

I’m wondering what is the reasoning when deciding which approach to use (in different papers/codes I saw both approaches). So why would it be, for example, preferable to log-linearize a model by hand before writing the code?

And generally, if one would try to rewrite a code of log-linearized model in a code of non-linear model with “exp(x)”, should it give exactly the same results?

I would be grateful if somebody could explain this issue to me!

Both approaches must yield the same results!

Historically, you had to linearize yourself and the computer did not do this for you.

Manual loglinearization often provides additional insights to the model (see the three equation baseline New Keynesian model), but it is generally not required. I almost never do it myself.

A difference are cases with e.g. infinite sums where no recursive formulation is available. In this case, you simply cannot enter the non-linear model and must do the linearization of at least this equation.