Docsity

Applied Econometrics - empirical analysis, Guide, Progetti e Ricerche di Econometria

Toggle sidebar
bg1
Table of contents
1 Introduction
2 Model description
3 Data collection
4 Econometric model
5 Testing for significance
6 Testing the reliability of the mode
6.1 Linearity assumption
6.2 Normality of error distribution
6.3 Independence of residuals
6.4 Homoskedasticity of residuals
6.5 Absence of serial correlations in the residuals
7 Testing for structural breaks
8 Conclusions
9 Sources
10 R code
pf3
pf4
pf5
pf8
pf9
pfa
Discount

In offerta

Anteprima parziale del testo

Scarica Applied Econometrics - empirical analysis e più Guide, Progetti e Ricerche in PDF di Econometria solo su Docsity!

Table of contents

1 Introduction

2 Model description

3 Data collection

4 Econometric model

5 Testing for significance

6 Testing the reliability of the mode

6.1 Linearity assumption

6.2 Normality of error distribution

6.3 Independence of residuals

6.4 Homoskedasticity of residuals

6.5 Absence of serial correlations in the residuals

7 Testing for structural breaks

8 Conclusions

9 Sources

10 R code

1 - Introduction

Seagate is a US corporation founded in 197 8 , operating mainly in the computer storage industry, during its

life it has expanded worldwide and it’s now one of the dominant corporations in the Hard Disk market.

It is quoted at the NASDAQ financial market as STX since 2002 and is part of different financial indexes, among

them the S&P 500 and the NASDAQ 100. The Nasdaq 100 is an index comprising the largest US companies

listed on the NASDAQ stock exchange and operating in non-financial sectors.

2 - Model description

The purpose of this paper is to explain the returns of the Seagate Technology’s stock as a relation with the

index NASDAQ 100 to which it belongs. This will be performed making a linear regression of the Capital Asset

Pricing Model. The CAPM is a model that is used to calculate the expected rate of return of an investment,

represented in its relationship with respect to a risk-free rate and a risk premium assigned to the stock

considered, as a compensation for the risk entailed in the investment.

According to the model, the return of an investment could be represented as follows:

𝑡

1

2

𝑡+

𝑡

Where the dependent variable 𝑦 𝑡

represents the returns of the stock under consideration, 𝛽

1

is the risk free

rate, the independent variable 𝑥 𝑡+

is the market risk premium, 𝛽

2

is the beta of the investment, hence the

amount of risk that the investment will add to a portfolio and 𝑢 𝑡

represents other influences on the return.

The linear regression will be developed using as dependent variable the excess return of the Seagate stock

with respect to the risk-free rate, identified as the 3-month US treasury bill, and as independent variable the

excess return of the NASDAQ 100 index with respect to the risk free rate. The model has the purpose of

identifying the coefficients 𝛽 1

and 𝛽

2

of the CAPM and to explain the excess returns of the stock as a function

of the second coefficient, that represents the sensitivity of the return of the investments with respect to the

changes in the excess return of the market portfolio to which it belongs. The level of this parameter explains

whether or not the stock under consideration has returns equal to the ones of the market portfolio.

In fact, if this parameter is larger than 1, then Seagate’s tock is considered as aggressive, because its returns

are higher with respect to the average of the entire index, meaning also that it is riskier. On the opposite

case, if it is lower than 1, the stock is defined as defensive, its excess returns are lower with respect to the

rest of the index to which it belongs to.

The entire analysis will be performed using the software R, the commands used and relative outputs will be

presented along the analysis

3 - Data collection

The data on which the regression analysis will be performed is gathered through Yahoo Finance over the

period from the 28 November 2021 to the 2 9 November 2022. Using the apposite line of command, it is

possible to directly upload the relevant data:

The lines of code showed above generate the following graph:

Seagate Technology seems on average to be aligned with the Nasdaq 100 portfolio, the variation of its excess

returns are greater than the ones of the portfolio, this is predictable, given that the variation of a portfolio

are usually mitigated through diversification.

4 - Econometric model

Once the variables required for the model are defined, it is possible to estimate the linear regression model.

From the summary it could be inferred that, for a 1% increase in the Nasdaq excess return the Seagate excess

return increase by 0. 96 %, the relationship is almost close to one, meaning that Seagate stock’s are quite

defensive with respect to the Nasdaq 100 portfolio but really close its average return. In fact by looking at

the standard error we can compute a 95% confidence of having 𝛽 2

ranging from 0.960951 +0.

=1.0121 27 and 0.960951 - 0.051176 = 0 .909775. This deduction will be further tested in the following section

of the paper.

From the estimated p-value associated to the independent variable, that has a value close to 0, it could be

derived that it has a great significance in explaining the dependent one, this conclusion will be further verified

performing a t-test on the coefficient.

Another fundamental result to look at are the residuals, their standard deviation represents the individual

risk of the stock, that is about 0.01 48 , its small value confirms the STX definition as “defensive title”.

Additionally, the proportion of this risk that is attributable to the market portfolio is 59%, represented by R 2

which consists in the explained sum of squares with respect to the total sum of squares. Meaning that the

major part of the variability is explained by the linear model, that seems efficient even if this result may still

be improved.

5 - Testing for significance

To verify whether or not the coefficient obtained are significant in explaining the behavior of the dependent

variable, it could be performed a two tailed T test. Such test compares a t-statistic to two critical values

determined according to the level of significance that we wish to attribute to the result, to assess whether

or not the statistic falls into the region for which the null hypothesis is rejected. The t-statistic is calculated

as

where the coefficient under analysis is compared with the value assigned to it under the null hypothesis and

divided by its standard deviation.

