Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions...

25
Solutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work together, as long as you write your own solutions. 1 Intertemporal Labor Supply Consider the following problem. The consumer problem is: Max {C t },{N t } E 0 Ã t=T X t=o β t {χ 1 C '1 t + χ 2 N '2 t } ! s.t. A t+1 = R(A t + N t W t C t ) Where C is consumption, N is labor supply, A 0 is initial wealth, R =1+ r, and the greek letters are parameters. Only W is stochastic 1). Derive and interpret the rst-order conditions for C t and N t . What are the intertemporal and intratemporal optimal conditions There are at least two (equivalent ways of setting up and solving this prob- lem). I will implement both of them 1. Lagrangian method I: In this case the Lagrangian is: Max {C t },{N t },{A t+1 } £ = E 0 Ã t=T X t=o β t {χ 1 C ' 1 t + χ 2 N ' 2 t λ t (A t+1 R(A t + N t W t C t )} ! s.t. A 0 F.O.C. {C t } : £ ∂C t =0 χ 1 ' 1 C ' 1 1 t = λ t R (1) 1

Transcript of Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions...

Page 1: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

Solutions Problem Set 2 Macro II (14.452)

Francisco A. Gallego

04/22

We encourage you to work together, as long as you write your own solutions.

1 Intertemporal Labor SupplyConsider the following problem. The consumer problem is:

Max{Ct},{Nt}

E0

Ãt=TXt=o

βt {χ1C 1t + χ2N

2t }

!s.t.

At+1 = R(At +NtWt − Ct)

Where C is consumption, N is labor supply, A0 is initial wealth, R = 1+ r,and the greek letters are parameters. Only W is stochastic1). Derive and interpret the first-order conditions for Ct and Nt.

What are the intertemporal and intratemporal optimal conditionsThere are at least two (equivalent ways of setting up and solving this prob-

lem). I will implement both of them

1. Lagrangian method I:

In this case the Lagrangian is:

Max{Ct},{Nt},{At+1}

£ = E0

Ãt=TXt=o

βt {χ1C 1t + χ2N

2t − λt(At+1 −R(At +NtWt − Ct)}

!s.t. A0

F.O.C.

{Ct} :∂£

∂Ct= 0⇔ χ1 1C 1−1

t = λtR (1)

1

Page 2: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

{Nt} :∂£

∂Nt= 0⇔ −χ2 2N 2−1

t = λtWtR

The interpretation is more or less natural. The first tells you that themarginal utility of Ct has to be equal to the marginal utility of wealth(do not worry too much about R because it is an implication of the factthat C in this case is realized at the beginning of the period t—so the valueof saving one unit of consumptions is 1 times R). The second tells youthat marginal disutility of work has to be equal to the marginal utility ofwealth times how much consumption you can get from one our of work(the wage rate). Why no expectation? This is important, at time t, theonly source of uncertainty is realized (Wt) and, roughly speaking, λt is afunction of expected future wages (see below).

Combining both equations we get the intratemporal condition:

−χ2 2N 2−1t =Wχ1 1C 1−1

t

To get the intertemporal condition, we need another FOC:

∂£

∂At+1= 0⇔ βtλt = βt+1λt+1R

Using the FOC for consumption, we get our intertemporal condition:

βtχ1 1C 1−1t = βt+1RE(χ1 1C 1−1

t+1 )

1 = βRE

"µCt+1

Ct

¶1−1

#

2. Lagrangian method II:

Notice that you can iterate the constraint and write the intertemporalbudget constraint.

TXt=0

R−tCt = A0 +TXt=0

R−tNtWt

Two comments: (1) Why no expectation? This has to hold exactly. (2)what AT+1?

Max{Ct},{Nt}

£ = E0

Ãt=TXt=o

βt {χ1C 1t + χ2N

2t }− λ(

TXt=0

R−tCt −A0 −TXt=0

R−tNtWt)

!

F.O.C.

2

Page 3: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

{Ct} :∂£

∂Ct= 0⇔ βtχ1 1C 1−1

t = λR−t (2)

{Nt} :∂£

∂Nt= 0⇔ −βtχ2 2N 2−1

t = λWR−t (3)

If you combine both equations, you get the same intratemporal conditionas before.

To get the intertemporal condition write the FOC for t+ 1 taking expec-tations at t.

{Ct+1} :∂£

∂Ct+1= 0⇔ Et

hβt+1χ1 1C 1

−1t+1 − λR−t−1

i= 0

Using the FOC for Ct:

Et

hβt+1χ1 1C 1−1

t+1 − χ1βt

1C 1−1t R−t−1

i= 0

and you get the same as before:

1 = βRE

"µCt+1

Ct

¶1−1

#

What is more interesting about this method is that λ can be interpretedas the sufficient statistic you need to solve the problem

Notice that (1) and (2) imply that:

λtR = λ (βR)−t

How can you interpret this condition?

Moreover, we can plug (1) and (3) into the budget constraint and we willget a decreasing implicit function of λ as a function of {Wi} with i ≥ t and,of course, some constant terms (among them R). Thus, the only thing youneed to compute λ is to know something about {Wi}. Therefore, you willkeep your λ constant in the future if the realizations of {Wi} were moreor less what you expected in the past.

2). What is the link between Ct and Nt in this model? Whatassumption(s) is (are) producing this resultThe only link between both variables is λ (or λt). This implies the intratem-

