CS计算机代考程序代写 finance Assignment 2

Assignment 2
Empirical Finance: Methods and Applications February 22, 2021
• You should submit a single pdf solution containing answers to all sub-parts of all problems (including 4-5). Typewritten solutions are preferred but handwritten and scanned solutions are acceptable.
• 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 or code that have been clearly copied will cause the full assignment to receive 0 marks.
Problem 1 (10 Marks)
We defined the objective function for RIDGE as:
or alternatively:
Derive the solution for βˆRIDGE. Problem 2 (10 Marks)
NK βˆRIDGE=argmin􏰆(yi−Xi′β)2 subjectto 􏰆βk2≤c
βˆRIDGE = arg min 􏰆(yi − Xi′β)2 + λ 􏰆 βk2.
i=1 k=1
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:
x1t  xt = x2t
Suppose these returns are driven by the following two factor model:
xit = αi + β1if1,t + β2if2,t + εit.

Let the covariance matrix of f1,t and f2,t be given by:
􏰉 σf2 σ12􏰊
Ωf=σ12 σf2 and the covariance matrix of εit be given by:
σ12 0 0 Ψ=0 σ2 0.
0 0 σ32
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 all terms of the covariance matrix of asset returns: Σx = Cov(xt). (10 marks)
(b) Suppose we observed f1 and f2, but not β1i or β2i. Suppose we see a very large number of time periods T (you may assume T → ∞). Describe a method for consistently estimating β1i and β2i.
Problem 3 (10 Marks)
Suppose we are interested in the relationship between yi and xi, where yi = β0 + β1xi + ε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,β1,β0 and the pdf and cdf of εi.1 (c) Suppose we observe n independent draws of yi. Write the joint density of these draws. (d) Suppose that εi ∼ N(0,σ2), 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: y i∗ = β 0 + β 1 x i + v i yi =min(yi∗,ci) vi|xi,ci ∼N(0,σ2) (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 = 0.5, β1 = 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 x and report βˆOLS and βˆOLS.2 i01 (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 β0 and β1 that generated the data. 1Note that, in general, if a random variable Z has pdf f(z) and cdf F(z), than f(z|Z ≥ c) = f(z) . 1−F (c) 2The function rnorm() may be useful for simulating data. 2 (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 βˆMLE, βˆMLE, and σˆMLE. Please use the following for your log-likelihood: 01 n l = log(L(β0, β1, σ)) = 􏰆 log(f(yi|xi, ci)) i=1 n 􏰆 1{yi ≥ci}log 1−Φ 􏰋1 􏰉yi−β0−β1xi􏰊􏰌 (d) Re-simulateandre-estimatethemodel100times,storingyourestimatesofβˆMLE,βˆMLE,andσˆMLE each 01 time. Report the mean and variance of these estimates? Create a histogram of your βˆMLE estimates. Now simulate and estimate the model 1000 times and do the same.3 Problem 5 (40 Marks) Simulate data xi,t based upon the linear factor structure discussed in lecture: xi,t =αi +β1,if1,t +···+βk,ifK,t +εit. Your simulation should satisfy the following criteria: • m = 10: 10 different “assets.” • T = 100: 100 periods. • K = 3: Three factors. • Setallαi to0. • Set the means of all factors μf to 0. = +1{yi

Leave a Reply

Your email address will not be published. Required fields are marked *