You are on page 1of 3

Financial Statistics coursework.

Please address all questions.


You are invited to develop your own MatLab code.

Question 1 (CAPM)
Let rit be the rate of return from holding the ith stock, let rM t be the (equity)
market index return, let rf t be the risk-free rate.
rit rf t = + (rM t rf t ) + ut ,

(1)

and
rit rf t = + 1 [Dt (rM t rf t )] + 2 [(1 Dt )(rM t rf t )] + 3 (rM t rf t )2 + ut , (2)
where Dt = 1 if (rM t rf t ) > 0 and Dt = 0 otherwise.
Use the dataset data coursework Q1.
Write a programme which estimates the two above linear regression model
using OLS over the whole sample period.
With respect to the null hypothesis
H0 : 1 = 2
write down a code to perform the F test and apply the tests to the data.
With respect to the null hypothesis
H0 : = 0
write down a code to perform the t test and apply the tests to the data.

Question 2 (probability of a positive asset return)

Let Rt be an equity market index return. Construct an indicator variable, that


is a variable made by zeros and ones, as follows:

1 if Rt > 0
Yt =
0 if Rt 0
We know that we can re-write a conditional probability as a conditional expectation:
P r(Rt+1 > 0 | Xt ) = E(Y (Rt+1 ) | Xt ).
where now Xt denotes a set of regressors (predictors) observed at time t. We can
then use the linear regression model to estimate this conditional probability
Given a sample (Y1 , X1 , ....., Yn , Xn ) consider then
Yt+1 = 0 Xt + t , t = 1, ..., n 1.
The estimated probability will then be
P (Rt+1 > 0 | Xt ) = 0 Xt , t = 1, 2, ...., n 1.
where is the OLS estimator. To evaluate the forecasting performance typically we
construct the hit ratio indicator Z in the following way:

1 if P (Rt > 0 | Xt1 ) > and Rt > 0,


Zt () =
1 if P (Rt > 0 | Xt1 ) and Rt 0,

0
otherwise.
for a fixed 0 < < 1. Then set
Pn
Z() =

Zt ()
.
n1

t=2

Use the dataset data coursework Q2.


Write a programme which estimates the linear regression model using OLS over
the whole sample period.
For = 1/2, construct Zt () and Z() trying to find the combination of
predictors that gives the best performance in term of Z() (the maximum
value of Z()).
Finally, for this combination of regressors found in the previous point, can you
find the value of for which Z() is maximized?

Question 3 (CIR model for the term structure of interest rate)


The discrete time version of the CIR model for the term structure postulates that
the short-term interest rate rt satisfies the following dynamic equation:
1
2
ut ,
rt = (1 ) + rt1 + rt1

with ut N ID(0, 2 ).
Write the code to estimate this model using MLE, deriving also the asymptotic
covariance matrix using the Gaussian loglikelihood:
l() =

T
X

logf (rt | rt1 , )

t=2

where

1
0.5 (rt (1)rt1 )2
f (rt | rt1 , ) = p
,
e rt1 2
2rt1 2

and
= (, , 2 )0 .
How does its fit go as compared with the Vasicek model
rt = (1 ) + rt1 + ut ,
with ut N ID(0, 2 )?
Summarizing:
Evaluate the MLE, and its asymptotic covariance matrix, for the for the CIR
model using both the US 1-month interest rate rtU S and the UK 1-month interest rate rtU K in the dataset data coursework Q3.
Evaluate the MLE, and its asymptotic covariance matrix, for the for the Vasicek model using both the US 1-month interest rate rtU S and the UK 1-month
interest rate rtU K in the dataset data coursework Q3. (You can simply adapt
the previous code to estimate this latter model.)
Comment on the results.

You might also like