Assigment (Econometrics and Matlab Codes)

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

1

Student’s Name:

Professor:

Course:

Date:

Assignment

Question 1

Y = βX+ u

X ∼ N ( μ x , σ 2x ) ,u ∼ N (0 , σ 2)

Solution

COV ( XY )
corr ( XY ) =
Var ( x ) var ( y )

We also know that

COV ( XY )
β=
var ( x )

Substituting in Corr(XY) We have

β
corr ( XY ) =
var ( y )

Var (y) from the equation Y = βX+ u

var ( Y ) =β 2 var ( X )+ var ( u )= β2 σ 2x + σ 2 Substituting in corr (XY ) above we have

β
corr ( XY ) =
β σ 2x + σ 2
2

E ( Y )=βE ( X )+ E (u )=β μ x , β=E ( Y ) / μ x, implying that β=β μ x / μ x substituting from the


equation above , we have;

β μx
μx
corr ( XY ) = 2 2 2
β σ x+ σ
2

Question 2

White’s covariance estimator is the most commonly used strategy to deal with the likelihood of
heteroskedasticity-consistent standard errors and it was developed by white. It is similar to the
Breusch-Pagan test. It should be used as the z variables with all variables in its original
equation. The squares of x variables should be computed or the cross products of x variables. It
should not be used where dummies are included in the squares.

Question 3

y i=a+b x i+ ei

e i= y i−a−b x i
n
2
mina ,b E [ (Y −a−bX ) ]=mina ,b E ∑ ( y ¿ ¿i−a−b x i ¿ )2 ¿ ¿
i=1

n n

min E ∑ ( y ¿ ¿ i−a−b x i ¿ )2=−2 ∑ ( y ¿ ¿ i−a−b x i ¿ )=0 ¿ ¿ ¿ ¿
∂a a ,b i=1 i=1

n n

∑ yi −na−b ∑ xi =0
i=1 i=1

n n
na=∑ y i−b ∑ x i
i=1 i =1

n n

∑ y i−b ∑ x i
a= i=1 i=1
= ý−b x́
n

n n

min E ∑ ( y ¿ ¿ i−a−b x i ¿ )2=−2 ∑ ( y ¿ ¿ i−a−b x i ¿ ) x i=0 ¿ ¿ ¿ ¿
∂b a ,b i=1 i=1

n
¿−2 ∑ ( y ¿ ¿ i−a−b x i ¿) x i=0 ¿ ¿
i =1

∑ (x ¿¿ i y ¿¿ i−a x i−b x 2i ¿)=0 ¿ ¿ ¿


i=1
3

∑ (x ¿¿ i y ¿¿ i−( y ̅ −bx ̅ )x i−b x 2i ¿)=0 ¿ ¿ ¿


i=1

∑ (x ¿¿ i y ¿¿ i− ý xi +b x́ xi −b xi2¿)=0¿ ¿ ¿
i=1

∑ ( y ¿ ¿ i− ý +b x́−b x i ¿ ) x i=0 ¿ ¿
i=1

∑ ( y ¿ ¿ i− ý +b x́−b x i ¿ )=0 ¿ ¿
i=1

n n

∑ ( y ¿¿ i− ý )−b ∑ ( xi −x́)=0¿
i=1 i=1

n n
b ∑ (x i−x́)=∑ ( y ¿¿ i− ý )¿
i=1 i=1

Multiplying both sides by by ( x i− x́ )


n n
2
b ∑ ( x i− x́ ) =∑ ( y ¿¿ i− ý )(x i−x́)¿
i=1 i=1

∑ ( y ¿¿ i− ý )(x i−x́) COV ( XY )


b= i=1 n
= ¿
VAR (X )
∑ ( x i−x́ )2
i=1

Question 4

CAPM in excess return form is given as ;

For asset i

Ri−R f =βi ( Rm −Rf ) where β i=σ M , i /σ 2M

This is a better asset for I , the regression coefficient β i serves as an important measure of
individual assets risks called portfolios that is different from σ 2 which measures the no
diversifiable risk part.

Question 5.
4

GRS test on a model that uses industrial popularion growth can be used since GRS test is
statistical F-test for the hypothesis that all coeffients are equal to zero for a linear model. From
the provided equation it is clear that the model is a linear and therefore GRS can be used.

Question 6

Pricing errors are not correlated with betas in a test of a factor pricing model on industry
portfolios because cross-sectional estimate sets the cross-sectional correlation between right-
hand variables (betas) and error terms (pricing errors) to zero by construction.

