You are on page 1of 7

Dynare/Matlab Project

International Macroeconomics
Johns Hopkins University
Thiago Ferreira

NOTE 1: “Handing in solutions to this project” involves scanning and emailing your
analytical solutions (to be written in directly in this handout), emailing me Matlab and
Dynare codes (i.e., .mod and .m files), and also emailing me a Word file (details follow
below) all in a single .zip file to tteixei5@jhu.edu. The project is due Tuesday, April 10th
at 6 pm; please allocate your time wisely (of course, you are welcome to send me your
solutions earlier). This project has a total of 100 points. Late projects will not be accepted
(except in the case of a reasonable excuse, such as, for instance, justified medical issues).

Please make sure to print your name. Any projects returned without a name and
signature will earn a grade of zero.

My name is:

Please sign here:

1
Consider two large open economies, home and foreign (foreign variables that need not
be equal to home variables are denoted by an asterisk. Each economy is inhabited by a
continuum of identical individuals grouped into an aggregate risk sharing household. In
each country there is also a representative final goods producing firm. International trade
occurs in this final good. Lifetime utility is given by:
1
X ⇢ 1
X ⇢
⌘ (1+⌘)/⌘ ⌘
U = Et t
ln Ct Nt ⇤
and U = Et t
ln Ct⇤ ⇤
(Nt⇤ )(1+⌘)/⌘ ,
t=0
1+⌘ t=0
1+⌘

where: Et is the expectation operator, 2 (0, 1) is the (constant) subjective discount factor,
C and C ⇤ denote consumption, > 0 and ⇤ > 0 are parameters, ⌘ > 0 is the Frisch
(marginal value of real wealth held constant) elasticity of labor supply, and N and N ⇤
denote labor.
Production in each country is determined by:

Yt = At ZNt↵ Kt1 ↵
and Yt⇤ = A⇤t Z ⇤ (Nt⇤ )↵ (Kt⇤ )1 ↵
,

where: A and A⇤ are stochastic technology processes; ↵ 2 (0, 1); K and K ⇤ denote capital;
and Z and Z ⇤ are scaling parameters. Furthermore:
" # " #" # " #
ln At ⇢ v⇤ ln At 1 "t
= + ,
ln A⇤t v ⇢⇤ ln A⇤t 1 "⇤t

where: ⇢, ⇢⇤ > 0; v, v ⇤ > 0; Et ("t ) = Et ("⇤t ) = 0; and the standard deviations of " and "⇤
are, respectively, " and "⇤ . In the preceding, all variables are normalized by the world
population, which consists of a unit mass. Also, the evolution of capital in each country is
given by:
Kt+1 = It + (1 ) Kt

and

Kt+1 = It⇤ + (1 ⇤
) Kt⇤ ,

where I and I ⇤ denote investment and and ⇤ are capital depreciation rates. Finally,
changing capital holdings involves a real adjustment cost of the form


(Kt+1 Kt ) 2
2

for the home country and


⇤ ⇤ 2
Kt+1 Kt⇤
2

2
for the foreign country, where  and ⇤ are positive parameters; this adjustment cost means
that the faster adjustments in the capital stock are the more expensive they are. Furthermore,
these costs are symmetric, so that reducing capital is as expensive as expanding it. The way
adjustment costs are written here, replacing depreciated capital does not generate adjustment
costs.
A benevolent world social planner solves the following problem:
1
X ⇢  
⌘ (1+⌘)/⌘ ⌘
max Et t
ln Ct N + (1 ) ln Ct⇤ ⇤
(N ⇤ )(1+⌘)/⌘ .
Ct ,Ct⇤ ,Nt ,Nt ,Kt+1 .Kt+1
⇤ ⇤
t=0
1+⌘ t 1+⌘ t

such that:


Ct + I t + (Kt+1 Kt ) 2 + G + N X t  Y t ,
2
⇤ 2
Ct⇤ + It⇤ + ⇤
Kt+1 Kt⇤ + G⇤ + N Xt⇤  Yt⇤ ,
2

Kt+1 = It + (1 ) Kt ,

Kt+1 = It⇤ + (1 ⇤
) Kt⇤ ,

Yt = At ZNt↵ Kt1 ↵
,
Yt⇤ = A⇤t Z ⇤ (Nt⇤ )↵ (Kt⇤ )1 ↵
.

Above, N X is defined as Yt Ct It 2 (Kt+1 Kt )2 G and N Xt⇤ is defined as Yt⇤


⇤ 2
Ct⇤ It⇤ 2 Kt+1 ⇤
Kt⇤ G⇤ . In addition, is the fraction of the world population that
lives in the home country. So, the benevolent world social planner is weighting the utility of
each country by their relative size in the world economy. Finally, G and G⇤ are exogenous
government consumption.

1.1) Set up the benevolent world social planner’s current value Lagrangian using one con-
straint, only, and using to denote the Lagrange multiplier. Please write your answer
below. (15 points total)

