Sei sulla pagina 1di 3

PhD in Economics

Computational Methods Applied to Economics


Problem Set 1

I - Matlab/Octave Introduction

1. Plot (in the same plot) the graphics of the function sin(x) and of its Taylor polynomial
approximation of degree 9
x3 x5 x7 x9
x− + − +
3! 5! 7! 9!
in the interval [0, 2π]. Save your figure as figure1.eps.

2. Recall that the spectral radius of a square matrix A is given by

ρ = max{|λ| : λ eigenvalue of A}.

Write a function spectral_radius to compute the spectral radius of a given square matrix.
Your function should start by checking if the matrix is square, giving an error message

>> error(’Matrix is not square’)

if this is not true.

II - Numerical Methods

1. The manager of a supermarket has to decide each day how much bread to buy. For every
bread that it is sold, there is a profit of 60 cents. However, for every one not sold, there is a
loss of 40 cents. The demand is uniformily distributed in the interval [80, 140]. How much
bread should the manager order, in order to maximize the profit? What if the demand
follows the Gamma distribution, with parameters k = 2 and θ = 55?

2. Let the demand for a good be defined as Q(p) = 0.5p−0.5 + 0.3p−0.2 . Plot the original
demand curve and Taylor approximations of degree one to three around x0 = 0.5. Make
four plots with distances of 0.1, 0.2, 0.5 and 1.5 around x0 .

1
Problem Set 1 – PhD in Economics

III - Dynare/RBC models

1. Consider the system of log-linearized equilibrium equations:

w t = y t − nt , (1)
rtK = yt − kt−1 , (2)
rt = (1 − β(1 − δ))rtK , (3)
kt = (1 − δ)kt−1 + δit , (4)
yt = at + αkt−1 + (1 − α)nt , (5)
I
yt = (1 − µ)ct + µit , µ = (6)
Y
wt = φnt + γct , (7)
 
1
ct = Et ct+1 − rt−1 , (8)
γ
at = zt , (9)
zt = ρzt−1 + t (10)

(a) Download the file “RBCModel.mod” from the attached folder and save it on your
computer. Next, type into the command window: dynare RBCModel. The program
will generate impulse response functions (IRFs) for the RBC model after a positive
technology shock and shows them in two figures:
• Figure 1 shows the IRFs for consumption, output, investment, capital, labor, real
wage, real interest rate, return on capital and technology.
• Figure 2 shows the shock process.
Interpret the IRFs.
(b) In the command window of Matlab you can find several statistics of the simulated
data. Find the correlation of output with the other variables.
(c) Change the value of ρ to zero. Type dynare RBCModel in the command window.
Interpret the results.

2. Consider a stochastic neoclassical growth model with leisure (see, for example, Cooley and
Prescott (1995)). A representative household’s problem is
∞ 1−τ
X cθt (1 − lt )1−θ
max E0 β t−1
{ct ,lt }∞
t=0
t=1
1−τ

subject to the resource constraint

ct + it = ezt ktα lt1−α (11)

the law of motion for capital


kt+1 = it + (1 − δ)kt (12)
and the stochastic process for productivity

zt = ρzt−1 + st (13)

2
Problem Set 1 – PhD in Economics

with t ∼ N (0, σ 2 ).
The system of equations characterizing an equilibrium is form by equations (11), (12) and
(13), the Euler intertemporal condition
1−τ " 1−τ #
cθt (1 − lt )1−θ cθt+1 (1 − lt+1 )1−θ
= βEt (1 + αezt ktα−1 ltα − δ) (14)
ct ct+1

and an optimality condition for supply of labor


1 − θ ct
= (1 − α)ezt ktα lt−α . (15)
θ 1 − lt
Use (11) and (12) to get
kt+1 = ezt ktα lt1−α − ct + (1 − δ)kt . (16)

An equilibrium is characterized by a system of four equations (13), (14), (15) and (16).

(a) Implement this model in Dynare. (For the calibrations of the related parameters, please
see, for example, Cooley and Prescott (1995).)
(b) The simulated data series for consumption are used to estimate some unknown param-
eters of the model. Suppose we would like to estimate the preference parameters θ and
τ , and the stochastic process for productivity, summarized by two parameters ρ and
σ. Conduct the estimation on Dynare.

Potrebbero piacerti anche