next up previous
Next: About this document

Spring 1997 John Rust
Economics 551b 37 Hillhouse, Rm. 27

MIDTERM EXAM

(Due: March 31, 1997)

QUESTION 1 The zero-beta version of the CAPM (capital asset pricing model) implies the following equation for security returns:

displaymath164

where tex2html_wrap_inline166 is the realized return on security i at time t, tex2html_wrap_inline172 is the return on the market portfolio at time t, tex2html_wrap_inline176 is the expected return on a zero-beta portfolio, and tex2html_wrap_inline178 is an error term reflecting idiosyncratic risks satisfying the condition tex2html_wrap_inline180 . Assume that security returns are serially independent, but contemporaneously correlated with tex2html_wrap_inline182 covariance matrix tex2html_wrap_inline184 , i.e.

displaymath186

where tex2html_wrap_inline188 (note that serial independence implies that tex2html_wrap_inline190 if tex2html_wrap_inline192 ). Suppose we estimate the parameters of the K regression equations

displaymath196

so that the full vector of parameters is tex2html_wrap_inline198 where tex2html_wrap_inline184 is the tex2html_wrap_inline182 contemporaneous covariance matrix, tex2html_wrap_inline204 is the tex2html_wrap_inline206 vector of intercepts, and tex2html_wrap_inline208 is the tex2html_wrap_inline206 vector of slope coefficients.

1.
What testable restrictions does the Zero Beta CAPM place on the tex2html_wrap_inline204 and tex2html_wrap_inline208 parameters?

2.
Derive an efficient unbiased estimator for tex2html_wrap_inline216 .

3.
Describe how to estimate tex2html_wrap_inline184 .

4.
Using daily stock return data on the 63 securities available via anonymous ftp to gemini.econ.yale.edu and cd to the subdirectory

displaymath220

and say binary and get stockdat.dat and get stockdat.dht to transfer the Gauss data file stockdat.dat containing the stock return data (a tex2html_wrap_inline222 matrix for the 63 securities and two market return indices, EQLAV and VALAV) and its associated header file stockdat.dht (containing the names of the securities in each column of stockdat.dat). Load the data into gauss using the commands open f1=stockdat and dat=readr(f1,rowsf(f1)) and put the names of the securities (in 1 to 1 correspondence with the columns of dat) in the vector stocknms using the Gauss command stocknms=getname("stockdat"). (Note: if you are using Gauss on a Unix system, you must first convert the stockdat.dat and stockdat.dht files to Unix format. Do this by issuing the command transdat stockdat.dat). Now compute estimates of tex2html_wrap_inline216 using the methods you described in parts 2 and 3 above.

5.
Suppose you are a Bayesian with independent prior beliefs about the tex2html_wrap_inline226 parameter vector tex2html_wrap_inline228 and the tex2html_wrap_inline230 covariance matrix tex2html_wrap_inline184 . Suppose your prior beliefs about tex2html_wrap_inline228 are given by N(e,I) where I is a tex2html_wrap_inline240 identity matrix and e is a tex2html_wrap_inline226 vector with the first 63 components equal to 0's (corresponding to an prior expectation of 0 for all the tex2html_wrap_inline204 's) and the remaining 63 components equal to 1's (corresponding to a prior expectation that all tex2html_wrap_inline208 's are 1). Let the prior for tex2html_wrap_inline262 be given by tex2html_wrap_inline264 , a Wishart distribution with degrees of freedom tex2html_wrap_inline266 and parameter matrix tex2html_wrap_inline268 , where I is the tex2html_wrap_inline230 identity matrix. Use Gibbs sampling techniques to compute the posterior means and standard deviations of tex2html_wrap_inline216 using these prior beliefs.

QUESTION 2 Let tex2html_wrap_inline276 be IID draws from a multinomial distribution with density

displaymath278

where tex2html_wrap_inline280 , the K-1-dimensional simplex (i.e. the set of tex2html_wrap_inline284 satisfying tex2html_wrap_inline286 and tex2html_wrap_inline288 ).

1.
Derive the maximum likelihood estimator for tex2html_wrap_inline290 .

2.
Is the maximum likelihood estimator biased or unbiased?

3.
Derive the covariance matrix for tex2html_wrap_inline290 .

4.
Derive the information matrix.

5.
Is the maximum likelihood estimator efficient? If not, find a more efficient estimator for tex2html_wrap_inline290 .

