Nonlinear econometrics for finance HOMEWORK 3
GMM, MLE and Volatility
This homework consists of three problems.
• The first problem uses the same data as in Assignment 1 (housing data.xslx). You will estimate the parameters of the linear regression model using
Copyright By PowCoder代写 加微信 powcoder
the least-squares (LS) estimator (like in the first assignment), the GMM estimator and the ML estimator. This problem will show you that the
linear regression model can also be estimated by GMM and ML.
• ThesecondproblemusesthesamedataasinAssignment2andasksyou to re-estimate the C-CAPM model with the GMM estimator. There is only one difference between this problem and problem 2 in Assignment 2: we are not making the i.i.d. assumption. Therefore, we need to use the HAC Φ0.
• The third problem is about estimating an M-GARCH(1,1) model using ML.
Instructions. You should provide three Matlab codes, one per question. Please make sure that all codes can run properly. You should also provide a pdf file with written responses to the questions. Your pdf file should refer to the codes, when it is appropriate to do so. The pdf file should be brief (not more than 2 page long).
Problem 1. (45 points) Consider the housing data housing data.xslx used in Assignment 1. We want to estimate the same linear model as in Assignment 1:
yi =xiβ+εi, (1)
where the variables are
yi = log(pricei),
xi = [1 x1i x2i x3i x4i] = [1 agei sizei bedroomsi bathroomsi],
β = [β0β1β2β3β4]⊤,
with i = 1, …, n. The model satisfies the usual assumptions:
E(εi ) = 0, V(εi) = E(ε2i ) = σ2,
and all εis are independent.
1. (5 points) Estimate the model using the least-squares (LS) estimator as in Assignment 1. Compute the parameter estimates and the standard errors.
2. (15 points) Estimate, now, the model using GMM. In order to do so, note that, in the linear regression model, we can write
E(εi ) = 0,
E(xkiεi) = 0, for k = 1,…,4.
In other words, the errors are mean zero and all regressors are uncor- related with the errors. The same expected values can, of course, be stacked in a vector and written as follows
E x2iεi = 0.
x3i εi x4i εi
This is a set of 5 moment conditions. The empirical analogues to these moment conditions are
εi 1 n x1iεi
x2iεi = 0, n i=1 x3iεi
x4i εi or, equivalently, given Eq. (1),
yi−xiβ 1 n x1i(yi−xiβ)
x2i(yi − xiβ) = 0. n i=1 x3i(yi − xiβ)
x4i(yi − xiβ)
Notice that we now have 5 (empirical) moments (N = 5) and 5 pa- rameters (d = 5). Use these empirical moments to (1) write the GMM criterion in a Matlab function, (2) minimize the GMM criterion to find the GMM estimates and (3) find standard errors for the GMM esti- mates (Note: the derivatives in the matrix Γ0 should be computed manually, you should not use the gradient function in Matlab.)
3. (6 points) What is Φ0 for this model? What is Γ0 for this model?
4. (15 points) Estimate, now, the model by using the ML estimator. As-
sume the errors are iid and normally distributed, i.e.,
εi∼dN(0,σ2) ∀i.
Also, assume the regressors are pre-determined, i.e., not random.
Using the normality of the errors and the fact that the regressors are not random, (1) write the (standardized, log) likelihood in a Matlab function, (2) maximize the (standardized, log) likelihood to find the ML estimates and (3) find the standard errors of the ML estimates (Note 1: you have to estimate the 5 βs as well as the value of the variance of the error terms, i.e., σ2. Note 2: the variance of the ML estimates should be computed manually, you should not use the gradient function in Matlab.)
5. (4 points) Show in a table all of your estimates (LS, GMM, and ML), the corresponding standard errors, and the t−statistics. Compare the results and discuss the differences among the various estimators.
Problem 2. (35 points) Consider the C-CAPM model we studied in class. You estimated the parameters of this model in Assignment 2. This exercise is a very simple modification of what you have already done. You need to assume that your data are not i.i.d. and use the correct matrix Φ0.
The data is in the file ccapmmonthlydata.xls. Recall that they are monthly, not quarterly. Also, the file provides consumption growth ct+1 , not the levels
of consumption.
1. (5 points) Compute first-stage GMM estimates of the d model param-
eters using the weight matrix WT = IN .
2. (10 points) Second stage. Using the first-stage estimates, re-estimate the parameters using the optimal weight matrix based on the HAC ΦT . Set the number of auto-covariances equal to k = ⌊0.75 × T 1/3⌋, where ⌊x⌋ is the greatest integer smaller or equal to x and T is, of course, the number of observations.
3. (10 points) Compute the standard errors for the second-stage estimates using the HAC ΦT and the same k as earlier. (Note: Like in Assign- ment 2, the matrix ΓT should be computed by hand, you should not use the function gradient in Matlab).
4. (5 points) Compare your estimates and standard errors to the estimates and standard error obtained in the second assignment. Are there any changes? If so, why do you think that is?
5. (5 points) Test for over-identifying restrictions using, again, the correct HAC ΦT (with the same k as earlier).
Problem 3. (20 points) Estimate a GARCH(1,1)-M by ML:
rt =βht+εt,
εt = htut with Et−1(ut) = 0 and Et−1(u2t ) = 1,
ht = μ∗ + δ∗ht−1 + φ∗ε2t−1, Assume the errors are normal.
1. (15 points) Modify the code of the GARCH(1,1) model shown in class to estimate this model. Compute parameter estimates, standard errors, and t-statistics. Report them all in a table.
2. (5 points) Plot the time series of the conditional variances. Do you see any interesting event?
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com