Question 7

“My beta is your alpha” statement contains two main measurements that is beta and alpha.
These two measures are used to evaluate the stock performance, investment portfolio, or fund.
Beta measures the volatility of the investment or it indicates the relative risk. Alpha measures the
amount of investment that has been returned as compared to market index or any other broad
benchmark. The statement means that the relative risk of the company is same to the amount of
investment returned by the other company in comparison to market index.

Question 8

' −1 ' 0.0141 −0.0300 ⌋ ⌈ 17.200 ⌉=⌈ 0.05352 ⌉ ¿


a. [α ¿ ¿ i , β i ]=( X X ) ( X Y )=⌊
−0.0300 0.3140 6.300 1.4622

α i=0.05352 , this indicates that the investment outperformed its benchmark index
by 5.352%.

β i=1.4622 , the company has a beta of 1.4622, indicating that the company is exceeds the
market volatility by 46.22%.

μ' μ 4.594
b. R−Square=1− ' =1− =1−0.3119=0.6881
y y 14.730
This indiactes that 68.81% of the variation in the model is explained by the inputs.
c.
i. test the null of H0 : αi = 0 at the 10% significance level
H 0 :α i =0 vs.
H 1 : αi ≠ 0
0.05352−0
t−statistic= =4.316
0.0124
Reject null hypothesis and conclude that αi is not equal to 0
ii. test the null of H0 : βi = 1.1 at the 10% significance level.
H 0 : βi =1.1vs.
5

H 1 : : β i ≠1.1
1.4622−1.1
t−statistic= =1.1535
0.3140
Reject null hypothesis and conclude that β i is equal to 1.1

d. The portfolios average return is 0.193


When market return is 5%
Y=0.05352+1.4622*0.05=0.12663
The portfolio when market return is 5% will be 0.12663.
e. Alpha lowered to 0.0089 and beta is increased 1.0521 this is due to addition of other two
variables in the right hand side of CAPM benchmark model.
f. SMBt and Rewt factors explain the highest variation in the portfolio return because they
have the highest coefficient.
g. R-square =1-0.12=0.88. Meaning 88% of the variation in the new CAPM model is
explained by the inputs.
h. i) H 0 :α i =0 vs.
H 1 : αi ≠ 0
0.0089−0
t−statistic= =0.717
0.0124
We do not Reject null hypothesis and conclude that αi is actually equal to 0
iii. H 0 : βi =1.1vs.
H 1 : : β i ≠1.1
1.0521−1.1
t−statistic= =−0.1525
0.3140
Reject null hypothesis and conclude that β i is equal to 1.1

Question 9

a. Increasing portfolios reduces mean excess returns and alphas. Taking it the to have
negatives returns until Ls1090 which takes the excess returns back to the positive side.
Adding more factors helps in controlling the size of alphas.
b. 3-factor betas increase across the table as the portfolio sizes increases. It shows a
negative association with an increase with the portfolio sizes. The most significant
portfolio is of size 9900 because it has the greatest ratio of alpha versus standard error.
Making it the most significant.
c. The asset pricing model in this scenario is anomaly because it has a pattern in average
stock returns that is inconsistent with prevailing models of asset-price behavior.
6

d. The most reasonable interval for price of risk is between -1.435 and -1.215 because this is
the most significant interval and it does not include zero meaning that it is the most
significant interval.

Coding

9. matlab code that return probability density function of a normal distribution at point x is

mu = [-2,-1,0,1,2];
sigma = 1;
y = normpdf(0,mu,sigma)

10.

a). Line 3 is unnecessary because there is no preceding code that defines T. This can be
corrected by defining the value of variable T in line 2.

b) line 1 –error in “W”

Line 3- error “for”

Line 5- error in “x”

Line 6-error in “y”

Line 7-error in “bhat”

Line 10-error in “u”

Line 11- error in “sigsq”

Line 18-error in “end”

c). line 1 defines the value of W

line 3-7 assigns and provides the formula for bhat , giving the necessary values for the inputs
of the formula in line 7.

Line 9-13 gives the first condition when i=1 and natural numbers are used.

Line 15-18 provides condition two for the values of x , y and g

Line 20 gives the final output.

d). These codes computed Harmonic and geometric mean of natural numbers. It defines the
values of x and y by providing their formulas. Allocation is made in percentages as
7

demonstrated above. One factor and N excess returns Re of data length T forming a TxN
matrix.

You might also like