poral condition and the negative correlation between both variables ifW is keptconstant. And, the lack of correlation if W increases without affecting λ.Assumption: (1) both terms are additively separable in the utility function

and (2) perfect capital markets (what may happen if we introduce frictions asAt > 0)

3

Page 4: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

3). How can you analyze changes to wages that do not affect theexpected wealth of the consumers? (Hint: what is λ—the Lagrangemultiplier—in this model?). Let’s define the wealth-constant elasticityof labor supply as η = ∂ lnNt

∂ lnWtwhen wealth is constant. What is η in

this model? Is it positive or negative? Why?Given our previous discussion, these are changes that do not affect λ, there-

fore we can take logs in (3) and get:

log(−χ2 2

λ (βR)−t ) + ( 2 − 1) log(Nt) = logWt

Then

η =log(Nt)

logWt=

1

( 2 − 1)Notice that η > 0. There are several ways of understanding this. Here is

one:First, notice that obviously χ

1> 0, χ2 < 0, 1 < 1. Why? People like C,

dislike N, and marginal utility of consumption is decreasing in general. Thereforeif the instantaneous utility function is to be concave (and, therefore, the solutionwe just proposed has sense), it has to be true that:

∂2U

∂N2= χ2 2 ( 2 − 1)N 2−2

t < 0⇒ ( 2 − 1) > 0

4). Take the FOCs and discuss the effect of the following situationson {Ct} and {Nt} .

1. • Cross-sectional differences associated with permanent dif-ferences in human capital (assume W varies in the cross-section)Higher human capital will probably imply higher W . Therefore, λ ↓,C ↑.What about N ? Assume all other parameters do not vary in thecross-section and take two individuals i and j

log(Nj

Ni) =

1

( 2 − 1)

µlog

Wj

Wi+ log

λjλi

¶So effect is ambiguous. One of them is richer, but at the same timethe alternative cost of leisure is higher.

• Life-cycle changes in wages (i.e. if Mincerian equations arecorrect, wages follow an inverted-U behavior over the life-cycle)Notice that these evolutionary changes were predictable at the be-ginning of the life-cycle and, therefore, as W changes, λ is constant.Thus C is also constant—see (2). But given that η > 0 and λ isconstant, N moves together with W .

4

Page 5: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

• Unexpected temporary shocks to wagesIf change is temporary, it shouldn’t affect λ by much, then C isconstant, and N moves together with W .

• Unexpected permanent shocks to wagesIn this case λ should be affected. Therefore, C moves in the samedirection as W and the effect on N is unclear.

