联系方式

  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp

您当前位置:首页 >> Matlab编程Matlab编程

日期:2018-11-22 10:15

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:

Yt =



1 if Rt > 0

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 = β

0Xt + εt

, t = 1, ..., n  1.

The estimated probability will then be

P?(Rt+1 > 0 | Xt) =0Xt

, 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:

Zt(α) =

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

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

0 otherwise.

for a fixed 0 < α < 1. Then set

Z(α) =

Pn

t=2 Zt(α)

n 1

.

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:

rt = μ(1φ) + φrt1 + r

1

2

t1ut

,

with ut ~ NID(0, σ2

).

Write the code to estimate this model using MLE, deriving also the asymptotic

covariance matrix using the Gaussian loglikelihood:

l(θ) = X

T

t=2

logf(rt

| rt1, θ)

where

f(rt

| rt1, θ) = 1

p

2πrt1σ

2

e

0.5

rt1σ2

(rtμ(1φ)φrt1)

2

,

and

θ = (μ, φ, σ2

)

0

.

How does its fit go as compared with the Vasicek model

rt = μ(1 ? φ) + φrt?1 + ut

,

with ut ~ NID(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 r

US

t

and the UK 1-month interest

rate r

UK

t

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 r

US

t

and the UK 1-month

interest rate r

UK

t

in the dataset data coursework Q3. (You can simply adapt

the previous code to estimate this latter model.)

Comment on the results.


版权所有:编程辅导网 2021 All Rights Reserved 联系方式:QQ:99515681 微信:codinghelp 电子信箱:99515681@qq.com
免责声明:本站部分内容从网络整理而来,只供参考!如有版权问题可联系本站删除。 站长地图

python代写
微信客服:codinghelp