In this particular case, the null hypothesis 𝐻 0

is defined as 𝛽 = 0 , if this is the case, the coefficient is

considered statistically insignificant. The test will be applied both to the intercept and the estimated

coefficient 𝛽 2

For a confidence level of 0.05% the critical values that define the rejection region are +/-1.

The functions generate a graph on which the excess returns of Seagate are plotted as a function of the excess

returns of the Nasdaq 100

By looking at the graph is visible an increasing linear pattern between the two, meaning that we can

approximate their relationship as a positive linear relationship.

6.2 - Normality of error distribution

Another assumption to check is the normality of the error distribution, this can be checked graphically

through the plot that compares the quantiles of the sample residuals with respect to the ones that we would

identify in a normal distribution. Already from the summary of the model it is visible a mean of residuals of

0, and that the max-median and median-min differences that are almost identical, meaning that we have a

distribution of residuals close to a normal one.

The graphical representation confirms the assumption, the majority of residuals follows a distribution close

to a normal one, but there are some outliers, this is to be expected given that the normality assumption is

really strict and almost impossible to satisfy in real life examples. Nevertheless it could be considered a valid

approximation in this case.

6.3 - Independence of residuals

The independence assumption states that the returns are independently distributed and that there is no

relationship between them and the independent variable. To confirm the independence assumption about

residuals they could be stored and regressed on the independent variable of Model1, if the regression shows

an absence of relationship between the two, they are independent from the variable erNDX.

From this second regression it is visible that the intercepts are equal to zero, hence statistically insignificant,

confirming the hypothesis of independence. Meaning that the residuals are orthogonal to the independent

variable and do not depend on it. If this wasn’t the case the model would have been distorted.

6.4 - Homoskedasticity of residuals

To confirm that residuals are identically distributed it can be performed a test for homoskedasticity. A

possible test is the Breusch-Pagan, which null hypothesis is “presence of homoskedasticity”. Additionally we

can verify it plotting the residuals and the independent variable to see whether they follow an increasing

trend as the independent variable increases.

Consequently the assumption that will be assessed is whether the outbreak of the Ukrainian war affected

the structure of returns of STX, changing its relationship with respect to the excess returns of NDX.

To perform the test, it is necessary to define an unrestricted model and a restricted model, that will be

compared. The unrestricted model is composed by two sub-models in which the data is divided in the two

periods before and after 24 February 2022, it is defined as unrestricted because, incorporates an additional

variable, leading to a lower sum of squares residuals. The restricted model will be the one analyzed until now,

which assumes that the sample considered could be effectively analyzed using a unique regression,

generating a greater sum of squared residuals.

Already from the summary of the two sub models a change of pattern is evident, as the 𝛽 2

goes from highly

defensive to less defensive. It is also visible a change in the distribution of residuals and in the explained sum

of squares residuals over the total squared residuals represented by R2.

This is even more evident graphically: the plot on the left shows the excess returns of STX as a function of

the excess returns of NDX in the pre-war model, the plot on the left shows their relationship in the post war

model

After defining the models, the test can be performed using the following commands:

Both looking at the p-value and at the critical value it is evident that the null hypothesis of no break point

should be rejected. Consequently the data could be represented more efficiently with two regression lines.

Pre-war data has a lower influence on the model over the entire period because it is not collected in an equal

proportion with respect to the post-war data. For this reason even if there’s a structural break inside the

period considered the results are not much influenced by the pre-war relationship. Consequently the model

analyzed is better able to describe the post war scenario, but because the data collected are not balanced.

8 - Conclusions

The model satisfies all the assumptions for which it can be considered the Best Linear Unbiased Estimator to

explain the excess returns of the stock of Seagate Technology. Nevertheless, from the results of the Chow

test it could be concluded that the analysis performed fails to accurately depict the behavior of the stock for

the entire period and it would be better to split the model into two sub models.

9 - Sources

  • Seagate Technology Holdings plc (STX) Stock Historical Prices & Data - Yahoo Finance
  • 13 Week Treasury Bill (^IRX) Historical Data - Yahoo Finance
  • NASDAQ 100 (^NDX) Historical Data - Yahoo Finance
  • The Leader in Mass Data Storage Solutions | Seagate Italia
  • 2021, Russell Davidson and James G. MacKinnon, Foundations of Econometrics

10 – R code

library(yfR)

library(lmtest)

last_date<-as.Date("2022- 11 - 29")

first_date<-as.Date("2021- 11 - 28")

db_STX <- yf_get(tickers = 'STX', first_date = first_date,

last_date = last_date)

db_NDX <- yf_get(tickers = 'NDX', first_date = first_date,

last_date = last_date)

db_IRX <- yf_get(tickers = '^IRX', first_date = first_date,

last_date = last_date)

#ISOLATING RETURNS

ret_STX<- db_STX$ret_closing_prices

ret_STX<-ret_STX[-1]

ret_NDX <- db_NDX$ret_closing_prices

ret_NDX<- ret_NDX[-1]

ret_IRX<- db_IRX$price_close/

ret_IRX<-ret_IRX[-1]

#COMPUTING THE EXCESS RETURNS

erSTX<-ret_STX-ret_IRX

erNDX<-ret_NDX-ret_IRX

#DATA NORMALIZATION

STX<- db_STX$price_close

NDX <- db_NDX$price_close

Portfolio_STX <- 1:252; 0

for (i in 1:252)

{

Portfolio_STX[i]<- STX[i]/head(STX,1)*100 }

Portfolio_STX

Portfolio_NDX <- 1:252; 0

for (i in 1:252)

{

Portfolio_NDX[i]<- NDX[i]/head(NDX,1)*100 }

Portfolio_NDX

#PLOT