2 Log-Linear RBCConsider the following problem. Consumers maximize

maxEt

⎡⎣ ∞Xj=0

bjU( eCt+j , Nt+j)

⎤⎦Subject to eKt+1 = Rt

eKt +fWtNt − eCt

U( eCt, Nt) = log³ eCt

´+ φ log(1−Nt)

while firms solvenNt, eKt

o= argmax

N,KZtF (AtN, eK)− (Rt + δ − 1) eK −fWtN

F (AtN, eK) = Y = Z eK1−α(AtN)α

and we assumeAt+1 = γAt.

This is the standard RBC model. trending variables are those with a hat.1) De-trend the modelDefine V = V

A .

1. Utility function:

U(Ct, Nt) = log (CtAt)+φ log(1−Nt) = log (At)| {z }Does not matter

+log (Ct)+φ log(1−Nt)

2. Consumers B.C.Kt+1At+1 = RtKtAt +WtAtNt − CtAt

Kt+1At+1 = RtKtAt +WtAtNt − CtAt

⇔ Kt+1At+1

At| {z }γ

= RtKt +WtNt − Ct

⇔ γKt+1 = RtKt +WtNt − Ct

5

Page 6: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

3. Profits

{Nt,Kt} = argmaxN,K

Zt (KtAt)1−α (AtN)

α − (Rt + δ − 1)AtKt −AtWtNt

⇔ {Nt,Kt} = argmaxN,K

Zt (Kt)1−α (N)α − (Rt + δ − 1)Kt −WtNt

2)Solve for the F.O.C of the consumer problem, either using a La-grangian or a Bellman Equation. You should find two final equations,the Euler Equation and the labor supply.

1. Bellman equation

V (K) = MaxC,N

{log (C) + φ log(1−N) + bE [V (K0)]}

s.t.

γK0 = RK +WN − C

FOC:

∂V

∂C=1

C+ bE

∙∂ [V (K0)]

∂K0∂K0

∂C

¸=1

C− b

γE

∙∂ [V (K0)]

∂K0

¸= 0 (4)

∂V

∂N= − φ

1−N+bE

∙∂ [V (K0)]

∂K0∂K0

∂N

¸= − φ

1−N+Wb

γE

∙∂ [V (K0)]

∂K0

¸= 0

(5)

Envelopment theorem:

∂V

∂K= bE

∙∂ [V (K0)]

∂K0∂K0

∂C

¸=

Rb

γE

∙∂ [V (K0)]

∂K0

¸(6)

(a) Euler Equation:

Using (15) and (4), we get:∂V

∂K=

R

C

Then, we get:1

C=

b

γE

∙R0

C 0

¸= 0

(a) Labor supply(5) and (4) imply:

1−N =Cφ

W(7)

6

Page 7: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

2. Lagrangean:

Max{Ct},{Nt}

£ = E

Ãt=TXt=o

bt {log (C) + φ log(1−N)− λt(γKt+1 − (RtKt +WtNt − Ct))}!

FOC

{Ct} :1

C= λt (8)

{Ct} : −φ

1−N= λtWt (9)

From (5) and (4) we get:

1−N =Cφ

W(10)

Take additional FOC:

{Kt+1} : βtγλt = E£βt+1λt+1Rt+1

¤(11)

Then, combining (16) and (11), we get our Euler equation:

βtγ1

Ct= E

∙βt+1

1

Ct+1Rt+1

¸⇔ 1 = βtγ

1

Ct= E

∙β

γ

Ct

Ct+1Rt+1

¸3)Solve the firm problem to find the labor and capital demands.

Give the law of motion for capital (re-write eKt+1 = RteKt +fWtNt − eCt

to get the usual equation)This should be easy.

⇔ {Nt,Kt} = argmaxN,K

Π = argmaxN,K

Zt (Kt)1−α

(N)α − (Rt + δ − 1)Kt −WtNt

FOC:

{Nt} :=∂Πt∂Nt

