RDP 201308: International Business Cycles with Complete Markets Appendix B: Solving the Model
June 2013 – ISSN 13207229 (Print), ISSN 14485109 (Online)
 Download the Paper 736KB
B.1 The Optimality Conditions
An equilibrium allocation in this economy can be computed as the solution to a social planner's problem. Taking the initial conditions as given, the planner chooses statecontingent plans for each agent j ϵ J = {1,2} to maximise the expected discounted sum of their weighted utilities
subject to the law of motion for capital
the law of motion for habits
as well as the global resource constraint
The Lagrangian associated with the planner's problem is given by
where and are the statecontingent paths of Lagrange multipliers associated with constraints in Equations (B2), (B3), and (B4). Equating the gradient of the Lagrangian to zero we obtain
where u_{1} (·) is the partial derivative of u with respect to its first argument. We use the same notation to denote the other partial derivatives.
The intertemporal conditions given by Equations (B8) and (B9) can be rearranged as
and
By denoting , and we can rewrite Equations (B10) and (B11) as
and
In a similar way, Equations (B5) and (B7) can be rewritten as
and
Let Λ_{j} (s^{t}) denote the marginal utility of consumption of agent j after history s^{t}. Then from Equations (B12) and (B13) it follows that
where π (s_{t+1}  s^{t}) denotes the conditional probability of s_{t+1} given s^{t}, and π (s^{t}  s^{t}) = 1.
Let R_{j} (s^{t},s_{t+1}) denote the realised oneperiod gross rate of return on capital in country j after realisation of history (s^{t},s_{t+1})
Then the first order conditions can be reformulated as
for j ϵ J.
B.2 Optimality Conditions with the Functional Forms
The instantaneous utility function takes the form
The production function is
The capital adjustment cost function is
where the restrictions that ϕ′ (δ) = 1 and ϕ (δ) = δ require that a_{1} = δ^{1/ξ} and . Symmetry between the two economies implies that ω_{1} = ω_{2}. Incorporating specific functional forms, the optimality conditions can be rewritten as
B.3 Parameter Values for the Benchmark Model
Productivity follows a process similar to that specified by Kehoe and Perri (2002):
The innovations to the productivity process are zero mean serially independent bivariate normal random variables with the contemporaneous covariance matrix
Standard/estimated values are as follows:
 Capital income share α = 0.36 and coefficient of relative risk aversion σ = 2, as in Kehoe and Perri (2002)
 Elasticity of labour supply 1/η = 1.43, that is, η = 1/1.43 = 0.6993, as in Correia et al (1995)
 Intensity of habits b = 0.73, as in Jermann (1998).
The calibration targets are: n_{ss} = 1/3;i_{ss}/y_{ss} = 0.25;k_{ss}/y_{ss} = 10. The calibrated parameters are as follows:
 Depreciation rate: δ = i_{ss}/k_{ss} = (i_{ss}/y_{ss})/(k_{ss}/y_{ss}) = 0.025
 Discount factor: β = (α (y_{ss}/k_{ss})+1−δ)^{−1} = (0.36−0.1+1−0.025)^{−1} = 0.989

From it follows that

From the labour supply equation in the nonstochastic steady state , it follows that the weight of labour in the utility function χ is:
The other steadystate values are as follows:
B.4 The Numerical Procedure
The model is solved using a variant of the ergodic set methods described by Maliar, Maliar and Judd (2011). The algorithm we use is classified by Judd, Maliar and Maliar (2009) as belonging to the stochastic simulation class of methods. The approach is to replace conditional expectations with smooth parametric approximation functions of the current state variables and a vector of parameters, and then iterate on the parameter values until a rational expectations equilibrium is achieved. The four conditional expectations are parameterised as follows
where x_{t} = [k_{1t},k_{2t},c_{1t−1},c_{2t−1},z_{1t},z_{2t}]. From the first order condition for consumption in the home country we have
Rearranging yields
From the first order condition for labour in the country 1
it follows that
From the risksharing condition:
we obtain
and from the country 2 supply equation we get
Current consumption in each country is therefore given by:
Labour in each country is given by
The algorithm is implemented as follows:^{[6]}
 Obtain an initial guess for ω = [ω_{1},ω_{2},ω_{3},ω_{4}]. We obtain the initial guess using the genetic algorithm and then homotopy. Fix k_{j0} = k_{ss}, h_{j0} = c_{ss} and z_{j0} = 1 for j ϵ J, and draw a sample of size T of the exogenous stochastic shock .
 Replace the conditional expectations with the parameterised functions Ψ(ω_{r};x_{t}), r = 1…4. Calculate using Equations (B18), (B19), (B20) and (B21), and the law of motion for habits, Equation (B3). Calculate using the production function, the law of motion for capital given in Equation (B2) and the global resource constraint, Equation (B4). Similarly compute .

Set
and minimise the sum of squared residuals for the equation where is the regression error. That is, find
where ζ, is the parameter vector to be estimated.
 Iterating on w_{r}, find the fixed point . Update w_{r} using the algorithm given.
Footnote
Further details on this class of algorithm are provided by den Haan and Marcet (1990). For a more formal description and related proofs, see Marcet and Marshall (1994). [6]