Macro2 HW2 Solution v1
Macro2 HW2 Solution v1
KOGANEMAEU Ryohei*
November 5, 2024
• Copying solutions of another group or other online/off-line materials rather than writing your own
solutions is considered plagiarism and warrants a penalty.
• Plagiarism includes the past years’ solution manuals of the class.
Q1. Value Function Iteration
Consider the neoclassical growth model studied in class. A social planner has an objective function
∞
max∞ ∑ βt ln ct
{ct ,k t+1 }t=0 t=0
∞
V (k0 ) = max∞ ∑ βt ln ( F(kt ) + (1 − δ)kt − kt+1 )
{ k t +1 } t =0 t = 0
s.t. 0 ⩽ k t +1 ⩽ F ( k t ) + (1 − δ ) k t
∞
( )
V (k0 ) = max ln ( F (k0 ) + (1 − δ)k0 − k1 ) + β max∞
k1
∑ βt ln ( F(kt ) + (1 − δ)kt − kt+1 )
{ k t +1 } t =1 t = 1
*A 2nd-year master students at the Graduate School of Economics, The University of Tokyo. Contact : [email protected]
1
Therefore, the recursive problem is given by
(b) Answer. The code and the results are as follows. The value function looks nice, but the policy function is
not smooth. This is because the grid size is too small to capture the optimal policy function.
2
(c) Answer. Let me skip the code because I just change Nk = 20. The results are as follows. The policy
function becomes better but is not still smooth. This is because the grid size remains to be small to
capture the optimal policy function.
(d) Answer. Using the interpolation within the VFI with the optimization, the code and the results are
as follows. The policy function becomes smooth and the value function is also well approximated.
You realize that the spline interpolation returns better approximation. When you see the process of
convergence, you will realize that the error goes down to small values with smaller iterations.
Listing 2: Bellman Equation with Interpolation
function v = BellmanEq(kprime,k0,v0,linear,Nk)
% parameters and capital grid
alpha = 0.3; beta = 0.6; kmin = 0.04; kmax = 0.2;
k = linspace(kmin,kmax,Nk);
% consumption
c = k0^alpha - kprime;
if c < 0
c = 0.00001;
end
% Interpolation
if linear == 1
v0_interp = griddedInterpolant(k,v0,'linear'); % linear interpolation
else
v0_interp = griddedInterpolant(k,v0,'spline'); % spline interpolation
end
% Bellman Equation
v = log(c) + beta*v0_interp(kprime);
if kprime < kmin
v = -1e+8;
elseif kprime > kmax
v = -1e+8;
end
v = -v;
end
3
Listing 3: VFI : Optimization and Interpolation with Nk
for iter = 1:maxiter
for i = 1:Nk
BE = @(kprime) BellmanEq(kprime,k(i),v0,1,Nk); % redefine given state value k(i)
[k_new(i,1), v_new(i,1)] = fminsearch(BE,0.04); % Optimization instead of Grid Search
end
v_new = -v_new;
diff = abs(max(v_new-v0));
disp(['Error is '])
disp(diff)
if diff < torr
disp(['Value Function Converged!, Iteration = '])
disp(iter)
break
end
iter = iter + 1;
v0 = v_new;
end
c = k.^alpha - k_new
4
Q2. Various Methods of Solving Bellman Equation
Consider the optimization problem of a representative agent whose preferences are given as
∞
∑ βt log ct
t =0
where α ∈ (0, 1) and k0 given. Consider the problem of a social planner who maximizes the utility of the
representative agent.
1
V (k) = C + log(y),
1 − αβ
where y ≡ Akα , using the following three methods: (i) Guess and verify, (ii) Value function iteration,
and (iii) Howard’s policy improvement algorithm (policy function iteration) (see below).
(b) Answer.
(i) Guess and Verify. Guess that the value function has the form
V (k ) = C + D ln( Akα )
αβD 1 αβD
max ln Akα − k′ + β(C + D ln A(k′ )α ) k′ =
=⇒ ′
= =⇒ Akα
0⩽k′ ⩽ Akα k Ak − k′
α 1 + αβD
Using this policy function, we have the identity determining the coefficients, C and D
α
α 1 α αβD α α
C + D ln Ak = ln Ak + βC + βD ln A ( Ak )
1 + αβD 1 + αβD
1 αβD
= βC + ln + αβD ln + βD ln A + (1 + αβD ) ln Akα
1 + αβD 1 + αβD
5
So we obtain the coefficient
1
D = 1 + αβD =⇒ D =
1 − αβ
1 αβD
C = βC + ln + αβD ln + βD ln A
1 + αβD 1 + αβD
t s t
k′ = αβAkα =⇒ k t = (αβA)∑s=0 α kα0
(ii) Value Function Iteration. For example, start with the initial guess, V (k ) = ln Akα , which is the period
utility if consumes all resources. Then, the RHS of the Bellman equation becomes
αβ
max ln Akα − k′ + β ln A(k′ )α k′(1) =
=⇒ Akα
k′ 1 + αβ
αβ(1 + αβ)
k′(2) = Akα , and V(2) (k ) = C(2) + (1 + αβ(1 + αβ)) ln Akα
1 + αβ(1 + αβ)
We can prove that the policy and value functions in any iterations have the same structures and come up
with the general form after n iterations
!
n
1
k′(n) = Akα , and V(n) (k ) = C(n) + 1 + ∑ (αβ) i
ln Akα
1 + 1/ ∑in=1 (αβ)i i =1
Since αβ ∈ (0, 1), they converge to the (true) policy and value functions as n → ∞.
1
k′ = αβAkα , and V (k) = C + ln Akα
1 − αβ
(iii) Howard’s Policy Improvement Algorithm. I will provide two ways of solving this problem by the
policy function iteration. First of all, let us follow the Hint, i.e., start with the initial guess, k′ = αβAkα .
Then, the value when operating forever with this policy is
∞ ∞
Vh0 (k0 ) = ∑ βt ln ( Akαt − αβAkαt ) = ∑ βt ln ((1 − αβ) Akαt ), where k t+1 = αβAkαt given k0
t =0 t =0
6
Using the logarithm property, the guessed value function is arranged as follows
∞
Vh0 (k0 ) = C + ∑ βt α ln (k t )
t =0
∞ ∞
= C + ∑ βt α ln (αβAkαt−1 ) = C ′ + ∑ βt α2 ln (k t−1 )
t =0 t =0
∞ ∞
= C ′ + ∑ βt α2 ln (αβAkαt−2 ) = C ′′ + ∑ βt α3 ln (k t−2 )
t =0 t =0
∞
= · · · = C + ∑ βt αt ln ( Akα0 )
t =0
1
=C+ ln ( Akα0 )
1 − αβ
k′ = αβAkα = h0 (k )
Hence, the policy and value function converges to the true policy and value functions, respectively.
∞
Vh j (k0 ) = ∑ βt u( Akαt − kt+1 ), where kt+1 = h j (kt ), k0 given
t =0
for each k.
iv. Iterate until the policy function converges, i.e. h j+1 = h j .
7
Q3. TVC, NPG and Euler Equation
Assume that the bond interest rate rt > 0 and β ∈ (0, 1). Consider an agent that has preferences
∞
∑ β t U ( c t ).
t =0
with the standard properties of U. The agent receives a constant endowment e > 0 in each period. In each
period he can trade a bond that delivers a unit of consumption goods in t + 1 at interest rate rt+1 . His
optimization is subject to the budget constraint
bt + 1
ct + = bt + e for all t, b0 given
1 + r t +1
t
1
lim
t→∞
∏ 1 + r τ bt ≥ 0
τ =1
(a) Answer. Substituting the flow budget constraint at t = 1 into the budget constraint at t = 0, we have
1 b2
c0 + c1 + − e = b0 + e
1 + r1 1 + r2
Define Q T = ∏tT=0 (1 + rt )−1 to be the discounting factor from t = 0 to T where r0 = 0. Repeating this
process, we can derive the life-time budget constraint (LTBC)
∞ ∞
∑ Qt ct + lim Qt bt = b0 + ∑ Qt e
t→∞
t =0 t =0
(b) Answer. Using the shadow value of holding the bond at t, the TVC is defined as
lim λt bt = 0
t→∞
Since λt corresponds to the Lagrange multiplier of the budget constraint at t, we can derive the TVC by
solving the Lagrange problem with the flow budget constraints
8
(c) Answer. Set the Lagrangian of the agent’s optimization problem as
∞ ∞ ∞
!
L= ∑ βt U (ct ) + µ b0 + ∑ Qt e − ∑ Qt ct
t =0 t =0 t =0
1
lim βt U ′ (ct )bt = lim βt−1 U ′ (ct−1 )bt = · · · = lim U ′ (c0 ) Qt bt = 0
t→∞ t→∞ 1 + rt t→∞
The last equation implies the NPG condition after showing U ′ (c0 ) ̸= 0. The standard Inada condition
guarantees that the marginal utility is bounded away from zero unless c0 → ∞. In addition, the LTBC
ensures that the agent cannot consume infinite amount of goods at period 0. Therefore, the NPG condition
is met with equality if the TVC and Euler equations are satisfied.
Comment. I was writing this solution manual when I made a mistake by giving the wrong TVC1
For me, this looks more intuitive than the correct TVC and came from the heuristic intuition accumulated
through my experience in deriving the TVC of the problem with the different flow budget
c t + bt + 1 = ( 1 + r t ) bt + e
Basically, these two formulation with different timing assumptions generate the exactly same Euler
equations and same equilibria at least qualitatively. However, the correct TVCs with them are different.
To derive the TVC, you need to go back to the definition of the TVC: limt→∞ λt bt = 0 with the shadow
value of the bond holding λt .
FYI, I will give you another equivalent definition of the TVC, which is often used in the dynamic
programming theory (See SLP, and AKMM in the syllabus). Reformulate the sequence problem
∞ ∞
bt + 1
max
{bt+1 ∈Γ(bt )}∞
∑ β t
U bt + e −
1 + r t +1
=: max
{bt+1 ∈Γ(bt )}∞
∑ β t G ( bt , bt + 1 )
t =0 t = 0 t =0 t = 0
∞
Then, under some regularity conditions, the sequence bt∗+1
t =0
satisfying the Euler equation and the
TVC maximizes the objective function
1 Even with this wrong TVC, we can “derive” the NPG condition.
9
Q4. Recursive Competitive Equilibrium
Consider the neoclassical growth model studied in class. The economy is populated by a large number of
identical households normalized to 1. Each household maximizes the lifetime discounted utility discussed
in the class. Each household has an initial capital stock k0 at t = 0 and one unit of time that can be allocated
to market work. Output is produced using capital and labor, according to a CRS production function F.
Output can be consumed or invested. δ ∈ [0, 1] denotes the depreciation rate. Household own the capital,
make the investment decision, and rent the capital to firms. Assume that households own the firms. The
utility function U and production function F satisfy the standard properties discussed in class. Rewriting
the production function as f ( x ) ≡ F ( x, 1) + (1 − δ) x. The government taxes households’ investment at
the constant rate τ ∈ [0, 1]. The government returns all the tax revenues to the households as a lump-sum
transfer, denoted as T. We focus on recursive competitive equilibrium (RCE) in this question.
(a) Write down the recursive problem of the households. Carefully distinguish between aggregate and
individual state variables.
(b) Define a recursive competitive equilibrium (RCE).
(c) Write down the law of motion for the aggregate capital stock (i.e. a dynamic equation that the
aggregate capital stock follows) in this economy.
(d) Describe the steady-state equilibrium value of the aggregate capital stock K ∗ in this economy.
(e) Now assume a Cobb-Douglas production function, F (K, N ) = AK α N 1−α , α ∈ (0, 1), and provide a
closed-form solution for the aggregate capital stock K ∗ . What is the marginal effect of a rise in the
tax on investment?
(a) Answer. Choose the price of consumption good at each period as numeraire. Since labor is inelastically
supplied, the flow budget constraint of the representative household is given by
ct + (1 + τ )it = wt + rt k t + Tt
where we omit the dividend as it reduces to zero in the competitive equilibrium and does not affect the
household behavior. The capital stock follows the law of motion
k t +1 = ( 1 − δ ) k t + i t
where we include the depreciation in this way because the household owns the capital. Remember that
the rental price of the capital and the wage rate are determined in the factor price markets. Therefore, they
depend on the aggregate state variables, Kt and Lt although Lt = 1 over time. Therefore, the recursive
problem of the households is written as : given w(K ), r (K ), T (K ), and H (K )
10
(b) Answer. Since the capital is owned by the household, the firm’s problem reduces to a static one.
max { F (Kt , Nt ) − rt Kt − wt Nt }
Kt ,Nt
rt = FK (Kt , Nt ), wt = FN (Kt , Nt )
Definition (Recursive Competitive Equilibrium). The recursive competitive equilibrium is defined as the
set of price functions r (K ), w(K ), the aggregate law of motion H (K ), the value and policy functions of the
representative household V (k, K ), C (k, K ), K ′ (k, K ), and the tax transfer function T (K ) such that
i. Given functions r (K ), w(K ), T (K ), H (K ), the household’s value function V (k, K ) solves the recursive
problem with the policy function C (k, K ), K ′ (k, K ). (C (k, K ) is calculate from the BC and K ′ (k, K ))
iii. The aggregate law of motion H (K ) is consistent with the individual law of motion
H (K ) = K ′ (K, K ) ∀K
C (K, K ) + K ′ (K, K ) = f (K )
T (K ) = τ (K ′ (K, K ) − (1 − δ)K )
(c) Answer. Solving the household’s problem gives the Euler equation
Since the consumption policy function satisfies the Euler equation, we can write it as
3 Fundamentally, N = 1 can be substituted into the price functions as the market clearing condition. Therefore, the firm’s f.o.c.s
t
must be r̂ (K, N ) = FK (K, N ), ŵ(K, N ) = FN (K, N ) and it is more rigorous to define r (K ) = r̂ (K, 1), w(K ) = ŵ(K, 1).
11
As we assume the representative household, this represents the intertemporal behavior of the aggregate
consumption given K and thus adding market clearing condition yields
This pins down the law of motion of the aggregate capital H (K ) = K ′ (K, K ).
(d) Answer. The steady state level of aggregate capital stock satisfies
(1 + τ )U ′ ( f (K ∗ ) − K ∗ ) = β[ FK (K ∗ , 1) + (1 + τ )(1 − δ)]U ′ ( f (K ∗ ) − K ∗ )
=⇒ 1 + τ = β[ FK (K ∗ , 1) + (1 + τ )(1 − δ)]
where we exploited the assumption U ′ > 0. Therefore, under the standard assumption on the production
function, the steady-state equilibrium value of the aggregate capital stock is given by
(e) Answer. With the Cobb-Douglas production function, the rental price function satisfies
Hence, the steady-state equilibrium value of the aggregate capital stock is derived as
1−1 α
∗ βαA
K =
(1 + τ )(1 − β(1 − δ))
The aggregate steady-state investment level is can be calculated as a function of the tax rate τ
I ∗ = K ∗ − (1 − δ)K ∗ = δK ∗ (τ )
Comment. You are very likely to be deducted points when solving the problem asking to define the RCE.
Please be sufficiently familiar with the definition of the RCE.
12
Q5. Planner’s Problem and Stationarization
Consider a social planner’s problem in a neoclassical growth model studied in class. The population of
identical agents is denoted by Nt , which grows at rate n per period. Normalize N0 = 1 and we have
Nt = (1 + n)t .
The initial stock of capital is K0 and each agent supplies one unit of productive time to market work in
each period. Output is produced according to the CRS production function, Yt = F (Kt , Lt ). F satisfies the
standard assumptions.
Assume labor-augmenting technology, which grows at rate g per period, Lt = Nt (1 + g)t . Assume that
parameter values are such that β(1 + g)1−σ < 1.
The representative agent’s preferences are given as
∞
c1t −σ
u(ct ) = ∑ βt 1−σ
.
t =0
Write down the aggregate resource constraint of a planner in time t. Next, express all the variables in the
resource constraint in growth-adjusted stationary per-capita terms. Finally, set up the growth-adjusted
problem of the social planner and derive the Euler equation of the social planner’s problem.
Answer. To be consistent with the lecture note, assume that the utility function represents the per-capita
utility of the representative household and ct is the per-capita consumption at time t. Since labor is
inelastically supplied, the aggregate resource constraint of a planner in time t is given by
To express all the variables in the resource constraint in growth-adjusted stationary per-capita terms, we
need to divide the equation by Lt
ct Nt K L F ( Kt , L t ) Kt
+ t +1 t +1 = + (1 − δ )
Lt L t +1 L t Lt Lt
Defining k̃ t = Kt /Lt , c̃t = ct Nt /Lt , and f (k̃ t ) = F (k̃ t , 1)4 , we write the normalized resource constraint
∞
c̃t
max ∞ ∑ β̃t
{c̃t ,k̃t+1 }t=0 t=0 1 − σ
s.t. c̃t + k̃ t+1 (1 + g)(1 + n) = f (k̃ t ) + (1 − δ)k̃ t ∀t
4We exploited the constant returns to scale assumption of F.
13
where β̃ = β(1 + g). Set the Lagrangian of the social planner’s problem as
∞
( )
c̃1−σ
∑ β̃t t
L= + λt f (k̃ t ) + (1 − δ)k̃ t − c̃t − k̃ t+1 (1 + g)(1 + n)
t =0 1−σ
The f.o.c. are given by (Under the standard assumptions, we can ensure the interior solution)
β̃t c−
t
σ
= λt , β̃t+1 c− σ
t +1 = λ t +1 , λt (1 + g)(1 + n) = λt+1 [ f ′ (k̃ t+1 ) + (1 − δ)]
Combining these conditions, we can derive the Euler equation of the social planner’s problem
c̃−
t
σ
= β̃(1 + g)−σ (1 + n)−σ [ f ′ (k̃ t+1 ) + (1 − δ)]c̃− σ
t +1
Comment. Check whether a variable defined in aggregate terms, per-capita terms, or growth-adjusted
terms. This is crucial to avoid confusion in the stationarization process.
Denoting the today’s utility part to be G (k̃, k̃′ ), the envelope theorem states that
where G is a general period return function defined in comment part in Q.3. Therefore, the Euler equation
of the social planner’s problem is
14
Q6. Calibration
Output is produced according to the CRS function Yt = Ktα ( Zt Lt )1−α , where Zt represents labor-
augmenting technology, and Kt and Lt denote aggregate capital and aggregate labor, respectively. Suppose
that per-capita labor grows at 1% annually, and per-capita output at 3%. What is the growth rate of
productivity Zt along the balanced growth path? Assume that α = 0.4.
Answer. To begin with, decompose the growth rate using the production function
α 1− α
Yt+1 K t +1 Zt+1 Lt+1
=
Yt Kt Zt Lt
Denote the net growth rates of Yt , Kt , Zt , and Lt as gY , gK , gZ , and g L , respectively. Then, the above
equation can be rewritten as
1 + gY = (1 + gZ )1−α (1 + gK )α (1 + g L )1−α
Along the balanced growth path, the capital-output ratio is constant and the growth rate of capital is
equal to the growth rate of output. Hence, the above equation implies
Since the growth rate of a per-capita variable is calculated as 1 + gx = ( Xt+1 /Nt+1 )/( Xt /Nt ) = (1 +
gX )/(1 + g N ) where Nt is the population in general, the growth rate of productivity, Zt , is written as
1 + gY 1 + gy
1 + gZ = =
1 + gL 1 + gℓ
where the small variables represent per-capita terms. Therefore, we obtain the gross growth rate of
productivity
1 + gy 1.03
1 + gZ = = ≈ 1.02
1 + gℓ 1.01
which implies the net growth rate of productivity is inferred to be about 1.98%.
Comment. All you need to do in this problem is just to use the growth decomposition and follow the
definition of balanced growth. In the exams, however, a more complicated problem will possibly show
up, such as introducing the depreciation rate or asking to derive α using a given interest rate. Please be
familiar with the balanced growth definition by reviewing Lecture Notes 1 and 3.
15