= 0⇔ αZt

µKt

Nt

¶1−α=Wt

{Kt} :=∂Πt∂Kt

= 0⇔ (1− α)Zt

µNt

Kt

¶α= (Rt + δ − 1)

4) We have a total of 5 equations. Discuss how would you proceedto log-linearize our system (you don’t need to do all the math, justapply the method to one or two equations).There is no unique way of log-linearize things. I will use here my way (which

I think is simpler and does not use any math trick you didn’t know). Let goone by one:

7

Page 8: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

1. Consumers BC:

γKt+1 = RtKt +WtNt − Ct

⇔ γKt+1 = (1− δ)Kt + Yt − Ct

It is also true that (where X denotes the steady state of X):

γK = (1− δ)K + Y − C

Then:

γ¡Kt+1 −K

¢= (1− δ)

¡Kt −K

¢+ (Yt − Y )−

¡Ct − C

¢γ

¡Kt+1 −K

¢K

= (1− δ)

¡Kt −K

¢K

+(Yt − Y )

Y

Y

K−¡Ct − C

¢C

C

K

Define xt = log (Xt)− log¡X¢≈ (Xt−X)

X

⇔ γkt+1 = (1− δ)Y

Kkt + yt −

C

Kct (12)

But, take the production function (I’ll skip some steps:

⇔ yt = zt + αnt + (1− α) kt

Then (12) becomes:

−γkt+1 +µ1− δ + (1− α)

Y

K

¶kt −

C

Kct + α

Y

Knt +

Y

Kzt = 0

2. The wage equation:

αZt

µKt

Nt

¶1−α=Wt

It is also true that

αZ

µK

N

¶1−α=W

ThenZt

Z

µKt

K

N

Nt

¶1−α=

Wt

W

Take logs and use small letters to denote log deviations from the steadystate and you get:

zt + (1− α)(kt − nt) = wt

8

Page 9: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

3. Labor supply

1−Nt =Ctφ

Wt

1−N =Cφ

W

Then,1−N

1−Nt=

CWt

CtW

Take logs

log(1−N

1−Nt) = wt − ct (13)

Let’s define L = 1−N and l = log(L)− log(L).Then, the LHS can be written as:

log(1−N

1−Nt) =

1

l≈ 1−N

N −N≈ 1−N

−nN=

n¡1−N

¢N

Then, (13) becomes:n¡1−N

¢N

= wt − ct

So there is a mistake in the log-linearization that appears in the program.

4. Price of capital

As with the wage equation:

(1− α)Zt

µNt

Kt

¶α= (Rt + δ − 1)

Then (after some steps)

Zt

Z

µNt

N

K

Kt

¶α=(Rt + δ − 1)¡R+ δ − 1

¢Take logs:

zt+αnt−αkt ≈(Rt + δ − 1)−

¡R+ δ − 1

¢¡R+ δ − 1

¢ =Rt −R¡

R+ δ − 1¢ ≈ R¡

R+ δ − 1¢rt

9

Page 10: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

5. Euler equation

1 = E

∙b

γ

Ct

Ct+1Rt+!

¸1 =

∙b

γ

C

CR

¸Then,

1 = E

∙Ct

C

C

Ct+1

Rt+1

R

¸= E [(1 + ct) (1− ct+1) (1 + rt+1)] ≈ E [1 + ct − ct+1 + rt+1]

5) Our log-linearized system is the following (small variables denote logs):The law of motion and the market clearing conditions:

−γkt+1 +µ1− δ + (1− α)

Y

K

¶kt −

C

Kct + α

Y

Knt +

Y

Kzt = 0

α1− α

α(kt − nt)− wt + zt = 0

1−N

Nφct + nt − φ

1−N

Nwt = 0

αkt +R

R+ δ − 1rt − αnt − zt = 0

The Euler Equation (or any other asset pricing equation):

Et [rt+1 − ct+1] + ct = 0.

We assumezt = ρzt−1 + εt.

