# Log linearize forward looking variable manually?

**URL:** <https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678>\
**Category:** General DSGE Modeling\
**Created:** [27 September 2020 12:22 UTC](https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678 "2020-09-27T12:22:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Noodle614](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@Noodle614](https://forum.dynare.org/u/Noodle614)\
**Post date:** [27 September 2020 12:22 UTC](https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678/1 "2020-09-27T12:22:23Z")

</div>

Hi,

I can solve the model in dynare but I need your help for the following problem: How does one derive a log-linearized expression for a forward-looking variable around the steady-state? For example, the price dividend ratio can be defined as

\frac{P\_t}{D\_t} = E\_t [M\_{t,t+1}\frac{D\_{t+1}}{D\_t}(1+ \frac{P\_{t+1}}{D\_{t+1}})]

The goal is to derive the relation between \frac{P\_{t+1}}{D\_{t+}} and shocks at t+1, assuming that at t the system is in steady state so \frac{P\_t}{D\_t} is the steady state value C.

If we ignore the expectation and log-linearize it, I get

\log C = m\_{t,t+1} + \Delta D\_{t+1} + \log(1+\frac{P\_{t+1}}{D\_{t+1}})

and clearly one can solve \frac{P\_{t+1}}{D\_{t+1}} analytically (assuming that m and \Delta D are known functions of shocks).

But, isn’t ignoring expectation imposing that the equality hold **state by state** , instead of on average?

Please advise, thanks!

---

<div class="post-metadata">

**Author:** ![jpfeifer](https://forum.dynare.org/user_avatar/forum.dynare.org/jpfeifer/32/5044_2.png) [@jpfeifer](https://forum.dynare.org/u/jpfeifer)\
**Post date:** [28 September 2020 11:09 UTC](https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678/2 "2020-09-28T11:09:57Z")

</div>

You linearize within the expectations (Leibniz Rule), so it stays there.

---

<div class="post-metadata">

**Author:** ![Noodle614](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@Noodle614](https://forum.dynare.org/u/Noodle614)\
**Post date:** [28 September 2020 13:12 UTC](https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678/3 "2020-09-28T13:12:12Z")

</div>

Thanks for your reply. I think I understand that in dynare I should put it that way.

But I was curious if my goal was to understand how \frac{P}{D} depend on other state variables (analytical expression), can we rely on this log-linearization? As you said, it still has a Leibniz rule so the integral is still there.

How to get a linear relationship between \frac{P}{D} and other state variables?

Do we need to assume a linear relationship between PD and state variables as in the LRR paper? Thanks!

---

<div class="post-metadata">

**Author:** ![bdombeck](https://forum.dynare.org/user_avatar/forum.dynare.org/bdombeck/32/8576_2.png) [@bdombeck](https://forum.dynare.org/u/bdombeck)\
**Post date:** [28 September 2020 15:51 UTC](https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678/4 "2020-09-28T15:51:04Z")

</div>

I don’t think it is correct to think of it as “ignoring the expectation”. Like Johannes says, you are linearizing _within_ the expectation and hence there is no approximation except the expansion itself. There’s a number of good examples of people doing this on Euler equations: Gali (2008, Chapter 2, Appendix 2.1) and [Zietz (2006, Section 3.3)](https://www.macroeconomics.tu-berlin.de/fileadmin/fg124/advanced-macro/2014/Log-Linearization.pdf) have both been useful for me personally.

---

<div class="post-metadata">

**Author:** ![Noodle614](https://forum.dynare.org/letter_avatar_proxy/v4/letter/n/94ad74/32.png) [@Noodle614](https://forum.dynare.org/u/Noodle614)\
**Post date:** [28 September 2020 22:51 UTC](https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678/5 "2020-09-28T22:51:42Z")

</div>

Thanks for your reply. I understand that it’s perfectly fine to put it in dynare, because dynare has expectation operator as a default.

My question was, whether we can derive an analytical expression of P/D and state variables without the expectation operator, like what Bansal Yaron 2004 paper did. Do we need to assume a linear relationship like

\frac{P}{D} = A\_0 + A\_1 x

where x is the state variables? Or can we go directly from the recursive equation?Thanks

---

<div class="post-metadata">

**Author:** ![bdombeck](https://forum.dynare.org/user_avatar/forum.dynare.org/bdombeck/32/8576_2.png) [@bdombeck](https://forum.dynare.org/u/bdombeck)\
**Post date:** [30 September 2020 00:24 UTC](https://forum.dynare.org/t/log-linearize-forward-looking-variable-manually/16678/6 "2020-09-30T00:24:05Z")

</div>

I’m not sure I understand - It sounds like you might be asking about the solution of a system of expectational difference equations (which is what the temporary equilibrium of a DSGE model is), which does express the model variables as functions of the states.

If that is indeed what you are asking about then there are many classic references: Blanchard and Kahn (1980), Sims (2001), and Schmitt-Grohe and Uribe (2004) would all be required reading. Or at least someone’s lecture notes on the topic.
