Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1...

19
Lecture 6: General Equilibrium with Heterogeneity Fatih Guvenen Spring 2019 Fatih Guvenen Lecture 6: GE with Heterogeneity 1 / 19

Transcript of Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1...

Page 1: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Lecture 6: General Equilibrium withHeterogeneity

Fatih GuvenenSpring 2019

Fatih Guvenen Lecture 6: GE with Heterogeneity 1 / 19

Page 2: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Krusell-Smith (1998, JPE)

▶ Two types of shocks:1 Idiosyncratic employment status: ϵe : employed or ϵu :unemployed

2 Aggregate productivity: zg : expansion, zb : recession

▶ πss′ϵϵ′ : probability for transitioning from(ϵi, zj

)to

(ϵi′ , zj′

)▶ Assume ϵ is i.i.d conditional on z⇒fraction of employed (hence

ℓ) only depends on z.▶ Competitive markets: w(K, L, z) = (1− α)z(K/L)−α andr(K, L, z) = αz(K/L)α

V(k, ϵ; Γ, z) = maxc,k′

[u(c) + βE[V(k′

, ϵ′; Γ

′, z′)]| z, ϵ

]c+ k′ = w(K, L, z)× ℓ× ϵ+ r(K, L, z)× k, k′ ≥ 0

Γ′= H(Γ, z, z′)

Fatih Guvenen Lecture 6: GE with Heterogeneity 2 / 19

Page 3: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Krusell-Smith Algorithm

1 Approximate the wealth distribution with a finite number (I) ofmoments. (H reduces to a simple function mapping the Imoments today into the I moments tomorrow depending onthe realization of z today.)

2 Select a set of moments to track. (We will select the mean,I = 1)

1 You do not need not proceed as mean, variance, and so on. Youcan include, say, the wealth holdings of top 10% of population,mean-to-median ratio, etc.

3 Select a family of functions for H. (We will choose log-linear)4

V(k, ϵ; Γ, z) = maxc,k′

[u(c) + βE[V(k′

, ϵ′; Γ

′, z′)]| z, ϵ

]c+ k′ = w(K, L, z)× ℓ× ϵ+ r(K, L, z)× k, k′ ≥ 0

Γ′= H(Γ, z, z′)

Fatih Guvenen Lecture 6: GE with Heterogeneity 3 / 19

Page 4: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Krusell-Smith

5.

V(k, ϵ; Γ, z) = maxc,k′

[u(c) + βE[V(k′

, ϵ′; Γ

′, z′)]| z, ϵ

]c+ k′ = w(K, L, z)× ℓ× ϵ+ r(K, L, z)× k, k′ ≥ 0

logK′ = a0 + a1 logK for z = zblogK′ = b0 + b1 logK for z = zg

Fatih Guvenen Lecture 6: GE with Heterogeneity 4 / 19

Page 5: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Krusell-Smith Algorithm (cont’d)

6. Take an (educated!) initial guess about:(a0, a1,b0,b1) ⇒ yields initial guess for H0

Γ0

7. Using only the consumers’ decision rules simulate {kn,t}N,Tn=1,t=1

for (N, T) large.8. Update H0 by estimating (where K̃ = 1

N∑N

n=1 kn) :

log K̃′ = a0 + a1 log K̃ for z = zblog K̃′ = b0 + b1 log K̃ for z = zg

9. Iterate until the R2 of this regression is “sufficiently high” andthe forecast variance is “small”

Fatih Guvenen Lecture 6: GE with Heterogeneity 5 / 19

Page 6: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Krusell-Smith: Pros and Cons

▶ Understand that this is a local method. You are solving for thestationary recursive equilibrium .

▶ ⇒ If you take a larger deviation, say in capital stock, from whatis realized in the stationary equilibrium, your “equilibriumfunctions” will no longer be accurate.

▶ Why care about this? Suppose you solve your model then wantto study a policy experiment where you eliminate tax onsavings. You’d need to write a separate program from the“transition” between the two stationary equilibria.

▶ If you solve for the full recursive equilibrium you would notneed to do this.

▶ However, solving for the full equilibrium is often much harderand so is often “over-kill.”

Fatih Guvenen Lecture 6: GE with Heterogeneity 6 / 19

Page 7: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Krusell-Smith: Details

1 As with many numerical method, a good initial guess is critical.One idea (which KS used) is to first solve a rep-agent RBC modelwith same parameterization as KS model. Then use thecoefficients (a0, a1,b0,b1) as initial guess.We will see some more complex examples next week.