We want to write the system of six equations in order to solve it numericallyusing the process in Uhlig(1997). Let st be the vector of endogenous state vari-ables (capital stock), xt = [ct; rt;nt;wt]

0 the endogenous control variables andzt the stochastic processes. To avoid confusion, matrices are named using twocapitalized letters. There are two conceptually different sets of equations. Thefirst set describes the law of motion of the economy, together with the marketequilibrium conditions: I use M_ for these matrices (Motion and Market). Inthe second set, the equations are forward looking and they involve the expecta-tions of the agents: I use F_ for these equations (Forward). Finally, we havethe equation for the stochastic process zt. Write the system in the followingway:

MS1 ∗ st+1 +MS ∗ st +MX ∗ xt +MZ ∗ zt = 0

Et [FS2st+2 + FS1st+1 + FSst + FX1xt+1 + FXxt + FZ1zt+1 + FZzt] = 0

zt+1 − ZZ ∗ zt − εt+1 = 0.

10

Page 11: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

In other words, what does each matrix contain?Just by inspecting the log-linearize system we get:

MS1 =

⎡⎢⎢⎣−γ000

⎤⎥⎥⎦ ,MS =

⎡⎢⎢⎣¡1− δ + (1− α) YK

¢(1− α)0α

⎤⎥⎥⎦ ,

MX =

⎡⎢⎢⎣−C

K 0 αCK 0

0 0 −(1− α) −11−NN 0 1 1−N

N

0 RR+δ−1 −α 0

⎤⎥⎥⎦ ,MZ =

⎡⎢⎢⎣YK10−1

⎤⎥⎥⎦

FS2 = 0,FS1 = 0,FS = 0,FX1 =

⎡⎢⎢⎣−1100

⎤⎥⎥⎦0

, FX =

⎡⎢⎢⎣1000

⎤⎥⎥⎦ , FZ1 = 0,FZ = 006) We want to find numerically a solution of the type

st+1 = bS ∗ st + cSZ ∗ ztxt = bX ∗ st +dXZ ∗ zt,

because we are looking at small deviations from steady state. You have to solvethat using matlab. I give you a program, linear, containing the function linearwhich does the solution of the system, so basically what you have to do is createa program containing the following:a) Values of the parameters of the model. We will assume

δ = 0.025, γ = 1.004, α =2

3, φ = 1, ρ = .979,

R = 1.0163, Y/K = 1/2/4,K = 1, C = Y ∗ 68/100,N = .2, σe = .0072

Before solving the problem, notice that we need a few clarifications here:There are some conditions that the steady state values have to satisfy:

(1− α)Z

µN

K

¶α= (1− α)

µY

K

¶=¡R+ δ − 1

¢⇒

µY

K

¶=

¡R+ δ − 1

¢(1− α)

= 3 (0.0163 + 0.025) ≈ 1

8.0701

11

Page 12: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

So³YK

´is not a parameter that you can change.

γK = (1− δ)K + Y − C ⇔ C

K= (1− δ − γ) +

Y

K

⇒ C

Y= (1− δ − γ)

K

Y+ 1 ≈ 8.0701(−0.025− 0.004) + 1 ≈ 0.7629

So the value that is in the PS is inconsistent with the budget constraint.Sorry about that.Moreover,

1−N =Cφ

W=

α³YN

´ =³CY

´φN

α⇔ N =

1

1 +CY

φ

α

≈ .3180

So, if we want to have N = 0.2, we need φ 6= 1! Fortunately, this doesnot affect the simulations Olivier showed in class because it is the sum of twomistakes that cancel each other. In any case, keep in mind that if you changeN you have to change φ. This is completely intuitive because φ is a measure ofhow much you value leisure. Notice that if φ = 0, then N = 1.b) The matrices derived in 5).c)Then you have to call the function linear.