6.
Suppose you were a Bayesian with a Dirichlet prior distribution for tex2html_wrap_inline290 with hyperparameters tex2html_wrap_inline298 (i.e. we restrict tex2html_wrap_inline300 for tex2html_wrap_inline302 ). If K=4 and tex2html_wrap_inline306 and tex2html_wrap_inline308 , compute the prior probability that tex2html_wrap_inline290 lies in the set tex2html_wrap_inline312 , where tex2html_wrap_inline312 is a ball of radius ..01 about tex2html_wrap_inline318 . Then generate 1000 random draws tex2html_wrap_inline322 from the multinomial distribution with parameter tex2html_wrap_inline318 and compute the posterior probability that tex2html_wrap_inline290 lies in tex2html_wrap_inline312 , using A/R simulation methods if necessary. Finally compare this posterior probability with the probability computed from the normal approximation to the posterior density discussed in class.

7.
Suppose we re-parameterized the model by the tex2html_wrap_inline206 vector of parameters tex2html_wrap_inline332 writing tex2html_wrap_inline334 , where tex2html_wrap_inline336 is defined by the multinomial logit formula:

displaymath338

7.
What is the relationship between the MLE for tex2html_wrap_inline290 and the MLE for tex2html_wrap_inline332 ? Is the MLE for tex2html_wrap_inline332 unbiased? Compute the information matrix for the MLE of tex2html_wrap_inline332 . Is the MLE efficient?

Hint 1: In parts 2 and 3 you might find the following matrix result useful: let the tex2html_wrap_inline348 matrix tex2html_wrap_inline184 be given by:

displaymath352

where the tex2html_wrap_inline354 are positive numbers satisfying

displaymath356

Then verify the tex2html_wrap_inline184 is invertible with inverse given by:

displaymath360

Hint 2: In part 6 you are required to compute the posterior probability of being within a ball of radius .01 about tex2html_wrap_inline318 . I suggest computing this probability by monte carlo simulations, drawing say 10,000 draws from the Dirichlet posterior and computing the fraction that lie in the ball of radius .01 about tex2html_wrap_inline318 . How do you draw from a Dirichlet distribution? Use the following result:

Lemma: Let tex2html_wrap_inline370 be independent random variables, where each tex2html_wrap_inline372 has a gamma distribution with parameter tex2html_wrap_inline374 . Then the random vector tex2html_wrap_inline376 has a Dirichlet distribution with parameter tex2html_wrap_inline378 where each tex2html_wrap_inline380 is defined by:

displaymath382

How do you draw from a Gamma distribution with parameters tex2html_wrap_inline216 ? Use the fact that when tex2html_wrap_inline204 is an integer, the Gamma distribution with parameters tex2html_wrap_inline216 has the representation as the sum of tex2html_wrap_inline204 IID exponentials with parameter tex2html_wrap_inline208 , i.e.

displaymath394

where tex2html_wrap_inline396 are IID exponentials with density tex2html_wrap_inline398 , tex2html_wrap_inline400 , tex2html_wrap_inline402 . Note that given the prior hyperparameters tex2html_wrap_inline204 in this problem, both the prior and posterior tex2html_wrap_inline204 hyperparameters will always be integers, making it easy for you to simulate from a Gamma an therefore from a Dirichlet.

QUESTION 3: Prove that if tex2html_wrap_inline408 with probability 1, H continuous, then if tex2html_wrap_inline412 with probability 1, then tex2html_wrap_inline414 with probability 1.

QUESTION 4. Access simulated data from a trinomial choice model with latent utilities tex2html_wrap_inline416 given by

displaymath418

available via anonymous ftp at gemini.econ.yale.edu. Use the cd command to go to pub/John_Rust and then cd again to the subdirectory course/econ551/dat and use the get command to retrieve the files data1.asc and data2.asc. These files contain ASCII data sets consisting of three columns, where the first column is an indicator of the chosen alternative and the remaining columns are the x covariates.

A.
Estimate the unknown tex2html_wrap_inline422 vector tex2html_wrap_inline290 by logit maximum likelihood using the first 1500 observations of both data sets. Note that tex2html_wrap_inline426 consists of two tex2html_wrap_inline428 vectors affecting choice of alternatives 2 and 3 in equation (6) and tex2html_wrap_inline434 is normalized to a tex2html_wrap_inline428 vector of zeros. Note also that in addition to the two columns in x there is a third component representing the constant term. Thus, tex2html_wrap_inline440 is the constant term for alternative 2, tex2html_wrap_inline444 is the first slope coefficient for alternative 3, etc. Use the estimated model to compare predicted versus actual outcomes in rows 1501 to 2000 of the data set. Can you think of some sort of a ``pseudo tex2html_wrap_inline446 '' measure or any simple way of summarizing how well the estimated choice model predicts actual outcomes? (Hint: Some Gauss code for estimating logit models via maximum likelihood is available on the econ551 Web page.)