3
1.2) State the corresponding first-order conditions for consumption, labor, and capital.
Please write your answer below. (20 points total)

4
1.3) Using your answer to (1.2) write down the system of 14 equations in the 14 unknowns,
C, C ⇤ , N , N ⇤ , K, K ⇤ , I, I ⇤ , A, A⇤ , Y , Y ⇤ ,N X, N X ⇤ , that jointly solve the model (note:
in all cases you should substitute out the Lagrange multiplier and combine the first order
conditions as needed). Please write down your answer below. (15 points total)

5
1.5) Assume the following parameter values: = 0.5; ⌘ = 4; ↵ = 2/3; = 0.988; =

= 0.025; = 10.7863; ⇤ = 10.5256; G = 0.1017; G⇤ = 0.0760; Z = 1; Z ⇤ = 0.9283.
Of note, such that in steady state N = 1700/8760 (1700 is average hours worked in the
United States per year and 8760 is total hours available per year); ⇤ is such that in steady
state N ⇤ = 1200/8760 (1200 is average hours worked in the euro area per year); G is such
that in steady state G/Y = 0.175, which is the average ratio of government consumption
to output in the United States; G⇤ is such that G⇤ /Y ⇤ = 0.207, which is the average ratio
of government consumption to output in the euro area; and Z ⇤ is such that in steady state
C ⇤ /Y ⇤ = 0.76, which is the average ratio of private consumption to output in the euro area.
Also, assume that ⇢ = ⇢⇤ = 0.906; v = v ⇤ = 0.088; " = "⇤ = 0.00852;  = ⇤ = 0; and that
the contemporaneous correlation of the structural shocks is given by:

corr ("t , "⇤t ) = 0.258.

These parameter values are roughly consistent with the following steady state values:

Variable Rough Steady State Value


C 0.27896
C⇤ 0.27896
N 0.19406
N⇤ 0.13699
K 5.2167
K⇤ 3.2937
I 0.13042
I⇤ 0.082344
A 1
A⇤ 1
Y 0.58134
Y⇤ 0.36705
NX 0.070231
N X⇤ -0.070231

Given these steady state values, what is the intuition behind: C and C ⇤ being equal? K
and K ⇤ being di↵erent? I and I ⇤ being di↵erent? Y and Y ⇤ being di↵erent? N X and N X ⇤
being di↵erent? Please write down your answer below. (20 points total)

6
1.6) Given all of the information you have been provided with and/or arrived at generate
simulated data for all model variables for 500 periods and impulse response functions for
50 periods using Dynare’s stoch simul command. Then, use Matlab to generate a figure of
the impulse response function of US (the home country’s) output in percent deviations from
steady state given a 1 standard deviation orthogonalized shock to the euro area’s (the foreign
country’s) productivity. This figure must be generated using the actual relevant steady state
computed by Dynare. HINTS: 1) Remember that Dynare labels impulse response functions
as the variable name and then underscore the name that you gave to the shock; in this open
economy scenario, for each variable you will have its impulse response function to a shock
to domestic productivity and a shock to foreign productivity; 2) Generating the required
figure essentially amounts to implementing the same code associated with the figure in the
CONTROL.m file for the closed economy RBC model that we went over in class. Copy and
paste the figure in a Word file called ”IRF Figure” and send this figure along
with your Dynare and relevant Matlab codes to bepstei7@jhu.edu (30 points
total)

• Note: You must submit both your Dynare .mod code as well as the Matlab
.m code that you used for solving (1.6) as codes readable by Matlab (i.e., a
copy-and-paste version of your codes is not acceptable; what you send me
must be codes that I can run; if I cannot run your codes then I will take o↵
a substantial, if not all, of the 30 points that this last problem is worth).

You might also like