7) Now we want to do impulse-response functions. For that, attachto your program (copy and paste after part c)) the program linear 2.This programs calls two other functions, impulse and impulse-plot.The first finds the reduced form model and the second hits it with ashock. That should be the end of your program. Explain the results.How do they depend on the values assumed in a)? (run the programfor different values of at least two parameters and compare results).Interpret.Several exercises can be implemented:

• Base case (Figure 1)—Minor differences with the figure Olivier showed inclass, same intuition.

12

Page 13: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

Baseline case

• Change ρ to 0.999 and 0.300 (Figures 2 and 3)

ρ = 0.999

13

Page 14: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

ρ = 0.9

• Change N = 0.8 (Figure 4).

N = 0.8

• R = 1.1 (Figure 5)

14

Page 15: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

R = 1.1

• γ = 1.01 (Figure 6)

γ = 1.01

15

Page 16: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

3 (Optional) Discrete Time Dynamic Program-

ming1

Use the discrete time setup of Philippon and Segura-Cayuela (2003) (up to sec-tion 5) and the MATLAB programs contained in the folderDynamicProgramming.Read tutorial.doc and the comments in DP.m.1) Derive the Euler equation in discrete time in the model with

exogenous labor, first using dynamic programming and then usingthe Lagrange multiplier method. Compare it to the continuous timeEuler equation.The problem is:

Max{Ct}

£ =t=∞Xt=o

btσ

σ − 1³ eCt

´σ−1σ

s.t.eKt+1 = RteKt +fWt − eCt

At+1 = γAt

Divide all the trending variables by At.Define V = VA and notice that At =

A0γt

Utility function:

MaxV = Maxt=∞Xt=o

btσ

σ − 1¡CtA0γ

t¢σ−1

σ

= Max Aσ−1σ

0

t=∞Xt=o

³bγ

σ−1σ

´| {z }

β

t σ

σ − 1 (Ct)σ−1σ

= Maxt=TXt=o

βtσ

σ − 1 (Ct)σ−1σ

The budget constraint (same as before):

γKt+1 = RtKt +Wt − Ct

Thus, the problem becomes Maxt=TXt=o

βt σσ−1 (Ct)

σ−1σ s.t. γKt+1 = RtKt +

Wt − Ct

• Bellman equation1This exercise is optional in the sense that you could skip it if you feel comfortable with

stochastic DP, and do it if you want to get more training.

16

Page 17: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

V (K) = MaxC

½t σ

σ − 1 (C)σ−1σ + βE [V (K0)]

¾s.t.

γK0 = RK +WN − C

FOC:

∂V

∂C= C−

1C + βE

∙∂ [V (K0)]

∂K0∂K0

∂C

¸= C−

1C − β

γE

∙∂ [V (K0)]

∂K0

¸= 0 (14)

Envelopment theorem:

∂V

∂C= βE

∙∂ [V (K0)]

∂K0∂K0

∂C

¸=

γ

∙∂E [V (K0)]

∂K0

¸(15)

Using (15) and (4), we get:

∂V

∂K= RC−

1

C

Then, we get:

1 =β

γE

⎡⎣R0µC0C

¶− 1C

⎤⎦But notice that:

β

γ= bγ

− 1C

Then

1 = bE

⎡⎣R0µγC0C

¶− 1C

⎤⎦• Lagrangean:

Max{Ct}

£ =t=∞Xt=o

βt½

σ

σ − 1 (Ct)σ−1σ − λt(γKt+1 − (RtKt +WtNt − Ct))

¾FOC

{Ct} : C−1σt = λt (16)

{Kt+1} : βtγλt = E£βt+1λt+1Rt+1

¤(17)

Then, combining (16) and (11), we get our Euler equation:

βtγC−1σt = E

hβt+1C

−1σt+1Rt+1

i⇔ 1 = E

γ

µCt

Ct+1

¶ 1σ

Rt+1

#

17

Page 18: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

• Continuous time

Max{Ct}

∞Z0

σ

σ − 1³ eCt

´σ−1σ

exp (−θt) dt

s.t.·eKt = (Rt − 1) eKt +fWt − eCt