B.
Retrieve data2.asc. This contains data for a binomial choice model. Compute the probit maximum likelihood estimates of tex2html_wrap_inline290 (now a tex2html_wrap_inline428 vector - the intercept and two slop terms for alternative 2 since the coefficients for alternative 1 have been normalized to zero) and the identified terms of the tex2html_wrap_inline452 matrix of tex2html_wrap_inline184 , the covariance matrix of tex2html_wrap_inline456 . Compute binary logit estimates using the same data set. Which model, the probit or logit, does a better job of predicting the observations in rows 1501 to 2000 of this data set? Which of the two models, logit or probit, do you think was used as the true data generating process for this problem?

C.
(OPTIONAL EXTRA CREDIT QUESTION) Retreive data3.asc. This contains data for a trinomial probit model. Unlike the binomial probit model, numerical integration is required to compute the likelihood function. However a Bayesian approach using Gibbs sampling is feasible using the data augmentation methods outlined in the Rossi and McCulloch Journal of Econometrics paper. Specify a Wishart prior for the inverse covariance matrix of the probit error terms and a normal prior for the tex2html_wrap_inline290 coefficients in the utility function and compute posterior means of these quantities by Gibbs sampling. Students who do this question will received substantial extra credit, but nobody will be penalized for not doing this part.

Hints: Load the data sets data1.asc and data2.asc by anonymous ftp following the same instructions as above, but cd /pub/John_Rust/courses/econ551/dat and get data1.asc and get data2.asc (there is no need to switch to binary mode since these two data sets are in ASCII format). You will use data1.asc to estimate a trinomial logit model with 6 unknown alternative-specific coefficients by maximum likelihood.

To compute the maximum likelihood estimates you first need to write down the likelihood function and derivatives. Only first derivatives are required if you use BHHH but second derivatives are required if you use Newton's method. There are two ways to write down these formulae: 1) write down formulae that are specific to the case at hand, 2) write down formulae that will be useful for estimating any type of multinomial logit model with any number of alternatives.

1.
Alternative-specific trinomial code: You will need to write a procedure EVALMNL1.G that codes the likelihood and first and second derivatives of the trinomial logit model with alternative-specific coefficients. This procedure will then be passed in the setup program that reads in the data and runs the main maximization procedure, MAX.G. Partition the unknown tex2html_wrap_inline422 parameter vector tex2html_wrap_inline290 into two components, tex2html_wrap_inline464 where tex2html_wrap_inline466 is the tex2html_wrap_inline428 parameter vector for alternative 2 and tex2html_wrap_inline470 is the tex2html_wrap_inline428 parameter vector for alternative 3 with tex2html_wrap_inline474 normalized to 0 since it is unidentified. Next write down the log-likelihood function for this model as follows:

eqnarray123

2.
General multinomial logit code: you can write a general multinomial logit procedure EVALMNL.G that codes the likelihood and first and second derivatives for a general multinomial logit model with fixed coefficients and alternative-specific covariates. This procedure is then passed in the setup program that reads in the data and runs the main maximization procedure, MAX.G. This code will estimate an arbitrary MNL model with an arbitrary number of alternatives. The general model has a covariate vector tex2html_wrap_inline476 which is alternative-specific (with tex2html_wrap_inline478 being the covariate vector for alternative j) and the parameter vector tex2html_wrap_inline290 is not alternative-specific. The likelihood function for the general MNL model has the following form:

displaymath484

You can ``trick'' the general MNL code into estimating the alternative-specific trinomial model of this assignment by defining an tex2html_wrap_inline486 covariate vector tex2html_wrap_inline488 as follows:

eqnarray130

where tex2html_wrap_inline490 is the original non-alternative-specific covariate vector (dependence on observation i, tex2html_wrap_inline494 is supressed for clarity). It is straightforward to verify that when the alternative-specific covariate vector tex2html_wrap_inline496 defined above is substituted into the general formula for the MNL log-likelihood we obtain the special case for the trinomial logit model with alternative-specific coefficients. We now complete the assignment by specifying the first and second derivatives of the log-likelihood function. We will do this for both the alternative-specific and general forms of the MNL model.

First derivatives for trinomial logit model with alternative-specific tex2html_wrap_inline290 's

eqnarray140

First derivatives for general MNL model

displaymath500

Second derivatives for trinomial logit model with alternative-specific tex2html_wrap_inline290 's

eqnarray145

Second derivatives for general MNL model

displaymath504

QUESTION 5 Consider the linear regression model

displaymath506

where tex2html_wrap_inline508 . Prove that the LAD estimator defined by

displaymath510

converges with probability 1 to tex2html_wrap_inline512 .




next up previous
Next: About this document

John Rust
Tue Mar 25 10:55:27 CST 1997