Nonlinear econometrics for finance
HOMEWORK 3
(GMM and MLE)
Problem 1: CCAPM and GMM (30 points)
Consider, as we did in class, a representative investor who lives for two peri-
ods (t and t+ 1) and has income et in period t and et+1 in period t+ 1. The
utility function of the representative investor is:
U(ct, ct+1) = u(ct) + βEt[u(ct+1)].
The investor can invest in an asset by buying ϑ shares at the unit price
pt. The asset’s payoff xt+1 in the second period is uncertain. The investor
chooses how many units (ϑ) of the asset to buy in order to maximize her/his
utility function:
max
ϑ
u(ct) + βEt[u(ct+1)],
subject to the income/wealth constraints
ct = et − ϑpt,
ct+1 = et+1 + ϑxt+1.
(1) (2 points) Assume the investor has a CRRA utility (like in class):
u(ct) =
c
1−γ
t
1− γ
.
Derive the economy’s pricing equations both in terms of prices and in
terms of returns. The return equation will give you estimable moment
conditions.
1
Use the same data that we used in class. Let d be the number of parame-
ters to estimate and let N be the number of assets. Modify (only when a
modification is needed, of course) the GMM code to address the following
questions.
(2) (3 points) Estimation. Compute first-stage GMM estimates of the d
model parameters using the weight matrix WT = IN .
(3) (5 points) Estimation. Second stage. Using the first-stage estimates,
re-estimate the parameters using the optimal weight matrix. The opti-
mal weight matrix should be HAC with a number of auto-covariances
(forward and backward) equal to 4.
(4) (5 points) Inference. Compute the asymptotic variance of the GMM
estimates. Please note:
(a) The matrix Γ0 should be estimated without numerical differenti-
ation. In other words, you should compute the gradient by hand
(like we have done for MLE).
(b) The matrix Φ0 should be HAC, like before, with a number of
auto-covariances (forward and backward) equal to 4.
(5) (3 points) Inference. Test whether γ = 0.8.
(6) (5 points) Inference. Test whether γ = 0.8 and β = 0.9 jointly.
(7) (2 points) Interpret your results in economic terms. What do you learn
about the representative investor?
(8) (5 points) Inference. Test for over-identifying restrictions.
Problem 2: MLE (25 Points)
Consider a sample (x1, x2, …, xN) of Bernoulli random variables withN obser-
vations. As you know from your statistics classes, these are random variables
which take on the value 1 with probability p and the value 0 with probability
1− p.
2
(1) (3 points) Explain briefly why the joint probability of the sample can
be written as follows:
L({x}, p) =
N∏
i=1
pxi(1− p)(1−xi)
.
(2) (3 points) Use the joint probability to compute the standardized (by
N) log likelihood.
(3) (3 points) Compute the first derivative (with respect to p) of the stan-
dardized log likelihood.
(4) (5 points) Use the result in Point (3) to provide (i) an MLE estimator
of the probability p and (ii) the asymptotic variance of the estimator.
Interpret your results in words.
(5) (11 points) Write a short Matlab code which simulates 1000 Bernoulli
observations with p = 0.2 and computes an MLE estimate of p along
with standard errors and t-statistics. (Hint: if you use the structure of
the MLE − normal − iid− code, writing the code should be very easy
and quick. Your Bernoulli code should just be a simpler version of that
code in which you simulate from a Bernoulli random variable – which
has only one parameter – rather than from a normal random variable –
which has, instead, 2 parameters.)
Problem 3: MLE for GARCH-M (15 Points)
Modify the GARCH code to estimate a GARCH-M model. You only need
to arrive at estimates and t−statistics.
3