2 Can’t we update H without simulating? Yes we can.Den Haan and Rendahl (2009) propose a method where

K′= Hj(K, z) =

∫k′

j (k, ϵ; Γ, z)dΛ(k, ϵ)

where Λ(k, ϵ) is the distribution of households across capital andemployment statusThis works well if you choose a parameterize the decision rules inparticular way.

▶ See “Solving the Incomplete Markets Model with AggregateUncertainty using Explicit Aggregation” on Wouter Den Haan’sweb site.

Fatih Guvenen Lecture 6: GE with Heterogeneity 7 / 19

Page 8: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Checking for Accuracy of your Solution

ø

logK′ = α1 + α2z+ α3 logK

Figure 1: Den Haan’s (2009) critique

Fatih Guvenen Lecture 6: GE with Heterogeneity 8 / 19

Page 9: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Experiments to Check Accuracy

True DGP: logK′ = α1 + α2z+ α3 logK+ α4 logK−1

Approximated DGP: logK′ = α1 + α2z+ α3 logK

Fatih Guvenen Lecture 6: GE with Heterogeneity 9 / 19

Page 10: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Checking Accuracy

Fatih Guvenen Lecture 6: GE with Heterogeneity 10 / 19

Page 11: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

“Essential Accuracy Plot”Figure 2: Updated Values of K used in Approximating Law

Fatih Guvenen Lecture 6: GE with Heterogeneity 11 / 19

Page 12: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

“Essential Accuracy Plot”Figure 3: Updated Values of K not used in Approximating Law

Fatih Guvenen Lecture 6: GE with Heterogeneity 12 / 19

Page 13: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Rules of Thumb

1 Do not rely on R2 and residual variance alone.These are average measures. Can hide big inaccuracies confinedto small areas that can be very important.R2 is scaled by the LHS of the regression. An alternative is tocheck the R2 of:

logK′ − logK = α1 + α2z+ (α3 − 1) logK

2 Also check multi-period forecast errors. (R2 checks only onestep ahead!)

Krusell and Smith checked 25 years ahead (100 periods)

3 Den Haan suggests comparing the law of motion generated bysimulated data by plotting the “essential accuracy plot” shownabove.

Fatih Guvenen Lecture 6: GE with Heterogeneity 13 / 19

Page 14: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Wide Variation in Speed of Algorithms

Figure 4: Different Algorithms for Solving Krusell-Smith (1998)

Fatih Guvenen Lecture 6: GE with Heterogeneity 14 / 19

Page 15: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Asset Prices more Sensitive than Quantities

Fatih Guvenen Lecture 6: GE with Heterogeneity 15 / 19

Page 16: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Asset Prices more Sensitive than Quantities

Fatih Guvenen Lecture 6: GE with Heterogeneity 16 / 19

Page 17: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

Understanding the Source of the Problem

Figure 5: Exact vs Numerically Computed Savings Decision Rules (forDifferent State Variable Values)

Fatih Guvenen Lecture 6: GE with Heterogeneity 17 / 19

Page 18: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

“Approximate” Aggregation

▶ Krusell-Smith call their finding that the first moment issufficient “approximate aggregation.”

▶ A major reason for outcome is that savings rule isapproximately linear in assets.

▶ So redistributing wealth from one agent to another wouldalmost not affect aggregate savings.

▶ This depends on a few key assumptions:identical preferences (Rubinstein showed that with suchpreferences it’s easy to get full demand aggregation).single asset (will talk about multiple assets in next lecture).big aversion to constraints (zero labor income makes it verycostly to be at constraint).few people at the constraint and even if there is, have no wealthto affect prices.

Fatih Guvenen Lecture 6: GE with Heterogeneity 18 / 19

Page 19: Lecture6:GeneralEquilibriumwith Heterogeneity · Krusell-SmithAlgorithm 1 Approximatethewealthdistributionwithafinitenumber(I)of moments.(HreducestoasimplefunctionmappingtheI ...

How To Simulate?

▶ K-S relies on simulating a large number of individual historiesfor thousands of periods.

▶ Make sure to reset the “seed” of the random number generatorso you always use the same “pseudo-random” numbers insubsequent simulations.

▶ This is done repeatedly so efficiency at this step is key.▶ Drawing random variables is not costless. So rather thanregenerating them, drawing once and saving can be moreefficient.

▶ However, if N× T is large, RAM may not be sufficient to store it.▶ In that case, you may want to write it to disk and then open andread as needed.

▶ Be careful, there are slow and fast ways to do this!

Fatih Guvenen Lecture 6: GE with Heterogeneity 19 / 19