Infinit and Finite Sum Equations

Dear Prof @jpfeifer

Apologies in advance for deriving the equation here, but the question is a bit involved.

I am trying again to replicate Mendoza (2002) Sudden Stop model using his original paper, where one of the FOC equations read the following:

U_{C_{t}}*(1-\lambda/\mu) = \exp(-v(t))*\mathbb{E}_{t}[(R*P_{t}^{c}/P_{t+1})*U_{C_{t+1}} (1)
where

  • Discount factor \tilde{\beta}= \exp(- \sum_{i=0}^{t-1} v_{t}(C_{i})

  • v_{t}(C_{i})= \beta* \ln(1+ C_{i}). (\tilde{\beta} is a function, \beta is a constant)

  • U_{C_{t}} = \tilde{\beta}_{t}* u(C_{t}) + \sum_{i=0}^{\infty} \mathbb{E}_{t}[(\tilde{\beta}_{t+1+i}* v_{t}^{'}(C_{t})*u(C_{t+1+i})]

In order to write eq.1 recursively and since v_{t}^{'}(C_{t}) does not depend on i then:

U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + v^{'}(C_{t})* \sum_{i=0}^{\infty} \mathbb{E}_{t}[(\tilde{\beta}_{t+1+i})*u(C_{t+1+i})]

Therefore:

U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + v_{t}^{'}(C_{t})* S_{t}

S_{t}= \mathbb{E}_{t} [\tilde{\beta}_{t+1}*u^(C_{t+1})] + \sum_{i=0}^{\infty} \mathbb{E}_{t}[(\tilde{\beta}_{t+2+i})*u(C_{t+2+i})]

where

S_{t}= \mathbb{E}_{t} [\tilde{\beta}_{t+1}*u^{'}(C_{t+1})] + S_{t+1}

U_{C_{t}} is derivative of lifetime utility.

u_{C_{t}} is utility function form.

  1. Do you agree that equation (1) can be rewritten as U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + v_{t}^{'}(C_{t})* S_{t} ? Am I right here ?

  2. I am left with the Discount factor \tilde{\beta}= \exp(- \sum_{i=0}^{t-1} v(C_{i})), I can do the same as above, however, how can I instruct dynare to stop the sum at t-1 where t=0 denotes current date.

\tilde{\beta}= \exp(- \sum_{i=0}^{t-1} v(C_{i}))

H_{t}= \sum_{i=0}^{t-1} v(C_{i})) = v(C_{0}) + v(C_{1}) + v(C_{t-1}).... = v(C_{t}) + H_{t+1}

Assuming I want to write \tilde{\beta}_{t+1} u^{'}(C_{t+1}) :

How to implement this in Dynare ?:
@# define k = 1
@# define k = t-1

model,
@#for k in 1: k
… FOC eq. here …

\tilde{\beta}_{t+1} * u^{'}(C_{t+1}) how to write this line ?

@#endfor

  • please note that t starts at 0, k starts at 1 since \tilde{\beta}_{t+1} is \tilde{\beta}_{1} at t=0.

Can you please go over the equations again and fix the bracketing.

Dear Prof @jpfeifer,

Herein a second go where I fixed some parenthesis, sorry if I have been sloppy a bit. The main equation is the following FOC and I am referring to as eq (1) throughout the text.

U_{C_{t}}*(1-\lambda/\mu) = \exp(-v(t))*\mathbb{E}_{t}[(R*P_{t}^{c}/P_{t+1})*U_{C_{t+1}}]

where

  • Discount factor \tilde{\beta_{\tau}}= \exp(- \sum_{\tau=0}^{t-1} v(C_\tau))

  • \tilde{\beta_{1}} = exp(-v(t)) = exp(v(C_{0})) ; \tilde{\beta_{0}}=1

  • v(C_{\tau}) = \beta* \ln(1+ C_{\tau}). (\tilde{\beta} is a function, \beta is a constant)

  • U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + \sum_{i=0}^{\infty} \mathbb{E}_{t}[(\tilde{\beta}_{t+1+i}* v_{t}^{'}(C_{t})*u(C_{t+1+i})]

U_{C_{t}} is derivative of lifetime utility.

u_{C_{t}} is utility function form.

In order to write U_{C_{t}} recursively and since v_{t}^{'}(C_{t}) does not depend on i then:

U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + v^{'}(C_{t})* \sum_{i=0}^{\infty} \mathbb{E}_{t}[(\tilde{\beta}_{t+1+i})*u(C_{t+1+i})]

Therefore:

U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + v_{t}^{'}(C_{t})* S_{t}

S_{t}= \mathbb{E}_{t} [\tilde{\beta}_{t+1}*u^(C_{t+1})] + \sum_{i=0}^{\infty} \mathbb{E}_{t}[(\tilde{\beta}_{t+2+i})*u(C_{t+2+i})]

Therefore:

S_{t}= \mathbb{E}_{t} [\tilde{\beta}_{t+1}*u(C_{t+1})] + S_{t+1}

  1. **Do you agree that it is sufficient to define ** U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + v_{t}^{'}(C_{t})* S_{t} then FOC equation (1) is well defined ? Am I right here ?

  2. In order to get the values of \tilde{\beta}_{t+2+i} as it is updated to \tilde{\beta}_{t+3+i} , \tilde{\beta}_{t+4+i} …in the S_{t} equation , then If I dropped i and defined:

\tilde{\beta}_{t+1}= exp^{log((1+C-N^\delta/\delta)} Which is \tilde{\beta}_{1} then S will understand to update \tilde{\beta}_{t+2} as exp^{log((1+C_{1}-N_{1}^\delta/\delta)} and so on so far ?

@jpfeifer Any advise if you please

Dear Prof,

In terms of Tilda definition, Tilda is in recursive form in order to account for an endogenous discount factor as follows:

\tilde{\beta_{\tau}}= \exp(- \sum_{\tau=0}^{t-1} v(C_\tau))

Therefore, \tilde{\beta_{t}}=\tilde{\beta_{0}}=1

\tilde{\beta}_{t+1}=\tilde{\beta_{1}}= exp^{-B*log(1+C_{0}+N^\delta_{0}/\delta)}

I defined the variable tilda which is effectively \tilde{\beta}_{t+1} since discounting factor kicks in at t+1, namely in the following equation:

S_{t}= \mathbb{E}_{t} [\tilde{\beta}_{t+1}*u(C_{t+1})] + \sum_{i=0}^{\infty} \mathbb{E}_{t}[(\tilde{\beta}_{t+2+i})*u(C_{t+2+i})]. Equation (1)

Where S comes from the following FOC form:

U_{C_{t}} = \tilde{\beta}_{t}* u^{'}(C_{t}) + v_{t}^{'}(C_{t})* S_{t}

To update tilda calculations in Equation (1):

tilda=exp^{-B*log(1+C_{0}+N^\delta_{0}/\delta)}*tilda(-1)

where:

tilda(t) represents \tilde{\beta}_{t+1}=\tilde{\beta_{1}}=exp^{-B*log(1+C_{0}-N^\delta_{0}/\delta)}

Does the Latter form of Tilda works for updating Tilda as the discount factor defined above ?

Thank you very much professor.
Best,
Mendo.mod (7.7 KB)

In case you get time for the above Prof. @jpfeifer , with many thanks.

I am working on a paper where government adjust deficit given debt sustainability where the forward variables represents infinite summation also there are examples in the manual that might help.

Thank you Alia. It’s about endogenous discount factor that ends at t-1. @jpfeifer Any advise if you may

Mendo2.mod (8.3 KB)

Hi again Prof.,

Hope all is well,

I redid the derivation of the FOC and came across two conflicting equations:

The first order condition and the same equation in Mendoza paper (2002).
Uc = exp(-B*log(1+C-(N^deltaa)/deltaa))*(P*R/P(+1))*Uc(+1)

The second is an endogenous discount factor tilda which enters another equation for computing an infinite sum (attached .mod file)
tilda = exp(-B*log(1+C(-1)-((N(-1)^deltaa)/deltaa)))*tilda(-2)

In the Steady state, the two equations leads to different values of
exp(-B*log(1+C-(N^deltaa)/deltaa)) of 1/R and 1 respectively. Did I defined tilda equation wrongly ?