Upload
naotosoma
View
232
Download
2
Embed Size (px)
DESCRIPTION
DP
Citation preview
June 24th, 2010 @ Gakushuin
E-mail: [email protected]://masaru.inaba.googlepages.com/
() 2010/06/24 @ Gakushuin 1 / 78
() 2010/06/24 @ Gakushuin 2 / 78
I
() 2010/06/24 @ Gakushuin 3 / 78
I.1
maxct ;it ;kt+1
TXt=0
tu(ct)
subject toct + it = f (kt)kt+1 kt = it kt; t = 0; ;T;k0 = k0kT+1 0:
0 < < 1 (discount factor)u(0) = 0; u0() > 0; u00() < 0; u0(0) = 1; u0(1) = 0
() 2010/06/24 @ Gakushuin 4 / 78
it
maxct ;kt+1
TXt=0
tu(ct)
subject to
kt+1 kt = f (kt) ct kt t = 0; ; T; ( (transition equation))k0 = k0kT+1 0:
() 2010/06/24 @ Gakushuin 5 / 78
L =TX
t=0tu(ct)+
TXt=0
ttnf (kt)ctkt+1+(1)kt
o+1(k0k0)+kT+1:
(1)kt (state variable)ct (control variable)tt (costate variable)
() 2010/06/24 @ Gakushuin 6 / 78
@L@ct
= tu0(ct) tt = 0 (t = 0; 1; 2; ;T )@L@kt+1
= tt + t+1t+1nf 0(kt+1) + (1 )
o= 0 (t = 0; 1; 2; ;T 1)
@L@kT+1
= TT + = 0@L@t
= tnf (kt) ct kt+1 + (1 )kt
o= 0 (t = 0; 1; 2; ;T )
@L@1
= k0 k0 = 0:
kT+1 0; 0; kT+1 = 0:
() 2010/06/24 @ Gakushuin 7 / 78
u0(ct) = t (t = 0; 1; 2; ;T ) (2)t = t+1
nf 0(kt+1) + (1 )
o(t = 0; 1; 2; ;T 1) (3)
TT = (4)kt+1 kt = f (kt) ct kt (t = 0; 1; 2; ;T ) (5)k0 = k0 (6)kT+1 0; 0; kT+1 = 0: (7)
() 2010/06/24 @ Gakushuin 8 / 78
(2)(3)Euler
u0(ct) = u0(ct+1)nf 0(kt+1) + (1 )
o(8)
(7)
TT kT+1 = 0 (9)TT > 0
kT+1 = 0:
() 2010/06/24 @ Gakushuin 9 / 78
I.2t 1 (shadow price) (3)
t = t+1nf 0(kt+1) + (1 )
o(for t = 0; 1; 2; ;T 2) (10)
(forward-looking variable)
TT kT+1 = 0
T kT+1 kT+1
() 2010/06/24 @ Gakushuin 10 / 78
II
() 2010/06/24 @ Gakushuin 11 / 78
II.1
maxct ;kt+1
1Xt=0
tu(ct)
s.t. kt+1 kt = f (kt) ct ktk0 = k0:
L =1X
t=0tu(ct)+
1Xt=0
ttnf (kt)ctkt+1+ (1)kt
o+1(k0k0) (11)
() 2010/06/24 @ Gakushuin 12 / 78
kt+1ct
@L@ct
= tu0(ct) tt = 0@L@kt+1
= tt + t+1t+1nf 0(kt+1) + (1 )
o= 0
@L@t
= tnf (kt) ct kt+1 + (1 )kt
o= 0
@L@1
= k0 k0 = 0:
() 2010/06/24 @ Gakushuin 13 / 78
u0(ct) = u0(ct+1)nf 0(kt+1) + (1 )
o(12)
kt+1 kt = f (kt) ct kt (13)k0 = k0 (14)
T ! 1limt!1
tu0(ct)kt+1 = 0: (15)
() 2010/06/24 @ Gakushuin 14 / 78
II.1 (steady state)(1/3) (optimal path)
u0(ct) = u0(ct+1)nf 0(kt+1) + (1 )
o(16)
kt+1 kt = f (kt) ct kt (17)k0 = k0
ck
u0(c) = u0(c)nf 0(k) + (1 )
ok k = f (k) c k
() 2010/06/24 @ Gakushuin 15 / 78
(steady state)(2/3)
1 = nf 0(k) + (1 )
o(18)
c + k = f (k) (19)
() 2010/06/24 @ Gakushuin 16 / 78
(steady state)(3/3)c
kk
ct+1 = ct
kt+1 = ktE
kg
c
() 2010/06/24 @ Gakushuin 17 / 78
(modified golden rule) kg(19)
f 0(kg) =
k > kg (dynamic inefficiency).k kg (dynamic efficiency).
k (18)
f 0(k) = 1 1 +
. f 0()k < kg =) k
() 2010/06/24 @ Gakushuin 18 / 78
II.3.(i): (phasediagram)(1/6)
(optimal path)
u0(ct) = u0(ct+1)nf 0(kt+1) + (1 )
o(20)
kt+1 kt = f (kt) ct kt (21)k0 = k0
() 2010/06/24 @ Gakushuin 19 / 78
(phase diagram)(2/6)(ct+1 = ct)ct+1 = ct k < k f 0(k)
1 < f 0(k) + (1 )
(20)u0(ct)
u0(ct+1) = nf 0(kt+1) + (1 )
o> 1
()u0(ct) > u0(ct+1)()ct+1 > ct
u0()ct+1 = ctct+1 = ct
() 2010/06/24 @ Gakushuin 20 / 78
(phase diagram)(3/6)
k < k
.
.
.
1 f 0(k) + (1 )
.
.
.
2
.
.
.
3 ct+1 > ct.
k > k
.
.
.
1 f 0(k) + (1 )
.
.
.
2
.
.
.
3 ct+1 < ct
() 2010/06/24 @ Gakushuin 21 / 78
(phase diagram)(4/6)c
kk
ct+1 = ct
kgFigure: ct+1 = ct
() 2010/06/24 @ Gakushuin 22 / 78
(phase diagram)(5/6)(kt+1 = kt)kt+1 = kt kt+1 = kt c + k = f (k) kc
c + k > f (k)(21)
kt+1 kt = f (kt) ct kt < 0()kt+1 < kt
kt+1 = kt
() 2010/06/24 @ Gakushuin 23 / 78
(phase diagram)(6/6)c
k
kt+1 = kt
kgFigure: kt+1 = kt
() 2010/06/24 @ Gakushuin 24 / 78
(ii): (optimalpath)(1/7)c
kk
ct+1 = ct
kt+1 = ktE
kg
c
IV
III
III
Figure: () 2010/06/24 @ Gakushuin 25 / 78
(optimal path)(2/7)
k0
u0(ct) = u0(ct+1)nf 0(kt+1) + (1 )
okt+1 kt = f (kt) ct ktk0 = k0
c0
() 2010/06/24 @ Gakushuin 26 / 78
(optimal path)(3/7)c
kk
ct+1 = ct
kt+1 = ktE
kgk0
cl0
c0cu0
O E0
Figure: II () 2010/06/24 @ Gakushuin 27 / 78
(optimal path)(4/7)c0cu0
.
. .1 I
.
.
.
2 kt+1 = kt IV
.
.
.
3 IV
.
.
.
4 (c; k) = (0; 0)
.
.
.
1
.
.
.
2 limc!0 u0(c) = 1.
.
.
.
3
.
.
.
4 cu0 () 2010/06/24 @ Gakushuin 28 / 78
(optimal path)(5/7)
cl0
.
.
.
1 I
.
.
.
2 ct+1 = ct II
.
.
.
3
.
.
.
4 E0
() 2010/06/24 @ Gakushuin 29 / 78
(optimal path)(6/7)
.
.
.
1 limc!0 u0(c) = 1
.
.
.
2 E0
.
.. 3 E0 kg
f 0(k) <
.
.
.
4 (20)u0(ct+1)u0(ct) =
1 f 0(kt+1) + (1 ) > 1
u0(ct) 1t
.
.
.
5 limt!1 tu0(ct) = 1 limt!1 kt = kE0
limt!1
tu0(ct)kt+1 = 1
.
.
.
6 cl0 () 2010/06/24 @ Gakushuin 30 / 78
(optimal path)(7/7)
c0 4 cl0
(saddle path)
() 2010/06/24 @ Gakushuin 31 / 78
II.4
.
.
.
1
.
.
.
2
() 2010/06/24 @ Gakushuin 32 / 78
(i)
u0(ct) = u0(ct+1)nf 0(kt+1) + (1 )
o(22)
kt+1 kt = f (kt) ct kt: (23) (constant relative risk aversion, CRRA)
u(c) = c1
1 1
f (k) = Ak
ct = ct+1
nAk1t+1 + (1 )
o(24)
kt+1 kt = Akt ct kt (25)1 Y = AK(L)1 y = Ak
() 2010/06/24 @ Gakushuin 33 / 78
II.5 (shooting algorithm)
k0(24)(25) c0 c0 c0 (shooting algorithm)
() 2010/06/24 @ Gakushuin 34 / 78
(steady state)(24) (25)
1 = nAk1 + (1 )
o(26)
c + k = Ak (27)
k =8>>>:
1 (1 )A
9>>=>>;1
1
(28)
c = Ak k (29)
() 2010/06/24 @ Gakushuin 35 / 78
(i): (shootingalgorithm)
.
.
.
1
.
.
.
2 cl cu
.
.
.
3 c0 =cl+cu
2
.
.
.
4 k0 c0(24)(25)t = 1; 2; 3; ;
.
.
.
5 t
.
.
.
1 kt > kcl = c0step 3
.
.
.
2 kt < kcu = c0step 3
.
.
.
3 k kt <
.
.
.
6 c0ct; kt
() 2010/06/24 @ Gakushuin 36 / 78
(ii) Matlab Code (1/10)% determinisitic model
% shooting algorithm for simple optimal growth model
% u(c)=c^(1-sigma)/(1-sigma)
% y=Ak^alpha
% 2008/11/22
% Masaru Inaba at YNU
% 6Matlab% shootingclear all;
close all;
set(0,'defaultAxesFontSize',12);
set(0,'defaultAxesFontName','century');
set(0,'defaultTextFontSize',12);
set(0,'defaultTextFontName','century');
() 2010/06/24 @ Gakushuin 37 / 78
Matlab Code (2/10)% ================
% parameters
% ================
alpha=0.3; % capital share
beta=0.98; % discount factor
delta=0.08; % depreciation rate
sigma=2; % relative risk aversion
T=100; % maximum time for simulation
A=1*ones(T,1); % productivity (which is constant for all t)
% ====================
% steady state values
% ====================
A_ss=1; %productivity in ss
% ss capital, equation (28)
k_ss=((1/beta-(1-delta))/(alpha*A_ss))^(1/(alpha-1));
% ss consumption, equation(29)
c_ss=A_ss*k_ss^alpha-delta*k_ss;
() 2010/06/24 @ Gakushuin 38 / 78
Matlab Code (3/10)
% =====================
% initialization
% =====================
k_0=0.1; % initial value of capital
% lower bound of initial value of consumption
c_under=0.000000001;
% upper bound of initial value of consumption
c_upper=A_ss*k_0^alpha-delta*k_0;
% initialize path vector of capital as zero vector
k=zeros(T,1);
% initialize path vector of consumption as zero vector
c=zeros(T,1);
() 2010/06/24 @ Gakushuin 39 / 78
Matlab Code (4/10)
% ======================
% shooting algorithm
% ======================
% start while iteration
while (abs(k(T)-k_ss)>1e-8)&(abs(c(T)-c_ss)>1e-8);
% initialize path vector of capital as zero vector k=zeros(T,1);% initialize path vector of consumption as zero vector c=zeros(T,1); c0temp=(c_upper+c_under)/2; % initialization of c_0
() 2010/06/24 @ Gakushuin 40 / 78
Matlab Code (5/10)
%-----------% at t=1%----------- t=1; % note that Matlab can not apply the number of index 0 k(t)=k_0; c(t)=c0temp;% equation (25) k(t+1)=A(t)*k(t)^alpha-c(t)-delta*k(t)+k(t);% equation (24) c(t+1)=(c(t)^(-sigma).../(beta*(alpha*A(t+1)*k(t+1)^(alpha-1)+(1-delta))))^(-1/sigma);
() 2010/06/24 @ Gakushuin 41 / 78
Matlab Code (6/10)
%---------------% for t=2 to T-1%--------------- for t=2:T-1;% equation (25) k(t+1)=A(t)*k(t)^alpha-c(t)-delta*k(t)+k(t);% flag 1 means k(t) is too big if k(t+1)>2*k_ss; flag=1; break; end;% flag 2 means k(t) is too small if k(t+1)
Matlab Code (7/10)%---------------% diagnosis%--------------- if t==T-1; if k(T)>k_ss; flag=1 % flag 1 means k(T) is too big else flag=2 % flag 2 means k(T) is too small end end if flag==1; c_under=c0temp elseif flag==2; c_upper=c0temp end clear flagend % end of while iteration loop
disp('We found!'); % the end of shooting algorithm.
() 2010/06/24 @ Gakushuin 43 / 78
Matlab Code (8/10)% =============================
% code for the graph plottings
% =============================
% data for equation (27);
k_Eprime=(delta/A_ss)^(1/(alpha-1)); % position of E'
% data for plotting equation (27)
k_27=linspace(0,k_Eprime,1000); % vector of k in (27)
c_27=A_ss.*k_27.^alpha-delta.*k_27; % vector of c in (27)
% data for plotting equation (26)
c_26=linspace(0,2*c_ss,100);
k_26=k_ss*ones(100,1);
% data for initial value plotting
k_initial=k_0*ones(100);
c_kinitial=linspace(0,(A_ss*k_0^alpha-delta*k_0),100);
% data for optimal initial consumption
coptini=c(1,1)*ones(100);
koptini=linspace(0,k_0,100);
() 2010/06/24 @ Gakushuin 44 / 78
Matlab Code (9/10)
figure(1);
% plot equation(27)
plot(k_27,c_27);axis([0,1.05*k_Eprime,0,1.3*c_ss]);hold on;
% plot equation(26)
plot(k_26,c_26);
plot(k,c,'m','LineWidth',2);% plot for optimal path
plot(k_initial,c_kinitial,':'); % plot for k_0
plot(koptini,coptini,':'); % plot for optimal c_0
text(k_0,-0.15,'k_{0}');
text(-0.8,c(1,1),'c_0');
text(k_ss,-0.15,'k_{ss}');
text(k_ss,1.03*c_ss,'E');
text(k_Eprime,-0.15,'E^\prime');
hold off;
() 2010/06/24 @ Gakushuin 45 / 78
Matlab Code (10/10)figure(2);
% plot equation(27)
plot(k_27,c_27);axis([0,1.3*k_ss,0,1.3*c_ss]);hold on;
% plot equation(26)
plot(k_26,c_26;
plot(k,c,'m','LineWidth',2);% plot for optimal path
plot(k_initial,c_kinitial,':'); % plot for k_0
plot(koptini,coptini,':'); % plot for optimal c_0
text(k_0,-0.15,'k_{0}');
text(-0.2,c(1,1),'c_0');
text(k_ss,-0.15,'k_{ss}');
text(k_ss,1.03*c_ss,'E');
text(k_Eprime,-0.15,'E^\prime');
hold off;
Matlab
() 2010/06/24 @ Gakushuin 46 / 78
1 by shooting algorithm
0 5 10 15 20 25 30 350
0.5
1
1.5
k0
c0
kss
E
E
Figure: Phase diagram for shooting 1 () 2010/06/24 @ Gakushuin 47 / 78
0 1 2 3 4 5 60
0.5
1
1.5
k0
c0
kss
E
Figure: Phase diagram for shooting 2 () 2010/06/24 @ Gakushuin 48 / 78
II.6
() 2010/06/24 @ Gakushuin 49 / 78
(i): (1/6): f (x) a
f (x) = f (a) + f 0(a)(x a) + 12!
f 00(a)(x a)2 + 13! f000(x a)2 +
() =1X
n=0
1n!
f n(a)(x a)n
f (x) f (a) + f 0(a)(x a) (30) () 2010/06/24 @ Gakushuin 50 / 78
(2/6) f (x) x = aax a
a
f (x)
x
f (x)
f (a) + f 0(a)(x a)
Figure: () 2010/06/24 @ Gakushuin 51 / 78
(3/6)
f (x; y) = f (a; b) + fx(a; b)(x a) + fy(a; b)(y b)+
12!
nfxx(a; b)(x a)2 + 2 fxy(x a)(y b) + fyy(a; b)(y b)3
o+
fx = @ f (x;y)@x f (x; y) f (a; b) + fx(a; b)(x a) + fy(a; b)(y b) (31)
() 2010/06/24 @ Gakushuin 52 / 78
(4/6) (log-linearization) xln xln a2
x = eln x
3 f (x) = feln x
ln x
(30)
f (x) feln a
+@ f
eln x
@ ln x
(ln x ln a)() f (x) f (a) + a f 0(a)(ln x ln a)
2ln3e dexdx = ex
() 2010/06/24 @ Gakushuin 53 / 78
(5/6)
x = eln x
f (x) = feln x
ln x
@ feln x
@ ln x
=@ f (x)@x
@eln x
@ ln x= f 0(x)x
() 2010/06/24 @ Gakushuin 54 / 78
(6/6)
f (x) f (a) + a f 0(a)(ln x ln a)
ln(x) ln(a) = ln
x
a
= ln
x a
a+ 1
x a
a(32)
xaax a
apersentage deviationa
() 2010/06/24 @ Gakushuin 55 / 78
(ii)
(24) (25)(26) (27)
k =8>>>:
1 (1 )A
9>>=>>;1
1
c = Ak k:
() 2010/06/24 @ Gakushuin 56 / 78
(25)(25)
kt+1 k + 1 (kt+1 k)kt k + 1 (kt k)
Akt Ak + Ak1(kt k)ct c + 1 (ct c)kt k + (kt k)
(25)kt+1 kt = Akt ct kt
()(k + kt+1 k) (k + kt k) = Ak + Ak1(kt k) (c + ct c) fk + (kt k)g
()(kt+1 k) (kt k) = Ak1(kt k) (ct c) (kt k)( (27))
() 2010/06/24 @ Gakushuin 57 / 78
xt xt x (x)
kt+1 kt = Ak1 kt ct kt()kt+1 = Ak1 + 1 )kt ct()kt+1 = 1
kt ct ((26))
()kt+1 = 1 kt ct (33)1 = 1 > 0
() 2010/06/24 @ Gakushuin 58 / 78
(24)(24)
ct c c1(ct c)
ct+1nAk1t+1 + (1 )
o c
nAk1 + (1 )
o c1
nAk1 + (1 )
o(ct+1 c)
+ cn( 1)Ak2
o(kt+1 k)
(24)c1(ct c)
= c1(ct+1 c) + cn( 1)Ak2
o(kt+1 k)
() 2010/06/24 @ Gakushuin 59 / 78
xt xt x c1ct = c1ct+1 +
n( 1)Ak2
okt+1
, ct = ct+1 + 2 kt+1, ct+1 ct = 2 kt+1 (34)
2 =
n(1)Ak2
oc1 > 0
() 2010/06/24 @ Gakushuin 60 / 78
(33)(34)kt+1 = 1 kt ctct+1 ct = 2 kt+1
ct
kt+2 (1 + 1 + 2)kt+1 + 1 kt = 0, kt+2 3 kt+1 + 1 kt = 0
3 = 1 + 1 + 2
() 2010/06/24 @ Gakushuin 61 / 78
2 3 + 1 = 01;2 =
3p
23412
1 > 1 2 < 1=)
kt k = b1t1 + b2t2
1 > 1 2 < 1 0 kt = k b1 = 0
() 2010/06/24 @ Gakushuin 62 / 78
ckk
ct+1 = ct
kt+1 = ktE
kg
c
Figure: Linearized dynamics () 2010/06/24 @ Gakushuin 63 / 78
III
() 2010/06/24 @ Gakushuin 64 / 78
III
() 2010/06/24 @ Gakushuin 65 / 78
III.1
(one representative household) (goods)
() 2010/06/24 @ Gakushuin 66 / 78
(i)
1Xt=0
tu(ct): (35)
u()u(0) = 0; u0() > 0; u00() < 0; u0(0) = 1; u0(1) = 0
() 2010/06/24 @ Gakushuin 67 / 78
yt = f (kt) (36) f (kt)
MPK = f 0(k) > 0f 00(k) < 0limk!0
f 0(k) = 1limk!1
f 0(k) = 0
() 2010/06/24 @ Gakushuin 68 / 78
III.2.(i) (ConsumerProblem (CP))
(CP) maxct ;it ;at+1
1Xt=0
tu(ct):
s.t. ct + it = wt + rtat (37)at+1 at = it at (38)a0 = a0
(37)ta a0w (real wage) w 1 r (real rental price)
() 2010/06/24 @ Gakushuin 69 / 78
at+1ctt
u0(ct) = u0(ct+1)nrt+1 + 1
o
at+1 at = wt + rtat ct ata0 = a0.
T ! 1limt!1
tu0(ct)at+1 = 0: (39)
() 2010/06/24 @ Gakushuin 70 / 78
a1 = w0 + (r0 + 1 )a0 c0 (t = 0) (40)a2 = w1 + (r1 + 1 )a1 c1 (t = 1) (41)a3 = w1 + (r1 + 1 )a2 c2 (t = 2) (42):::
at+1 = wt + (rt + 1 )at ct (for all t) (43)(40) (41) a1
c0
1 + r0 +c1
(1 + r0 )(1 + r1 ) +a2
(1 + r0 )(1 + r1 ) =w0
1 + r0 +w1
(1 + r0 )(1 + r1 ) + a0
() 2010/06/24 @ Gakushuin 71 / 78
(42)a2c0
1 + r0 +c1
(1 + r0 )(1 + r1 ) +c2
(1 + r0 )(1 + r1 )(1 + r2 )+
a3
(1 + r0 )(1 + r1 )(1 + r2 )=
w0
1 + r0 +w1
(1 + r0 )(1 + r1 )+
w2
(1 + r0 )(1 + r1 )(1 + r2 ) + a0:
t (43)1X
t=0
ctQtj=0(1 + r j )
+ limt!1
at+1Qtj=0(1 + r j )
= a0 +
1Xt=0
wtQtj=0(1 + r j )Qt
j=1 x j = x1 x2 xt
() 2010/06/24 @ Gakushuin 72 / 78
limt!1
at+1Qtj=0(1 + r j )
at (no Ponzi gamecondition)
limt!1
at+1Qtj=0(1 + r j )
= 0 (44)
() 2010/06/24 @ Gakushuin 73 / 78
u0(ct) = u0(ct+1)
nrt+1 + 1
o() 1
1 + rt+1 = u0(ct+1)u0(ct)
(45)limt!1
tu0(ct)at+1u0(c0)(1 + r0 ) = 0 (45)
u0(c0)(1 + r0 ) = 1 (intertemporal budget constraint)
1Xt=0
ctQtj=0(1 + r j )
= a0 +
1Xt=0
wtQtj=0(1 + r j )
: (46)
.
() 2010/06/24 @ Gakushuin 74 / 78
III.3 (Firm Problem(FP))
maxKt ;Lt
Ft(Kt; Lt) rtKt wtLt (47)Lt
maxkt
f (kt) rtkt wt (48)
kt
f 0(kt) = rt (49) wt
wt = f (kt) rtkt (50) () 2010/06/24 @ Gakushuin 75 / 78
III.4 (Competitive Equilibrium)
market clearingcondition
() 2010/06/24 @ Gakushuin 76 / 78
(allocation)ct; it; at+1; kt+1; yt (prices)wt; rt
.
..
1 wt; rtct, it, at+1
.
.
.
2 wt; rt kt
.
.
.
3 (market clearing)
I 1 1I at kt
.
.
.
4
ct + it = yt
() 2010/06/24 @ Gakushuin 77 / 78
F.O.C.s
u0(ct) = u0(ct+1)(1 + rt+1 ) (51)f 0(kt) = rt (52)wt = f (kt) rtkt (53)yt = f (kt) (54)ct + it = yt (55)it = kt+1 (1 )kt (56)k0 = k0: (57)
() 2010/06/24 @ Gakushuin 78 / 78
(steady state)(1/3)(shooting algorithm)
(Firm Problem (FP))(Competitive Equilibrium)