Stochastic Two Period OLG Model

Stochastic Two Period OLG Model
Prof. Lutz Hendricks
Econ821
January 28, 2016
1 / 21
Contents
Introduction
3
Household
4
Computing the Household Problem
7
Stationary Equilibrium
10
Exercise: Pseudo-code for Algorithm
12
Calibration Algorithm
14
Calibration Results
17
Exercise: Generic Household Code
19
References
20
2 / 21
Introduction
We build up towards solving a stochastic, heterogeneous agent OLG model like Huggett
(1996).
Building on the deterministic model, we change:
• Households draw random labor endowments at each age: ea ∈ ea1 , ..., eanw .
• Endowment draws are independent over time: Pr(ea = eaj ) = Pea (j).
• Incomes received are then: yja = eaj wa .
Young wage rate is determined by firms’ marginal product of labor.
Old ”wage rate” is set by government as a transfer.
3 / 21
Household
max u(cyt ) + Et β u(cot+1 )
subject to
where
o
cot+1 − yt+1
= (1 + rt+1 ) (yty − cyt )
(1)
nw
X
Et u cot+1 =
Peo (j) u cot+1 yjo
(2)
j=1
Timing: Realizations of y are known before consumption is chosen.
4 / 21
Lagrangean
o
Γ(yty ) = max u(cyt ) + β Et u [1 + rt+1 ] [yty − cyt ] + yt+1
Euler equation
o
u0 (cyt ) = β (1 + rt+1 ) Et u0 [1 + rt+1 ] [yty − cyt ] + yt+1
(3)
5 / 21
Example: Certainty Equivalence: u(c) = a c − b c2
Euler equation becomes
a − bcyt = β (1 + rt+1 ) Et a − bcot+1
(4)
a − bcyt = β (1 + rt+1 ) [a − b (1 + rt+1 ) (yty − cyt ) − bEt {y o }]
(5)
Rearrange
2
cyt =
[1 − β (1 + r)] a/b + β (1 + r) Et {Wt }
2
1 + β (1 + r)
Implications:
• Certainty equivalence: Consumption only depends on the expected value of lifetime
income, Et {Wt }.
• Marginal propensity to consume is the same out of present income and out of expected
future income.
• Consumption itself is a martingale.
6 / 21
Computing the Household Problem
For this model, the method we used for the deterministic case still works.
Search over values of s to find the zero of the Euler equation
X
u0 (y y − s) = β [1 + r]
Peo (j) u0 yjo + [1 + r] s
j
Result: Saving function s (y y ). This is a (1 × nw ) vector.
For multi-period models there are two complications:
• the consumption function for t + 1 is not known (but can be found by backward
induction).
• wealth is an additional, continuous state variable (this is handled by interpolation).
7 / 21
Household Dynamic Program
For more complicated models it is convenient to write the household problem recursively:
V o (y o , s) = u (y o + [1 + r] s)
(6)
V y (y y ) = max u(y y − s) + β E {V o (y o , s)}
(7)
Vso (y o , s) = [1 + r] u0 (y o + [1 + r] s)
(8)
u0 (y y − s) = β E {Vso (y o , s)}
(9)
First-order conditions
The end result is the same.
8 / 21
Algorithm for Household Problem
Take as given: parameters, prices.
1. Calculate marginal utility when old from the budget constraint:
M U o (y o , s) = u0 (y o + [1 + r] s)
To compute this, approximate on a grid for wealth: s ∈ {s1 , ..., sns }.
Then M U o is a (nw × ns ) matrix.
2. Compute expected marginal utility for every wealth level:
Pnow o
EM U o (si ) = j=1
Pe (j) M U o (y o , si ).
EM U o is a (1 × ns ) vector.
3. Search for a zero of the Euler equation deviation
y y − s = (u0 )
−1
(β [1 + r] EM U o (s))
(10)
hh_solve_olg2s.m
Note: The only change from the deterministic case is that marginal utility is replaced by
EM U o .
9 / 21
Stationary Equilibrium
Objects:
• Scalars: G, K, L, r, w.
• Policy functions: cy (y y ) , s (y y ) , co (s, y o ).
• A distribution of households over types; density Λ (y y , y o ).
Steady state conditions:
In this simple model the density is exogenous: Λ yjy , yio = Pey (j) · Peo (i).
Policy functions solve the household problem.
Firm:
r = (1 − τr ) FK (K, L) − δ
(11)
w = (1 − τw ) FL (K, L)
(12)
Market clearing:
L=N
X
Pey (j) eyj
(13)
j
K (1 + n) = N
X
Pey (j) s yjy
(14)
j
G+
X
Peo (j) yjo N/(1 + n) = τw FL (K, L)L + τr FK (K, L)K
(15)
j
10 / 21
Steady State in Per Capita Terms
Scalars: g = G/N, k = K/L, l = L/N, r, w.
Steady state conditions:
r = (1 − τr ) f 0 (k) − δ
(16)
w = (1 − τw ) [f (k) − f 0 (k) k]
(17)
l=
X
Pey (j) eyj
(18)
j
s (y y ) = y y − cy (y y )
(19)
co (s, y o ) = y o + (1 + r) s
(20)
y
k l (1 + n) =
ne
X
Pey (j) s yjy
(21)
j=1
o
−1
g + (1 + n)
ne
X
Peo (j) yjo = τw [f (k) − f 0 (k) k] l + τr f 0 (k) k l
(22)
j=1
Note: l is exogenous.
11 / 21
Exercise: Pseudo-code for Algorithm
Guess k.
Compute r, w from steady state conditions.
Solve household problem for policy functions for every eyj .
Compute aggregate k from household savings.
Iterate until deviation from capital market clearing is close to zero.
Program: bg_comp_olg2s.m.
12 / 21
Computing Aggregate Capital
Direct method: In this simple model, the distribution of savings is known. Aggregate
saving can be computed directly as
y
k l (1 + n) =
ne
X
Pey (j) s yjy
j=1
Simulation method:
In multi-period models, we don’t know the distribution of savings.
Then we simulate a large number of households, starting from age 1 forward.
Compute aggregate wealth as: [mean of savings over all simulated households] × [mass of
households].
13 / 21
Calibration Algorithm
Fix k at the value implied by the target level for K/Y : k = (AK/Y )
1/(1−α)
Compute r, w from marginal products.
Guess β.
Solve household problem for s (y y ).
Iterate until deviation from capital market clearing is small.
Program: cal_comp_olg2s.m.
14 / 21
Parameters
By default, parameters are the same as in the deterministic model.
Labor endowments: Should be calibrated to match earnings processes. For now: set to
arbitrary values.
Capital grid:
Grid must be tight at low s where marginal utility may be highly nonlinear.
Number of grid points must be large enough so that approximation errors are small: nk =
100.
set_kgrid_olg2s.m sets a capital grid with constants steps for low s and constant
exponential steps for high s.
15 / 21
Capital Grid
Capital grid
8
7
6
5
4
3
2
1
0
0
10
20
30
40
50
60
70
80
90
100
16 / 21
Calibration Results
>> cal_comp_olg2sS(1, 0, 111);
Deviation from calibration targets: 0.000000
beta = 2.284. Annual beta = 1.028
k = 0.151.
Verify that steady state computation returns desired K/Y :
>> bg_comp_olg2sS(1, 0, 111);
Steady state. calNo = 1. expNo = 0.
k = 0.151. y = 1.563.
r = 3.322. w = 1.000.
cY/wY = 0.645.
s/y = 0.227
Deviation = 0.000000
Steady state K/Y = 0.097. Target: 0.097.
Verify that the model replicates the certainty case: calNo = 50.
17 / 21
Consumption Function
Solve household problem for various levels of young income.
show_cons_fct_olg2s.m
Calibration 1
1
0.9
0.8
0.7
cY, s
0.6
0.5
0.4
0.3
0.2
cY
s
0.1
0
0
0.5
1
1.5
Young income
Consumption function is nearly linear.
18 / 21
Exercise: Generic Household Code
Write a generic function that solves
P
V (k) = max u (c) + β j πj V̂ (k 0 , j)
subject to
k 0 = f (k, c), k 0 ≥ k̄, c ≥ c̄.
Inputs:
1. parameters β, πj , k̄, c̄
2. V̂ on a grid for k 0
3. u (c) object
4. budget constraint object with method c = g (k, k 0 )
Start with pseudo-code.
19 / 21
References
Heer and Maussner (2008) contains lots of detail on computing OLG models.
Guvenen (2011): a practical guide.
20 / 21
References
Guvenen, F. (2011): “Macroeconomics with Heterogeneity: A Practical Guide,” Economic Quarterly-Federal Reserve Bank of Richmond, 97, 255.
Heer, B. and A. Maussner (2008): “Dynamic General Equilibrium Modelling Springer
Berlin,” Heidelberg, New York.
Huggett, M. (1996): “Wealth distribution in life-cycle economies,” Journal of Monetary
Economics, 38, 469–494.
21 / 21