<p>Indeed, you can directly code the non-linear necessary equilibrium conditions into Dynare and it'll perform the necessary linearizations for you in order to solve the model locally with perturbation methods (refer to <a href="https://www.dynare.org/wp-repo/dynarewp002.pdf" rel="nofollow noreferrer">this to see how Dynare solves models</a>).</p>
<p>Regarding the question about why log-linearize by hand, it may depend on context. But in general it serves two purposes:</p>
<p>i) in some cases it allows the researcher to solve the model analytically (although locally) since it reduces the model to a linear system;</p>
<p>ii) the linearized model serves as a simplified representation of the full model around a particular point in the variables space, allowing for a cleaner analysis of the properties of the model. For instance, in the NK model you mention, the log-linearization transforms complicated highly non-linear relationships between three variables, into just three lines that represent (locally and approximately) those same relationships where you can cleanly assess, e.g., how an exogenous shock to nominal interest rate affects the endogenous variables in equilibrium.</p>
<p>Clearly, linearization as being an approximation of the full model has the drawback that in some applications it may not capture enough qualities that we would want to investigate (see <a href="https://www.st-andrews.ac.uk/%7Ewwwecon/repecfiles/4/1611.pdf" rel="nofollow noreferrer">this</a>).</p>

CC BY-SA 4.0
2024-06-12T20:27:13.027Z
thanks for your clear answer. can you recommend a good book for understanding solutions of DSGEs or generally what DSGEs are all about. If the answer is McCandless's text, that's fine. Thanks.
mark leeds
CC BY-SA 4.0
2024-06-14T00:36:10.810Z
I recommend Dynamic General Equilibrium Modeling by Burkhard Heer.
teddi
CC BY-SA 4.0
2024-06-15T09:53:39.770Z
Thank you teddi. I've never heard of that one so I'll check it out.
mark leeds
CC BY-SA 4.0
2024-06-12T19:21:42.590Z
2024-06-14T16:12:29.497Z
2024-06-14T16:12:29.497Z
manifold
<p>I have a question about solving New Keynesian models, particularly on Dynare. In some textbooks, I have seen that they log-linearize basic NK models and arrive at 3 equations, such as Phillips and IS curves. They linearize by hand. My question is whether I can write my nonlinear FOCs directly on Dynare and get the solutions. Is it necessary to arrive at 3 equations or can I just write complex nonlinear formulas to Dynare and get the results? What is the purpose of log-linearizing by hand?</p>

<dsge><new-keynesian-economics><log-linearization><dynare>
New Keynesian DSGE - Dynare
festakonik
# New Keynesian DSGE - Dynare

(Asked by: username_0 on 2024-06-12)

I have a question about solving New Keynesian models, particularly on Dynare. In some textbooks, I have seen that they log-linearize basic NK models and arrive at 3 equations, such as Phillips and IS curves. They linearize by hand. My question is whether I can write my nonlinear FOCs directly on Dynare and get the solutions. Is it necessary to arrive at 3 equations or can I just write complex nonlinear formulas to Dynare and get the results? What is the purpose of log-linearizing by hand?

**Tags:** dsge, new-keynesian-economics, log-linearization, dynare

---

## 1 answers

### Answer by username_1 on 2024-06-12. Score: 1

Indeed, you can directly code the non-linear necessary equilibrium conditions into Dynare and it'll perform the necessary linearizations for you in order to solve the model locally with perturbation methods (refer to [this to see how Dynare solves models](https://www.dynare.org/wp-repo/dynarewp002.pdf)).

Regarding the question about why log-linearize by hand, it may depend on context. But in general it serves two purposes:

i) in some cases it allows the researcher to solve the model analytically (although locally) since it reduces the model to a linear system;

ii) the linearized model serves as a simplified representation of the full model around a particular point in the variables space, allowing for a cleaner analysis of the properties of the model. For instance, in the NK model you mention, the log-linearization transforms complicated highly non-linear relationships between three variables, into just three lines that represent (locally and approximately) those same relationships where you can cleanly assess, e.g., how an exogenous shock to nominal interest rate affects the endogenous variables in equilibrium.

Clearly, linearization as being an approximation of the full model has the drawback that in some applications it may not capture enough qualities that we would want to investigate (see [this](https://www.st-andrews.ac.uk/%7Ewwwecon/repecfiles/4/1611.pdf)).

> **Comments:**
> **username_2**: thanks for your clear answer. can you recommend a good book for understanding solutions of DSGEs or generally what DSGEs are all about. If the answer is McCandless's text, that's fine. Thanks.  
> **username_3**: I recommend Dynamic General Equilibrium Modeling by Burkhard Heer.  
> **username_2**: Thank you teddi. I've never heard of that one so I'll check it out.  

---

