Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Nonlinear econometrics for finance

HOMEWORK 3

GMM, MLE and Volatility

The homework consists of three problems.  The first problem uses the same data you used in Homework 1 (housing data.xslx). You will estimate the paramaters of the linear regression model using the OLS estimator, the GMM estimator and the ML estimator.  The second problem uses the data ccapmmonthlydata.xls from Homework 2 and asks you to re-estimate the C-CAPM model with the GMM estimator, assuming that the data are not i.i.d. The third problem asks you to estimate a GARCH(1,1)-M model using the MLE and the data in SP500daily level.xlsx.

Instructions.

Please, provide 3 separate les with the Matlab codes for the three problems.  Make sure that the codes run properly.  Please prepare a pdf file with all the answers to the questions.  You can refer to the code (or some code lines) in this file when appropriate.  If you answer some questions by hand, please scan your answers and attach to the pdf. If you have a Matlab Live Script file, please export it into a .doc file or .pdf file.

 

Problem 1.  (30 points)

Consider the housing data housing data.xslx used in Homework  1.   We want to estimate the same linear model we estimate in Homework 1

yi  = xi β + εi

(1)

and the variables are

yi     =   log(pricei ),

xi     =   [1 x1i  x2i  x3i  x4i] = [1 agei  sizei  bedroomsi  bathroomsi],

β   =   [β0  β1  β2  β3  β4]T .

The model satisfies the usual assumptions

E(εi )   =   0,

V (εi ) = E(εi(2))   =   σ 2

and all observations are independent.

(2)

(3)

(4)

(5)

(6)

1.  (1 points) Estimate the model using the OLS estimator. Compute the parameter estimates and the standard errors.

2.  (2 points) Estimate the model using the GMM estimator.   Use the following theoretical moment conditions,

E(εi )   =   0,

E(xki εi )   =   0,    for k = 1, . . . , 4

(7)

(8)

In other words, the errors have mean zero, and all regressors are uncor- related with the errors. You can stack these conditions into a vector of moment conditions

┐'         ┌'0(0)┐'

'(')E(x2iεi ) '(')   =    '(')0 '(')                                (9)

''         ''0(0)''

Write the equations for the empirical moment conditions for this model. (HINT : substitute the expected value in (9) with a sample mean and notice that the error term is εi  = yi - xi β. In other words, rewrite the error as a function of data and parameters.)



3.  (2 points) Write a function in Matlab to evaluate the GMM criterion function for this model. What is the optimal weight matrix?  (HINT: we have N = 5 moment conditions and d = 5 parameters to estimate.)

 

4.  (5 points) Estimate the parameters and compute the standard errors using the GMM estimator.

 

5.  (5 points) Please derive the formulas for the estimator of the matrix Γ0 by hand, for this problem.  In other words, do not use the gradient function in Matlab to compute the derivatives.

 

6.  (5 points) stimate the model using the Maximum Likelihood Estimator (MLE). For this problem assume that the errors are iid and normally distributed

εi o(iid) N(0, σ2 )                                          (10)

and that the regressors xi  are predetermined, i.e.  not random.  Write a function in Matlab that computes the log-likelihood for this model. (HINT:  Use the fact that the  errors εi   = yi  - xi β  are normally dis- tributed to derive the likelihood function.  Be careful here, as you have to estimate the β’s and the value of the variance of the error term σ2 .)


7.  (5 points) Estimate the parameters and compute the standard errors for the MLE. Do not use the gradient function in Matlab to compute the standard errors.

 

8.  (5 points) Show in a table all your estimates (OLS, GMM, MLE), and corresponding standard errors.  Compare the results and discuss the differences among the estimators.

 

Problem 2.  (40 points)

Consider the C-CAPM model we studied in class.   You estimate the pa- rameters of this model in the second assignment.  Use the same data in the file ccapmmonthlydata.xls. For this estimation problem, assume that your data are not an i.i.d.  sample.



 

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. (HINT: you will have to estimate the optimal weight matrix using the HAC formula discussed in class. You can set the number of autocovariances as the greatest in- teger smaller or equal to k = 0.75 × T1/3, there T is the number of observations.  Or you can choose a different k as long as you justify it properly.)

 

3.  (10 points) Compute the standard errors for the estimates. When com- puting the matrix T , please compute the derivatives by hand and pro- vide the formulas. In other words, do not use the function gradient in Matlab to compute these values.

 

4.  (5 points) Interpret your estimation results in economic terms.  What do you learn about the representative investor?


5.  (5 points) Compare your estimates and standard errors to the esti- mates and standard error obtained in the second homework?  Is there any change? Why?

 

6.  (5 points) Test for over-identifying restrictions.

 

Problem 3.  (30 points)

Consider a GARCH(1,1)-M model (see slides of Lecture 6 for details on the model):

rt     =   βht + εt ,

εt     =   ′htut , with Et-1 (ut ) = 0 and Et-1 (ut(2)) = 1 ht     =   µ* + δ* ht-1 + φ* εt(2)-1 .

For this problem assume that the errors are normal.



1.  (15 points) Modify the code of the GARCH(1,1) model shown in class to estimate this model. Use the data in SP500daily level.xlsx. Com- pute both parameter estimates and standard errors.  Report them all in a table.

 

2.  (15 points) Plot the time series of conditional variances.  Do you see any interesting in some time periods?