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

Assignment 2

Empirical Finance: Methods and Applications

● You should submit a single pdf solution containing answers to all sub-parts of all problems.  Type- written solutions are preferred but handwritten and scanned solutions are acceptable.  You may use R-markdown, LaTeX, or any other software to prepare your solution, but please prepare a PDF.

● Marks for each problem are listed below. Within each problem sub-parts are equally weighted.

● In addition, please submit code for problems 4-5 in the form of an R project. This should be a zipped folder that contains an R Project and a single R file with answers to all relevant parts of all problems. I should be able to download and run your R file directly.  Please comment your code to make it as easy to interpret as possible.

● Your marks depend on clarity of exposition in solutions and code. This includes figures and regression results.

● You may discuss all problems with classmates but each student must independently write and submit their own solution. Solutions and code that have been clearly copied will cause the full assignment to receive 0 marks and may invite further disciplinary action.

 

Problem 1 (10 Marks)

We defined the objective function for RIDGE as:

N                                                                    K

βˆRIDGE  n      (yi 一 X β)i(人) 1     subject to           βk(1)  ≤ c

i4〇                                                                  k4〇

or alternatively:

N                                           K

βˆRIDGE  n      (yi 一 X β)i(人) 1 + λ       βk(1) .

i4〇                                        k4〇

Derive the solution for βˆRIDGE .

 

Problem 2 (10 Marks)

Suppose we see excess returns on three assets (i = 1, 2, 3) over many time periods (indexed by t):  xit .  We may write these together as a vector at time t:

╱xt

  =  

Suppose these returns are driven by the following two factor model:

xit  = αi + βif,t + β1if1,t + εit .


Let the covariance matrix of f,t  and f1,t  be given by:

Ωf  = ╱1σfσ1     σ11σf

and the covariance matrix of εit  be given by:

Ψ =  1σ0 0

0

σ1(1)

0

0(0)  σ2(1) .

You may assume that Cov(fkt , εit/ ) = 0 for any k , i, t and t , and that both fk,t  and εit  are uncorrelated over time.

(a) Write the covariance matrix of asset returns:  Σx  = Cov(丈t ). You may use matrix notation, but please comprehensively define all terms.

(b)  Suppose we observed f  and f1 , but not βi  or β1i. Suppose we see a very large number of time periods T (you may assume T → &). Describe a method for consistently estimating βi  and β1i .

Problem 3 (10 Marks)

Suppose we are interested in the relationship between yi  and xi , where

yi  = β← + β xi + εi

However, we only observe the variable yi  when yi  is greater than a threshold c (That is, when yi  ≥ c), and

we observe nothing if yi  < c. Suppose that εi |xi  is a random variable with pdf g() and cdf G().

(a) What is the term for data that is restricted in this form?

(b) What is the probability density function of yi  conditional on xi  and yi  being above the threshold (that is f (yi |xi , yi  ≥ ci )). Please write this in terms of xi , β , β←  and the pdf and cdf of εi .

(c)  Suppose we observe n independent draws of yi . Write the joint density of these draws.

(d)  Suppose that εi  ~ N (0, σ1 ), write the log-likelihood as a function of the observed data and the unknown parameters of the model

Problem 4 (30 Marks)

In this problem you will simulate and estimate a censored regression model:

yi(*)  = β← + β xi + vi

yi  = min(yi(*), ci )

vi |xi , ci  ~ N (0, σ1 )

(a)  Set a seed in r using the following command: set.seed(123). Now simulate 1000 draws of the uncensored data yi(*)  using parameters β←  = 0.5, β  = 1.5 σ = 1.2. Draw the data xi  as normal with mean 0 and variance 1. Create a scatter plot of the uncensored yi(*)  against xi . Estimate an OLS regression of yi(*)  on xi  and report βˆ and βˆ〇(OLS) .1

f (z)      1 − F (c) .

(b)  Now censor the data at c = 0. Create a scatter plot of the censored data yi  against xi . Estimate an OLS regression of yi  on xi . How do the coefficients look compared to the choices of β←  and β  that generated the data.

(c) Write the log-likelihood function, and estimate the parameters of the model via MLE. Note that, in contrast to the probit, σ is now a parameter to be estimated. I recommend using starting values [1; 1; 1] . Report your estimates of βˆ , βˆ〇(M LE), and M LE . Please use the following for your log-likelihood:

n

l = log(L(β← , β , σ)) =       log(f (yi |xi , ci ))

i4〇

= in4  ✶{yi  ≥ ci }log ┌ 1  Φ ╱ ci  βσ β xi ┐ + ✶{yi  < ci }log ┌ φ ╱ yi  βσ β xi 

(d)  Re-simulate and re-estimate the model 100 times, storing your estimates of βˆ , βˆ〇(M LE), and M LE each time.  Report the mean and variance of these estimates?  Create a histogram of your βˆ〇(M LE)  estimates. Now simulate and estimate the model 1000 times and do the same.2

Problem 5 (40 Marks)

Simulate data xi,t  based upon the linear factor structure discussed in lecture:

xi,t  = αi + β,if,t +...+ βk,i fK,t + εit .

Your simulation should satisfy the following criteria:

● m = 10:  10 different “assets.”

● T = 100:  100 periods.

● K = 3: Three factors.

● Set all αi  to 0.

● Set the means of all factors µf  to 0.

● The factor loadings for the first “asset” should be the last three non-zero digits of your CID divided by 10.  For example, if your CID is 00946508, you would have loadings of:  β ,  = 0.6, β1 ,  = 0.5, and β2 ,  = 0.8. You may choose the loadings for all other assets as you wish.

● All three factors must have non-zero variances and non-zero correlations with one another.  In other words, Ωf  may not have any zero terms.3

● The variances of εit  must not be the same for all i.

● All assumptions on Cov[εt] = ψ and the correlations of εit  over time must be as discussed in lecture.

(a)  Describe the parameters of your simulation. Specifically Ω f , ψ and B .

(b)  Run time series regressions using your simulated values of fk,t  and xi,t  to estimate Bˆ , the matrix of factor loadings for all assets.  Show your estimated Bˆ .  How do your estimates compare to the loadings

used to generate the data?

3 Be sure not to include set.seed on the inside of any loops.  Checking what happens when you do this makes the role of the seed pretty clear.

4 You may wish to consider the command mvrnorm() when simulating the realizations of these factors.


(c)  Now  use the  matrix  B  and your  simulated  xi,t   to  estimate the  factor  realizations  fˆ  using the BARRA/GLS procedure discussed in lecture.   For each factor,  create a plot that includes the time series of both (i) your estimated fˆ and (ii) the actual fk,t  from your simulation.

(d)  Conduct principal components analysis on Σx , the covariance matrix of asset returns.  Create a plot showing the proportion of the variance explained by the first five principle components. What fraction is explained by the first principle component? The fourth?