At+1 = γAt

Detrending:

Max

∞Z0

σ

σ − 1³ eCt

´σ−1σ

exp (−θt) dt =Max

∞Z0

σ

σ − 1 (CtAt)σ−1σ exp (−θt) dt

= MaxAσ−1σ

0

∞Z0

σ

σ − 1 (Ct)σ−1σ (γ)t

σ−1σ exp (−θt) dt

Notice that (γ)σ−1σ = exp

³log γ(

σ−1σ )´= exp

¡¡σ−1σ

¢log (γ)

¢≈ exp

¡¡σ−1σ

¢µ¢,

1 + µ ≡ γ.

Then

MaxAσ−1σ

0

∞Z0

σ

σ − 1 (Ct)σ−1σ (γ)

tσ−1σ exp (−θt) dt

= Max

∞Z0

σ

σ − 1 (Ct)σ−1σ exp

µ−µθ −

µσ − 1σ

¶µ

¶t

¶dt

= Max

∞Z0

σ

σ − 1 (Ct)σ−1σ exp (−ρt) dt

with¡θ −

¡σ−1σ

¢µ¢≡ ρ

The budget constraint becomes·Kt = (Rt − µ− 1)Kt +Wt − Ct

Then the Euler equation will be:·Ct

Ct= σ(Rt − µ− ρ− 1) = σ(Rt − µ−

µθ −

µσ − 1σ

¶µ

¶− 1)

= σ(Rt −µ

σ− θ − 1)

18

Page 19: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

2) Numerical analysis using DP.m. Describe the dynamics of the economywhen it starts far away from its steady state (say 30% below). How does therecovery depend on the evolution of productivity? What does it tell you aboutthe rapid growth in Europe after the second world war? (Hint: for the questionon the evolution of productivity you may want to replicate the model, say 100times, and see what happens with the recovery path)See figures

• Evolution of output after the recovery (Figure 7):

Recovery

• Mean and median and max and min in 100 simulations (Figures 8 and 9)

19

Page 20: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

Mean and median (100 recoveries)

Fastest and Lowest Recovery (100 simulations)

20

Page 21: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

3)DP.m produces 5 plots. Describe briefly each of them (what they representand how they are computed. I am not asking for the details of the computations.Simply show me that you understand the architecture of the program).

• Figure 1: 3D graph showing optimal consumption as a function of real-izations of Z and initial capital stock. By-product of the search for thepolicy rule.

• Figure 2: Policy rule. Kt+1 as a function of Kt. Capital in the steadystate goes from 4.6 to around 5.4

• Figure 3: Evolution of consumption in a stochastic simulation after start-ing from some initial capital that is below the steady state value.

• Figure 4: Evolution of consumption in the same simulation.

• Figure 5: stationary distribution of capital in the steady state.

5) Numerical analysis using DP.m. We have seen in the continuous timesetup that the reaction of consumption to a positive technology shock dependson the elasticity σ. Use the policy function estimated by DP.m to illustrate thisfinding. (note: in the program, they define gamma, the CRRA instead of σ.How are they related? Why?) Hint: DP.m produces 5 plots. The first one iscalled consumption, and it is 3 dimensional. Consumption is measured on thevertical axis. The two horizontal axis are for K and Z. If you do not see well,you can rotate the picture with the mouse.Notice that CRRA = σ−1

• Different σ = {0.1, 1, 10} Figures 10 to 12.

21

Page 22: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

σ = 0.1

σ = 1

22

Page 23: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

σ = 10

6) Show numerically how the behavior of consumption is affected by thepersistence of the shocks. Interpret.

• Different ρ = {0.05, 0.99}

23

Page 24: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

ρ = 0.05

ρ = 0.99

24

Page 25: Solutions Problem Set 2 Macro II (14.452)web.mit.edu/14.452/www/pdf/ps2_2005solutions.pdfSolutions Problem Set 2 Macro II (14.452) Francisco A. Gallego 04/22 We encourage you to work

25