Midterm Project
STAT S4261 S5261: Statistical Methods in Finance
DUE: Monday, June 18, 6:00 PM (submit online before the class)
(1) Please sign your exam with your name and UNI number.
(2) The exam must be submitted online (in case of R) in a form. of Rmd le knitted into
pdf and html (please submit Rmd, html and pdf). You can work also with Python
or Matlab.
(3) Your pdf and html, must contain the results, code (with comments) and all the
answers required by the question.
(4) No late exam, under any circumstances, will be accepted.
(5) The exam must be taken completely alone. Showing it or discussing it with anybody
is forbidden, including (but not limited to) the other students in the course.
(6) You may use any publicly available material you want, including books, the inter-
net, etc. (You are NOT allowed to submit questions to internet discussion groups,
though!).
(7) Submit on Courseworks your code together with the solution (pdf and html) with
comments and explanations. Even if the nal result is wrong, the code may allow us
to nd the bug and award partial credit. Code will also help us to make sure that
you worked alone on the project.
On Courseworks you can nd a zip le \data.zip" with data les relevant for the project.
Question 1 (25p)
The le d nasdaq 82stocks.txt contains the daily log returns of the NASDAQ Composite
Index and 82 stocks from January 3, 1990 to December 29, 2006. We want to track the
returns of NASDAQ by using a small number of stocks from the given 82 stocks.
(a) (5p) Construct a full regression model.
(b) (5p) Use partial F-statistics and backward elimination to select variables fro the full
regression model in (a). Write down the selected model.
(c) (5p) Compare the full and selected models. Summarize your comparison in a ANOVA
table.
(d) (5p) For the selected regression model in (b), perform. residual diagnostics.
(e) (5p) If you can only use at most ve stocks to track the daily NASDAQ log returns,
describe your model selection procedure and your constructed model.
Question 2 (15p)
The le m swap.txt contains the monthly swap ratesrkt for eight maturitiesTk = 1,2,3,4,5,7,
10, and 30 years from July 2000 to June 2007.
(a) (5p) Perform. a principal component analysis (PCA) of the data using the sample
covariance matrix.
(b) (5p) Perform. a PCA of the data using the sample correlation matrix.
(c) (5p) Compare your results with those in Section 2.2.3 of the textbook (also given in
one of the lectures) for the daily data. Discuss the in uence of sampling frequency
on the result.
Question 3 (25p)
Let yt be a q 1 vector of excess returns on q assets and let xt be the excess return on the
market portfolio (or, more precisely, its proxy) at time t. The capital asset pricing model
can be associated with the null hypothesis H0 : = 0 in the regression model
yt = +xt + t; 1 t n; (1)
where E( t) = 0, Cov( T) = V, and E(xt t) = 0. Note that (1) is a multivariate represen-
tation of q regression models of the form. ytj = j +xt j + tj;j = 1;:::;q.
2
The le m sp500ret 3mtcm.txt contains three columns. The second column gives
the monthly returns of the S P 500 index from January 1994 to December 2006. The
third column gives the monthly rates of the 3-month U. S. Treasury bill in the secondary
market, which is obtained from the Federal Reserve Bank of St. Louis and used as the
risk-free asset here. Consider the ten monthly returns in the le m ret 10stocks.txt.
(a) (5p) Fit CAPM to the ten stock. Give point estimates and 95% con dence intervals of
; , the Sharpe index, and the Treynor index. (Hint: Use the delta method for the
Sharpe and Treynor indices.)
(b) (5p) Use the bootstrap procedure in Section 3.5 to estimate the standard error of the
point estimates of ; , and the Sharpe and Treynor indices.
(c) (5p) Test for each stock the null hypothesis = 0.
(d) (5p) Use the regression model (1) to test for the ten stocks the null hypothesis = 0.
(e) (5p) Perform. a factor analysis on the excess returns of the ten stocks. Show the factor
loadings and rotated factor loadings. Explain your choice of the number of factors.
(f) (5p) Consider the model
ret = 11ftQuestion 4 (35p)
Ledoit and Wolf (2003, 2004) propose to estimate by X but to shrink the MLE of
toward structured covariance matrices that can have relatively small "estimation error"
in comparison with the MLE of . Let S = nt=1(rt r)(rt r)T=n. Ledoit and Wolf’s
rationale is that S has a large estimation error (or, more precisely, variances of the matrix
entries) when p(p+ 1)=2 is comparable with n, whereas a structured covariance matrix F)
has much fewer parameters and can therefore be estimated with much smaller variances.
In particular, they consider F that corresponds to the single-factor model in CAPM (see
Sections 3.3 and 3.4) and point out that its disadvantage is that may not equal F,
resulting in a bias of bF when the assumed structure (e.g., CAPM) does not hold. They
therefore propose to estimate by a convex combination of bF and S:
b = b bF + (1 b )S; (2)
where b is an estimator of the optimal shrinkage constant used to shrink the MLE toward
the estimated structured covariance matrix bF.
3
The le m ret 10stocks.txt contains the monthly returns of ten stocks from January
1994 to December 2006. The ten stocks include Apple Computer, Adobe Systems, Auto-
matic Data Processing, Advanced Micro Devices, Dell, Gateway, Hewlett-Packard Com-
pany, International Business Machines Corp., Microsoft Corp., and Oracle Corp. The le
m sp500ret 3mtcm.txt contains three columns. The second column gives the monthly
returns of the S P 500 index January 1994 to December 2006. The third column gives
the monthly rates of the 3-month Treasury bill in the secondary market, which are obtained
from the Federal Reserve Bank of St. Louis and used as the risk-free rate here. Consider
portfolios that consist of the ten stocks and allow short selling.
(a) (7.5p) Using a single-index model for the structured covariance matrix F, calculate the
estimate bF of F in (2)
(b) (10p) The b in (2) in the textbook and suggested by Ledoit and Wolf (2003, 2004) is of
the following form. Let bfij and b ij denote the (i;j)the entry of bF and S, respectively,
Then b = minf1;(b =n)+g. Compute the covariance estimate (2) with bF in (a) and
the b suggested by Ledoit and Wolf, and plot the estimated e cient frontier using
this covariance estimate.
(c) (7.5p) Perform. PCA on the ten stocks. Using the rst two principal components as
factors in a two-factor model for F (see Section 3.4.3), estimate F.
(d) (10p) Using the estimated bF in (c) as the shrinkage target in (2), compute the new
value of and the new shrinkage estimate (2) of . Plot the corresponding estimated
e cient frontier and compare it with that in (b).