Three Period OLG
Three Period OLG
Three Period OLG
Krzysztof Makarski
http://akson.sgh.waw.pl/~kmakar/emido_lato2012/wyk07.pdf and code: http://akson.sgh.waw.pl/~kmakar/emido_lato2012/OLG.m
Introduction
We are going to see an example of how to solve OLG models. There are two issues:
Finding a path starting from initial conditions. Analyzing eects of policy changes.
They are quite related, we are going to show how to deal with both issues.
Households Agents live for three periods. In the rst period we call them young, in the second middle aged and in the third old. Agents can work one unit of time when young and middle aged and zero when old. Thus when they are young and middle aged they must save for their consumption when they become old. In each period there are three generations of agents: young, middle aged and old. The following table presents the structure of population in time
time of birth
-1 0 1 2 3 4 5 ...
1 o m y
2 o m y
time 3 4 o m y
...
o m y
o m y
where cy consumption of a young agent in period t, sy savings of the young agent in period t. The budget t t constraint of an middle aged agent is
cm + sm = wt+1 + (1 + rt+1 )sy t t+1 t+1
where cm consumption of a middle aged agent in period t + 1, sm savings of the middle aged agent in t+1 t+1 period t + 1. The budget constraint of an old agent is
co = (1 + rt+2 )sm t+2 t+1
Solution Assume that agent solves her problem when young and commits to its solution. The problem of an agent born in period t 0 is
(cy ,cm ,co ,sy ,so ) t t+1 t+2 t t+1
max
log cy + log cm + 2 log co t t+1 t+2 cy + sy = wt t t cm + sm = wt+1 + (1 + rt+1 )sy t t+1 t+1 co = (1 + rt+2 )sm t+2 t+1
(1)
sb.to
Lagrangian
L = log cy + log cm + 2 log co t t+1 t+2 y (cy + sy wt ) t t t m cm + sm wt+1 (1 + rt+1 ) sy t t+1 t+1 t+1
o m o t+2 ct+2 (1 + rt+2 ) st+1
FOCs:
cy : t cm : t+1 sy : t sm : t
1 cy t 1 cm
t+1
co : 2 co1 t+2 y t
t+2
m t+1
Simplifying
cm t+1 co t+2 = = (1 + rt+1 ) cy t (1 + rt+2 ) cm t+1
(2)
Since
cy + sy t t cm t+1 + sm t+1 co t+2 = wt = wt+1 + (1 + rt+1 )sy t = (1 + rt+2 )sm t+1
we have
cy + t
1 1 1 cm + co = wt + wt+1 t+1 t+2 (1 + rt+1 ) (1 + rt+1 )(1 + rt+2 ) (1 + rt+1 ) (1 + rt+1 ) cy (1 + rt+2 ) (1 + rt+1 ) cy wt+1 t t + = wt + (1 + rt+1 ) (1 + rt+1 )(1 + rt+2 ) (1 + rt+1 )
Substituting we get
cy + t
Finally,
cy t = 1 1 wt + wt+1 (1 + + 2 ) (1 + rt+1 )
Furthermore, since
Next, we need to deal with the initial middle aged and initial old (born in period 1 and 0). For simplicity we assume that they follow their plans, i.e.
cm 1 sm 1 co 2 1 [w1 + (1 + r1 ) sy ] 0 1+ y m = w1 + (1 + r1 )s0 c1 = = (1 + r2 ) sm 1
and similarly the initial old follow their plans (although they would not have much of a choice anyway,
co = (1 + r1 ) sm 1 0
The size of the generation born in period t is Nt . Assume Nt = (1 + n)Nt1 where n is the growth rate of population.
Equations for matlab
For agents living in period t cy t sy t cm t sm t co t 1 1 wt + wt+1 2) (1 + + (1 + rt+1 ) = wt cy t 1 = wt + (1 + rt ) sy t1 1+ y m = wt + (1 + rt )st1 ct = = (1 + rt ) sm t1
The initial middle aged (the same formulas as above) cm 1 sm 1 co 2 and the initial old (the same as above) co = (1 + r1 ) sm 1 0 1 [w1 + (1 + r1 ) sy ] 0 1+ y m = w1 + (1 + r1 )s0 c1 = = (1 + r2 ) sm 1
Firms The production function is a Cobb-Douglas production function Yt = AKt L1 . Firms solve the followt ing problem
max
(Yt ,Kt ,Lt )
Yt wt Lt (rt + ) Kt
Yt = AKt L1 t
(7)
s.to
where Lt represents labor employment. For simplicity we assume that there is no technological progress. Note that if the return on capital rate is rt than the rental rate must be rt + .
(8) (9)
where Nt represents the size of the generation born in period t. Since all young and middle aged people work thus
Lt = Nt + Nt1
(10)
Competitive equilibrium Denition 1. An equilibrium is an allocation {cy , cm , co , sy , sm , Kt , Yt , Lt } and prices {wt , rt } such t t t t t t=1 t=1 that for all t 1, given prices (cy , cm , co , sy , sm ) solves the problem of an agent born in period t (1). t t+1 t+2 t t+1 initial old and initial middle aged follow their plans, i.e. given prices and (sy , sm ), (cm , sm , co , co ) satises 1 1 1 2 0 0 (3)-(6). for all t, given prices (Kt , Yt , Lt ) solves the rm's problem (7). markets clear, i.e. (8)-(10) are satised. Solution From rm's problem
(1 )AKt L t
Next dene the variables in per worker terms kt Kt /Lt and yt Yt /Lt .
rt wt = =
1 Akt
(1
)Akt
(11) (12)
Since kt =
Kt Lt
Kt Nt +Nt1
Kt+1 = sy Nt + sm Nt1 t t
Kt+1 Nt+1 + Nt Nt Nt1 = sy + sm t t Nt+1 + Nt Nt + Nt1 Nt + Nt1 Nt + Nt1 Kt+1 (1 + n + 1) Nt (1 + n) Nt1 Nt1 = sy + sm t t Nt+1 + Nt 1 + 1 N (1 + n + 1) Nt1 (1 + n + 1) Nt1
1+n t
kt+1 (1 + n) = sy t kt+1 =
1 y 1 s + sm 2+n t (2 + n) (1 + n) t
(13)
This is the law of motion for capital per worker. Thus, given the initial k0 , we can solve the model in matlab. 4
Steady state Denition 2. The steady state allocation is a competitive allocation satisfying kt = k, yt = y , cy = cy , t sy = sy , cm = cm , sm = sm , co = co , for all t. t t t t
In the steady state we have w r cy sy cm sm co = = (1 ) Ak Ak 1
1 2+r w (1 + + 2 ) 1 + r = w cy 1 = [w + (1 + r) sy ] 1+ = w + (1 + r)sy cm = = (1 + r) sm
and to nd capital the law of motion for capital (13) and substitute kt+1 = k k= 1 y 1 s + sm 2+n (2 + n) (1 + n)
50 t=1
. Check if
50 t=1
50 t=1
There is one more check to make (just in case), you need to check whether in 50 periods economy achieves the steady state. Extend your transition path to 150 compare both paths.
Path of capital
Matlab code for solving the model. Path of capital, see lawgure1Figure 1 .
gure1
0.065
0.06
0.055
0.05
0.045
0.04
0.035
0.03
0.025
0.02
10
15
20
25
30
35
40
45
50
lawreturn
Social Security
Description
We are going to consider a switch from PAYG system to fully funded system. Denote bt pension in period t. Denote contribution of young and middle aged as, respectively, y and m. Relation between bt and ( y , m ) depends on the social security system (details later). Next given (bt , y , m ) we solve the consumer problem.
Consumer problem Assume that agent solves her problem when young and commits to its solution. The problem of an agent born in period t 0 is
(cy ,cm ,co ,sy ,so ) t t+1 t+2 t t+1
max
(14)
sb.to
Lagrangian
L = log cy + log cm + 2 log co t t+1 t+2 y (cy + sy wt + ty ) t t t
m m cm + sm wt+1 + t+1 (1 + rt+1 ) sy t t+1 t+1 t+1 o m o t+2 ct+2 (1 + rt+2 ) st+1 bt+2
FOCs:
cy : t cm : t+1 sy : t sm : t
1 cy t 1 cm
t+1
co : 2 co1 t+2 y t
t+2
m t+1
Simplifying
cm t+1 co t+2 = = (1 + rt+1 ) cy t (1 + rt+2 ) cm t+1
Since
cy + sy t t cm + sm t+1 t+1 co t+2 = wt ty
m = wt+1 t+1 + (1 + rt+1 )sy t
we have
cy + t
where
wey = wt ty + t
Substituting we get
cy + t
and for the last period we use the budget constraint to get
co = (1 + rt+2 )sm + bt+2 t+2 t+1
Next, we need to deal with the initial middle aged and initial old (born in period 1 and 2). For simplicity we assume that they follow their plans, i.e.
cm 1 sm 1 co 2 b2 1 m w1 1 + (1 + r1 ) sy + 0 1+ 1 + r2 m = w1 1 + (1 + r1 )sy cm 1 0 = = (1 + r2 ) sm 1 + b2
and similarly the initial old follow their plans (although they would not have much of a choice anyway,
co = (1 + r1 ) sm + b1 1 0
The size of the generation born in period t is Nt . Assume Nt = (1 + n)Nt1 where n is the growth rate of population.
Consumer problem solution Summarizing (the same formulas also for the initial old)
cy = t 1 wey 1 + + 2 t
where wey = wt ty + t
sy t cm = t
wt ty cy t
2.1
PAYG Social security Collects contributions t from young and middle aged and pays to old.
Nt2 bt = Nt ty + Nt1 tm
Thus
bt = (1 + n) ty + (1 + n) to
(19)
(20) (21)
where Nt represents the size of the generation born in period t. Since all young and middle aged people work thus
Lt = Nt + Nt1
(22)
Competitive equilibrium Denition 3. An equilibrium is an allocation {cy , cm , co , sy , sm , Kt , Yt , Lt } and prices {wt , rt } such t t t t t t=1 t=1 that for all t 1, given prices (cy , cm , co , sy , sm ) solves the problem of an agent born in period t (14). t t+1 t+2 t t+1 initial old and initial middle aged follow their plans, i.e. given prices and (sy , sm ), (cm , sm , co , co ) satises 1 1 1 2 0 0 (15)-(18). for all t, given prices (Kt , Yt , Lt ) solves the rm's problem (7). for all t, social security is balanced, thus (19) is satised. markets clear, i.e. (20)-(22) are satised. Solution Similarly as before we get
1 y 1 st + sm 2+n (2 + n) (1 + n) t This is the law of motion for capital per worker. Thus, given the initial k0 , we can solve the model in matlab. kt+1 =
Steady state
In the steady state we have w r =
2
(1 ) Ak
= Ak 1
b = (1 + n) y + (1 + n) m cy = 1 w m b w y + + 2 2 1++ (1 + r) (1 + r) sy cm = = w y cy
1 b w m + (1 + r) sy + 1+ 1+r = = w m + (1 + r)sy cm (1 + rt ) sm + b
sm c
o
In order to nd the steady state use the law of motion for capital (13) and substitute kt+1 = k k=
2.2
1 y 1 s + sm 2+n (2 + n) (1 + n)
Fully Funded Social security Collects contributions t from young and middle aged, invests and proceedings are paid to old, thus
bt = (1 + rt ) (1 + rt1 ) y + (1 + rt ) m
(23)
(24) (25)
where Nt represents the size of the generation born in period t. Since all young and middle aged people work thus
Lt = Nt + Nt1
(26)
Competitive equilibrium Denition 4. An equilibrium is an allocation {cy , cm , co , sy , sm , Kt , Yt , Lt } and prices {wt , rt } such t t t t t t=1 t=1 that for all t 1, given prices (cy , cm , co , sy , sm ) solves the problem of an agent born in period t (14). t t+1 t+2 t t+1 initial old and initial middle aged follow their plans, i.e. given prices and (sy , sm ), (cm , sm , co , co ) satises 1 1 1 2 0 0 (15)-(18). for all t, given prices (Kt , Yt , Lt ) solves the rm's problem (7). for all t, social security is balanced, thus (23) is satised. markets clear, i.e. (24)-(26) are satised. Solution Similarly as before we get
kt+1 = 1 1 (sy + ty ) + (sm + tm ) t 2+n (2 + n) (1 + n) t
This is the law of motion for capital per worker. Thus, given the initial k0 , we can solve the model in matlab.
Steady state
In the steady state we have w r = =
2
(1 ) Ak Ak 1
b = (1 + r) y + (1 + r) m cy = 1 w m b w y + + 2 2 1++ (1 + r) (1 + r) sy = w y cy
10
cm =
1 b w m + (1 + r) sy + 1+ 1+r = = w m + (1 + r)sy cm (1 + rt ) sm + b
sm c
o
In order to nd the steady state use the law of motion for capital (13) and substitute kt+1 = k k=
3
Transition path
Assume initially we have a PAYG system and it is in the steady state (in general it is not necessary) Assume we switch to the FF system and eventually we end up in the new steady state (necessary). Old system is unexpectedly disbanded in period 0. Problem pensions for initial old and middle aged. Assume they are paid as promised, i.e. b = 2 (1 + n) y + (1 + n) o and it is nanced by young and middle aged through evenly distributed taxes.
Furthermore initial middle aged are in the PAYG system (thus their contributions are not invested).
Parameters
= 0.33; = 0.9720 ; = 1 (1 0.07)20 ; z = 10; n = 4; sy = 0.015; sm = 0.027; 1 1 y = 0.2; m = 0.2;
Path of capital
Matlab code for solving the model. Path of capital, see capitalgure2Figure 2 .
Path of welfare
We look at how welfare of dierent generations is aected to see who gains and who loses. Path of welfare change, see welfaregure3Figure 3 .
Summary
We showed how to solve OLG models We showed how to deal with the transition paths. As far as social security is concerned it probably is necessary to nance it through debt in order for
11
gure2
0.48
0.46
0.44
0.42
0.4
0.38
0.36
0.34 10 20 30 40 50
capitalreturn
gure3
Figure 3: Welfare change on the transition path for generation born in each period.
0.05
-0.05
-0.1
-0.15
-0.2 10 20 30 40 50
lawreturn
12