# Recursive preference, random walk shock, stationarity

**URL:** <https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599>\
**Category:** Dynare help (legacy posts)\
**Created:** [24 June 2016 03:39 UTC](https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599 "2016-06-24T03:39:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xuz](https://forum.dynare.org/letter_avatar_proxy/v4/letter/x/8e7dd6/32.png) [@xuz](https://forum.dynare.org/u/xuz)\
**Post date:** [24 June 2016 03:39 UTC](https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599/1 "2016-06-24T03:39:44Z")

</div>

Hi,

I have difficulty in detrending variables in a DSGE with recursive preference. There’re random walk technology and AR(1) discount factor shock.

Preference:

V\_t = b\_t u(c\_t, l\_t)+ beta ( E\_t (V\_{t+1})^(1-alpha))^(1/(1-alpha))

where V\_t is the maximized utility, b\_t is the preference shock, c\_t is consumption, l\_t is labor, beta is a constant, alpha is another constant.

Y\_t= A\_t (k\_t)^theta (l\_t)^(1-theta) is the production function.

ln(A\_t)=ln(A\_{t-1}) + e\_t, random walk technology.

To get BGP, I need to detrend the variables,

If u(c\_t,l\_t) is non-separable, e.g. u(c\_t,l\_t)= c\_t\*(1-l\_t), I can detrend by V\_t\_new = V\_t/A\_t, C\_t\_new=C\_t/A\_t.

If u(u\_c,l\_t) is additive, e.g. u(c\_t,l\_t)=log(c\_t)-l\_t^psi/psi, I cannot detrend the system by e.g. V\_t\_new = V\_t- log(A\_t), C\_t\_new=C\_t/A\_t.

There’re many functional forms of recursive utility. I also tried  
V\_t = b\_t u(c\_t, l\_t)+ beta exp( E\_t log(V\_{t+1}) )  
and  
V\_t = b\_t u(c\_t, l\_t)+ beta log ( E\_t exp(V\_{t+1}). The latter can be detrended by e.g. V\_t\_new = V\_t- log(A\_t), C\_t\_new=C\_t/A\_t if there’s no b\_t.

Any suggestions for the additive period utility? Thanks very much!

---

<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:** [24 June 2016 16:33 UTC](https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599/2 "2016-06-24T16:33:37Z")

</div>

What matters is the period utility function/felicity function. That one needs to be compatible with balanced growth. As is known from King/Plosser/Rebelo (1988), there are only two basic versions. The additive one you have is the second one. You should be able to detrend it. Please outline more clearly where your problem is. When subtracting log A\_t, you should get something like

V\_t-ln A\_t = b\_t (log(c\_t/A\_t)-l\_t^psi/psi)+ beta log ( E\_t exp(V\_{t+1})-(b\_t-1)\*log(A\_t)

where the last term is an exogenous “constant” for utility maximization that can be omitted.

---

<div class="post-metadata">

**Author:** ![xuz](https://forum.dynare.org/letter_avatar_proxy/v4/letter/x/8e7dd6/32.png) [@xuz](https://forum.dynare.org/u/xuz)\
**Post date:** [27 June 2016 21:34 UTC](https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599/3 "2016-06-27T21:34:38Z")

</div>

Thanks for your reply!

My question is:

I have recursive preference with preference shock: V\_t = b\_t (log(c\_t)-l\_t^psi/psi) + beta log ( E\_t exp(V\_{t+1}). Other parts of the model is the standard NK model with price rigidity.

If I detrend the variables as V\_new\_t= V\_t-log A\_t, c\_new\_t= c\_t- log A\_t,  
I’ll end up with V\_new\_t = b\_t (log(c\_new\_t)-l\_t^psi/psi) + beta log ( E\_t exp(V\_new\_{t+1}) + (b\_t -1) logA\_t,  
since log A\_t = log A\_{t-1} +e\_a\_t is random walk, I’ll end up with a definition of V\_new\_t related to a random walk variable (log A\_t). However, when I detrend other equations of my model, they turns out to be a function of either e\_a\_t or unrelated to e\_a\_t and log A\_t,

e.g.  
Y\_t =A\_t l\_t, detrended by Y\_new\_t=Y\_t/A\_t, I get Y\_new\_t= l\_t.

1. I’m not sure whether I can detrend the variables in that way, and end up with an equation related to logA\_t instead of e\_a\_t.
2. I also don’t understand “the last term is an exogenous “constant” for utility maximization that can be omitted”. I cannot omit the last term when I try to look at the IRFs for the technology shock, where I assume technology shock and preference shock are correlated thus (b\_t -1) logA\_t not equal to 0.

Thanks!

[quote=“jpfeifer”]What matters is the period utility function/felicity function. That one needs to be compatible with balanced growth. As is known from King/Plosser/Rebelo (1988), there are only two basic versions. The additive one you have is the second one. You should be able to detrend it. Please outline more clearly where your problem is. When subtracting log A\_t, you should get something like

V\_t-ln A\_t = b\_t (log(c\_t/A\_t)-l\_t^psi/psi)+ beta log ( E\_t exp(V\_{t+1})-(b\_t-1)\*log(A\_t)

where the last term is an exogenous “constant” for utility maximization that can be omitted.[/quote]

---

<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 June 2016 06:52 UTC](https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599/4 "2016-06-28T06:52:08Z")

</div>

1. I am not sure I understand your point. What i am saying is the following:

```auto

```

are exogenous processes that shift the objective function, but which the agents in your model take as given. As such, when you compute the first order conditions, this term will always drop out. For this reason, you can simply use  
V\_new\_t = b\_t (log(c\_new\_t)-l\_t^psi/psi) + beta log ( E\_t exp(V\_new\_{t+1})  
The argmax of V\_t and the V\_new\_t will exactly be the same (that’s why I said it can be omitted).

1. When you do this, there is no A\_t showing up anymore. Depending on what you are interested in, you have to add the unit root in technology back to your IRFs later on. See e.g. [github.com/JohannesPfeifer/DSGE\_mod/blob/master/Aguiar\_Gopinath\_2007/Aguiar\_Gopinath\_2007.mod](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Aguiar_Gopinath_2007/Aguiar_Gopinath_2007.mod)

---

<div class="post-metadata">

**Author:** ![xuz](https://forum.dynare.org/letter_avatar_proxy/v4/letter/x/8e7dd6/32.png) [@xuz](https://forum.dynare.org/u/xuz)\
**Post date:** [26 August 2016 22:06 UTC](https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599/5 "2016-08-26T22:06:10Z")

</div>

[quote=“jpfeifer”]1. I am not sure I understand your point. What i am saying is the following:

```auto

```

are exogenous processes that shift the objective function, but which the agents in your model take as given. As such, when you compute the first order conditions, this term will always drop out. For this reason, you can simply use  
V\_new\_t = b\_t (log(c\_new\_t)-l\_t^psi/psi) + beta log ( E\_t exp(V\_new\_{t+1})  
The argmax of V\_t and the V\_new\_t will exactly be the same (that’s why I said it can be omitted).

1. When you do this, there is no A\_t showing up anymore. Depending on what you are interested in, you have to add the unit root in technology back to your IRFs later on. See e.g. [github.com/JohannesPfeifer/DSGE\_mod/blob/master/Aguiar\_Gopinath\_2007/Aguiar\_Gopinath\_2007.mod](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Aguiar_Gopinath_2007/Aguiar_Gopinath_2007.mod)[/quote]

Thanks Professor Pfeifer!

I understand that V\_new\_t = b\_t (log(c\_new\_t)-l\_t^psi/psi) + beta log ( E\_t exp(V\_new\_{t+1}) + (b\_t -1) logA\_t, when I take first order derivatives, the last term (b\_t -1) logA\_t doesn’t affect the conditions.

In the model, ln(A\_t)=ln(A\_{t-1}) + e\_t is a random walk technology process. My concern is that some other equations, e.g. the definition of stochastic discount factor, have V\_new\_{t+1} (it will have expectation of (V\_new\_{t+1} twisted by parameters) and twisted expectation of V\_new\_{t+1}). I’ll take 3rd derivative, and these V\_new\_{t+1}s won’t be cancelled out. If I drop this term (b\_t -1) logA\_t, then IRFs of stochastic discount factor to e\_t will be different from not dropping it. These IRFs are also of my interests.

If I keep this (b\_t -1) logA\_t, will there be any problems running dynare since it’s a random walk?

Thank you very much!

---

<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:** [27 August 2016 08:43 UTC](https://forum.dynare.org/t/recursive-preference-random-walk-shock-stationarity/5599/6 "2016-08-27T08:43:40Z")

</div>

Either my argument is correct that it drops out in all FOCs or you are correct and it does not drop out, but does affect the FOCs. It cannot be both. That is mathematically impossible. What may be true is that you may be interested in some non-detrended variables. However, as the detrended variables can be easily computed, you can then recover the non-detrended variables by adding the trend back. See [github.com/JohannesPfeifer/DSGE\_mod/blob/master/Aguiar\_Gopinath\_2007/Aguiar\_Gopinath\_2007.mod](https://github.com/JohannesPfeifer/DSGE_mod/blob/master/Aguiar_Gopinath_2007/Aguiar_Gopinath_2007.mod) for an example of this.
