SlideShare a Scribd company logo
UCD Michael Smurfit Business School
FIN40020
Financial Econometrics
Group Project
Macroeconomic effects on the stock market
Chan, Wing Fei 14201368
Kevin Walsh 05595304
Ye, Ying 14203002
Zhou, Xuan 13209238
Zhu, Qing Ying 14203262
Statement
we declare that all material included in this project is the end result of our own work and that
due acknowledgement has been given in the bibliography and references to all sources be
they printed, electronic or personal
3rd December 2014
Macroeconomic effects on the stock market
Page 2 of 60
Contents
CHAPTER 1: INTRODUCTION .....................................................................................................4
1.1 Introduction...........................................................................................................................4
1.2 Motivation...............................................................................................................................5
CHAPTER 2: LITERATURE REVIEW.........................................................................................6
2.1 Introduction...........................................................................................................................6
2.2 Chen, Roll and Ross, (1986).............................................................................................6
2.3 Other important research.................................................................................................8
2.3.1 Shanken and Weinstein (2006) .............................................................................8
2.3.2 Lamont, (2000).............................................................................................................8
2.3.3 Ferson & Harvey, (1993)..........................................................................................8
2.3.4 Cutler, Poterba and Summers, (1989).................................................................9
2.3.5 Mcqueen & Roley, (1993), Boyd, Jagannathan & Hu, (2001) .....................9
2.3.6 Hamilton & Susmelb, (1994)...................................................................................9
2.3.7 Fama, (1981), (1990).............................................................................................. 10
2.3.8 Schwert, (1989) ........................................................................................................ 10
CHAPTER 3: METHODOLOGY .................................................................................................. 11
3.1 Data Collection................................................................................................................... 11
3.2 Data Processing ................................................................................................................. 12
3.3 Methodology....................................................................................................................... 13
3.3.1 Ordinary Least Square............................................................................................ 13
3.3.2 Model Specification.................................................................................................. 13
3.3.3 Autocorrelation......................................................................................................... 16
3.3.4 Heteroskedasticity................................................................................................... 17
3.3.5 Multicollinearity ....................................................................................................... 20
3.3.6 Exogeneity................................................................................................................... 21
Chapter 4: DATA ANALYSIS...................................................................................................... 23
4.1 Descriptive Statistic......................................................................................................... 23
4.2 Model Construction.......................................................................................................... 25
4.3 Preliminary Examination of Regression Residuals ............................................. 27
4.4 Model Specification.......................................................................................................... 30
4.4.1 Information Criterions ........................................................................................... 30
4.4.2 Durbin Watson d Test............................................................................................. 30
4.4.3 Ramsey RESET Test................................................................................................. 31
4.4.4 F-Test ............................................................................................................................ 32
Macroeconomic effects on the stock market
Page 3 of 60
4.5 Description of Empirical Model................................................................................... 33
4.6 Diagnostic Testing............................................................................................................ 34
4.6.1 Autocorrelation......................................................................................................... 34
4.6.2 Heteroskedasticity................................................................................................... 36
4.6.3 Mutlicollinearity ....................................................................................................... 40
4.6.4 Exogeneity................................................................................................................... 43
CHAPTER 5: CONCLUSION........................................................................................................ 44
5.1 Discussions.......................................................................................................................... 44
5.2 Summary of Statistical Analyses................................................................................. 44
5.3 Conclusion ........................................................................................................................... 46
References ....................................................................................................................................... 48
Appendices...................................................................................................................................... 51
Macroeconomic effects on the stock market
Page 4 of 60
CHAPTER 1: INTRODUCTION
1.1 Introduction
The relationship between macroeconomic factors and stock market returns has been a
prominent topic of academic research over the past number of decades. Some financial
theory suggests that macroeconomic variables should systematically affect stock
market returns. Asset prices are commonly believed to react sensitively to economic
news and daily practice seems to support the view that individual asset prices are
influenced by a wide variety of unanticipated events and that some events have a more
prevalent effect on asset prices than do others. Some fundamental macroeconomic
variables such as exchange rate, interest rate, industrial production and inflation have
been argued to be the determinants of stock prices. It is believed that government
financial policies and macroeconomic events have large influence on general economic
activities including the stock market. This has motivated many researchers to
investigate the dynamic relationship between stock returns and macroeconomic
variables
This report sets out to establish how macroeconomic factors affect returns on the S&P
500 Index. We expand on previous research by Chen, Roll and Ross, 1986 by modelling
equity returns as functions of macro-economic variables and asset returns. We ran
Ordinary Least Squares (OLS) regression to test the significance of the economic
variables on the S&P 500 index. To make sure OLS provided a valid result, we had to
insure that the tests were in line with gauss Markov Theorem. We also had to perform
tests to insure that we avoided problems such as model specification, autocorrelation,
heteroskedasticity, mutlicollinearity and exogeneity. In our tests, the S&P500 is our
dependent variable and our independent variables include Monthly industrial
Production, Change in expected Inflation, Unexpected Inflation, Risk Premium, Term
Structure, oil price changes and concumption expenditure. Whilst Chen, Roll and Ross
used data from 1953 - 1978, we used data from 2007 - 2011. Our data sample is 60 and
we used a monthly timeframe. In this paper, we investigate the null hypothesis that each
of the macroeconomic factors is not related to any one of the common stock factors.
Macroeconomic effects on the stock market
Page 5 of 60
Our research will help investors by showing them how macroeconomic factors might
predict the future returns of the S&P 500 Index. It could also provide information to
governments regarding how decisions they make concerning economic policy will
affect the stock market.
1.2 Motivation
Chen, Roll and Ross (1986) state that “A rather embarrassing gap exists between the
theoretically exclusive importance of systematic "state variables" and our complete
ignorance of their identity. The co movements of asset prices suggest the presence of
underlying exogenous influences, but we have not yet determined which economic
variables, if any, are responsible” (Chen, Roll and Ross, 1986)
Our aim was to investigate the effect of macroeconomic determinants on the
performance of the S&P 500 using monthly data over the period from 2007 – 2011 for
seven macroeconomic variables. We used Chen, Roll and Ross’s 1986 model which
determined seven economic variables that could be a source of systematic risk. The
empirical model of our report uses variables including, Monthly industrial Production,
Change in expected Inflation, Unexpected Inflation, Risk Premium, Term Structure,
Oil price and Consumption expenditure.
We believe that Chen, Roll and Ross’s 1986 model is outdated and the results conveyed
by their research could differ over time given the advances in technology and ease of
access of information now, compared with back then. Retesting their model using more
recent data will give investors in the market as well as governments more pertinent
information regarding macroeconomic factors that affect stock prices.
The rest of this paper is organised as follows; Chapter 2 of this report is a Literature
Review, we review past literature on the subject and explain how it corresponds to our
research. Chapter 3 is the Methodology. In this chapter, we then explain the techniques
used to measure unanticipated movements in the proposed variables Chapter 4 reports
the results from our tests and finally Chapter 5 is the Conclusion. This section briefly
summarises our findings and suggests some directions for future research.
Macroeconomic effects on the stock market
Page 6 of 60
CHAPTER 2: LITERATURE REVIEW
2.1 Introduction
The relationship between macroeconomic variables and a developed stock market is
well documented in literature. There is vast amounts of research concerned with the
forces that determine the prices of risky securities, and there are a number of competing
theories of asset pricing. These include the original capital asset pricing models
(CAPM) of Sharpe (1964), Lintner (1965) and Black (1972), the intertemporal models
of Merton (1973), Long (1974), Rubinstein (1976), Breeden (1979), and Cox, J.,
Ingersoll, J., Ross, S. 1985, and the arbitrage pricing theory (APT) of Ross (1976). The
most relevant study relating to our paper is the Chen, Roll and Ross 1986 paper, which
we have based our model on. Chen, Roll and Ross were the first, in a series of studies,
to employ specific macroeconomic factors as proxies for the state variables in the
Arbitrage Pricing Model
2.2 Chen, Roll and Ross, (1986)
This paper tests whether innovations in macroeconomic variables are risks that are
rewarded in the stock market. They note that financial theory suggests that macro-
economic variables such as the spread between long and short interest rates, expected
and unexpected inflation, industrial production, and the spread between high- and low-
grade bonds, should all systematically affect stock market returns The authors believed
however, that there was little research completed regarding which macroeconomic
events are likely to influence all assets.
Tests
The set of variables they used to undertake the tests were, Industrial production,
Inflation, risk premium, the term structure, market indices, consumption and finally oil
prices.
Macroeconomic effects on the stock market
Page 7 of 60
They used a version of the Fama,MacBeth (1973) model to determine whether the
identified economic state variables are related to the underlying factors that explain
pricing in the stock market.
This involved:
 Choosing a sample of assets
 Estimating the assets exposure to the economic state variables by regressing
their returns on the unanticipated changes in the economic variables over an
estimation period
 The resulting estimates of exposure (betas) were used as the independent
variables in 12 cross-sectional regressions, with asset returns for the month
being the dependent variable. This determined the risk premium associated
with the state variable and the unanticipated movement in the state variable for
that month.
 The first two steps were then repeated for each year in the sample. This yielded
a time series of estimates of its associated risk premium for each macro variable.
 The time-series means of these estimates were then tested by a t-test for
significant difference from zero.
Conclusion
They find that these sources of risk are significantly priced and that neither the market
portfolio nor aggregate consumption are priced separately. They also find that oil price
risk is not separately rewarded in the stock market.
Several of the economic variables that they chose to use were found to be significant in
explaining expected stock returns, most notably, industrial production, changes in the
risk premium and twists in the yield curve.
They found that even though a stock market index such as the value-weighted New
York Stock Exchange index, explains a significant portion of the time-series variability
of stock returns, it has an insignificant influence on pricing when compared against the
economic state variables.
Macroeconomic effects on the stock market
Page 8 of 60
They also examined the influence on pricing of exposure to innovations in real per
capita consumption and found that the consumption variable was never significant.
Finally,
Finally they examined the impact of an index of oil price changes on asset pricing and
found no overall effect. They conclude that stock returns are exposed to systematic
economic news, that they are priced in accordance with their exposures, and that the
news can be measured as innovations in state variables whose identification can be
accomplished through simple and intuitive financial theory.
They report that the null hypothesis that each of the macroeconomic factors is not
related to any one of the common stock factors is rejected in every case, except for the
case of inflation.
2.3 Other important research
2.3.1 Shanken and Weinstein (2006)
Shanken and Weinstein (2006) re-examined the pricing of the Chen, Roll, and Ross’s
macro variables and found them to be surprisingly sensitive to reasonable alternative
procedures for generating size portfolio returns and estimating their betas. They
concluded that Industrial Production was the only significant economic factor that
affects stock markets.
2.3.2 Lamont, (2000)
Lamont,(2000), seeks to identify priced macro factors by determining whether a
portfolio Constructed to track the future path of a macro series earns positive abnormal
returns. He concludes that portfolio’s that track the growth rates of Industrial
Production, Consumption and Labour Income, earn abnormal positive returns. While
the portfolio that tracks the Consumer Price Index does not.
2.3.3 Ferson & Harvey, (1993)
Ferson & Harvey, 1993 investigate the predictability in national equity market returns,
and its relation to global economic risks. They show how to consistently estimate the
Macroeconomic effects on the stock market
Page 9 of 60
fraction of the predictable variation that is captured by an asset pricing model for the
expected returns. They used a model in which conditional betas of the national equity
markets depend on local information variables, while global risk premia depend on
global variables. They examined single and multiple-beta models, using monthly data
for 1970 to 1989. They found that models can capture much of the predicted variation
in a sample of returns for 18 countries.
2.3.4 Cutler, Poterba and Summers, (1989)
Cutler, Poterba & Summers, 1989 examined the extent to which ex-post movements in
aggregate stock prices could be attributed to the arrival of news. They examined the
fifty largest one-day returns on the S&P 500 index over the period from 1946 through
1987. They found that Industrial Production Growth is significantly positively
correlated with real stock returns over the period 1926 – 1986 but not in the 1946 –
1985 sub period. They also found that Inflation, money supply and long-term interest
rates did not affect stock returns.
2.3.5 Mcqueen & Roley, (1993), Boyd, Jagannathan & Hu, (2001)
There are studies that suggest that surprise announcements about macroeconomic
factors may yield different results depending on the period of the business cycle that
we are currently in. Mcqueen and Roley, 1993 suggest that an increase in employment
may be a bullish sign as the economy emerges from a recession but may be a bearish
sign near a cyclical peak. Boyd, Jagannathan and Hu, 2001 also prescribe to this theory.
They examined the impact of surprise unemployment announcements on the S&P 500
over the 1948 – 1995 period. They conclude that high surprise unemployment raises
stock prices during an economic expansion but lowers stock value during a contraction.
2.3.6 Hamilton & Susmelb, (1994)
Hamilton & Susmelb, 1994 found that extremely large shocks, such as the October
1987 crash, arise from different causes and have different consequences for subsequent
volatility than small shocks. They explore this possibility with U.S. weekly stock
returns, allowing the parameters of an ARCH process to come from one of several
Macroeconomic effects on the stock market
Page 10 of 60
different regimes, with transitions between regimes governed by an unobserved
Markov chain. They estimate models with two to four regimes in which the latent
innovations come from Gaussian and Student f distributions. They conclude that macro
conditions significantly affect equity returns.
2.3.7 Fama, (1981), (1990)
A study of the relationships between stock prices and real activity, inflation, and money
conducted by Fama in 1981 shows a strong positive correlation between common stock
returns and real variables. Another study by Fama, 1990 argues that because equity
prices reflect expected future cash flows, equity price changes should predict future
macro conditions.
2.3.8 Schwert, (1989)
Schwert, 1989 analyses the relation of stock volatility with real and nominal
macroeconomic volatility, economic activity, financial leverage, and stock trading
activity using monthly data from 1857 to 1987. He found that financial asset volatility
helps to predict future macroeconomic volatility
And finally Adebiyi et al. (2009) found that there was a causal relationship between oil
price shocks and real exchange rates, to stock prices.
As can be seen from the above literature review, there have been many contradictory
studies regarding the topic. We hope that our tests can provide some clarity to the issue
and encourage further research regarding macroeconomic factors effect on stock
returns.
Macroeconomic effects on the stock market
Page 11 of 60
CHAPTER 3: METHODOLOGY
In this section, we will be clarifying the data collection and the methodology used in
this paper. Our main objective is to examine the relationship between various
macroeconomic factors and S&P 500 stock index. We are using ordinary least square
to run regression analysis, and a few diagnostic tests are carried out to make sure our
linear regression model is in line with Gauss–Markov theorem. In order to compute this
regression model, software from MathWork is adapted in our paper: MATLAB.
3.1 Data Collection
Secondary data was collected for the following analysis. Historical closing price of
S&P 500 stock index and macroeconomic variables data were obtained from Thomson
Reuters Datastream. We are reexamining the same model from Chen, Roll, and Ross
(1986) and applying it to recent data. The data collected covered a 5 year period, starting
from January 2007 to December 2011 in a monthly frequency with a total of 60
observations.
Table 3.1 Definitions of Variables
Symbol Variable Definition (Data stream: source code)
I Inflation
Log Relative of U.S. Consumer Price Index
(USCONPRCE)
TB
Treasury-Bill
Rate
US T-BILLS BID YLD 1M (TRUS1MT)
LGB
Long-Term
Government
Bonds
US TREASURY YIELD ADJUSTED TO
CONSTANT MATURITY - 20 YEAR
(USGBOND.)
IP
Industrial
Production
US INDUSTRIAL PRODUCTION - TOTAL
INDEX (USIPTOT.G)
Macroeconomic effects on the stock market
Page 12 of 60
Baa
Low-Grade
Bonds
US CORP BONDS MOODYS SEASONED
BAA (D) - MIDDLE RATE
(FRCBBAA)
OG Oil Prices
Log Relative of US PPI - CRUDE
PETROLEUM (USPCIPCOF)
S&P
S&P Composite
Index
S&P 500 COMPOSITE - PRICE INDEX
(S&PCOMP)
EXP
Consumption
Expenditures
US PERSONAL CONSUMPTION
EXPENDITURES (AR) CURA (USPERCONB)
3.2 Data Processing
After we collected the data we needed from the reliable data source, Thomson Reuters
Datastream. We rearranged it to transform it into the variables we needed to run the
Chen, Roll, and Ross (1986) model. The formulas for data transformation can be
observed in Table 3.2
Table 3.2 Data processing
Symbol Variable Derived Series
S&P S&P composite index -
MP
Monthly Industrial
Production
ln[𝐼𝑃(𝑡)/𝐼𝑃(𝑡 − 1)]
DEI
Change in Expected
Inflation
E[I(t + 1)|t] - E[I(t)|t - 1]
UI Unexpected Inflation I(t) - E[I(t)|t - 1]
UPR Risk Premium Baa(t) - LGB(t)
UTS Term Structure LGB(t) - TB(t - 1)
OP Oil prices 𝑙𝑛 [𝑂𝑃(𝑡)/𝑂𝑃(𝑡 − 1)]
EXP
Personal Consumption
Expenditures
𝑙𝑛 [𝐸𝑋𝑃(𝑡)/𝐸𝑋𝑃(𝑡 − 1)]
Macroeconomic effects on the stock market
Page 13 of 60
3.3 Methodology
3.3.1 Ordinary Least Square
Ordinary least square (OLS) is a method that generates the estimators, which minimize
the squared distance between the regression value and the real value, for the regression
model (Leng, Zhang, Kleinman and Zhu, 2007). Moreover, “The so-called Gauss-
Markov theorem states that under certain conditions, least-squares estimators are ‘best
linear unbiased estimators’ (BLUE), ‘best’ meaning having minimum variance in the
class of unbiased linear estimators”. Furthermore, the certain conditions are: First, the
regressand can be calculated by the linear function of regressors; second, the mean of
the disturbance term is zero; third, the variance of the disturbance term is constant;
fourth, the covariance of the disturbance term is zero; fifth, the distribution of residuals
of the regression model should be normal. However, even if the residuals are not
normally distributed, it will not affect the accuracy of regression results. Lastly, the
independent variables are non-stochastic (Chipman, 2011).
3.3.2 Model Specification
According to our analysis, under the Gauss-Markov theorem, the classical linear
regression model should have accurate variables and the form of function.
3.3.2.1 Akaike & Schwarz Information Criteria
The Akaike information criterion (AIC) is defined as:
AIC = 2K − 2 ln(L)
Where K is the number of parameters, L is the function of maximum likelihood. AIC
suggests that the best model is the one that fits data well without over fitting. Therefore,
the regression model with the smallest AIC is the best fitting model (Bozdogan, 2000).
Macroeconomic effects on the stock market
Page 14 of 60
The Schwarz information criterion, which is also named Bayesian Information
Criterion (BIC), is defined as:
BIC = −2 ln(L) + ln(n)K
Where K is the number of parameters, L is the function of maximum likelihood and n
is the sample size. Similar to AIC, BIC is the method to find the model that can fit the
data best, the smaller the BIC, the better the model (Liddle, 2007).
3.3.2.2 Durbin Watson D Test
Durbin Watson test (DW) is a method to test the autocorrelation. Assuming that the
error term of a regression model can be described as:
Ut = ρUt−1 + ε
If ρ equals 0, then the model does not have autocorrelations. We can use the d value to
test the null hypothesis, which assumes that ρ equals 0. The d value of DW test is
defined as:
d = ∑(Ut − Ut−1)2
/ ∑ Ut
2
≈ 2(1 − ρ)
The d values range from 0 to 4. If the value of d closes to 4 or 0, then the disturbance
terms of the model have negative or positive correlation respectively (Femenias, 2005),
which means that essential variables are omitted.
3.3.2.3 Ramsey Reset Test
“The reset test proposed by Ramsey is a general misspecification test, which is designed
to detect both omitted variables and inappropriate function form. The reset test is based
on the Lagrange Multiplier principle and usually performed using the critical values of
the F-distribution (Schukur and Mantalos, 2004). Specially, in a reset test, the null
Macroeconomic effects on the stock market
Page 15 of 60
hypothesis is that the regression model is a specification model. Considering the
following function:
y = ∂x + γ1ŷ2
+ ⋯ + γk−1ŷk
+ ϵ
By using the F-test, if the value of γn is significantly different from zero, which
indicates that the non-linear regressors can affect the regressand, the model is a
misspecification model (Ramsey, 1969).
3.3.2.4 Davidson & Mackinnon Test
The Davidson and Mackinnon J test is an approach to choose the best model among
non-nested competing models by building a new nested model, which includes all non-
nested models. For example, yn is the value calculated by model A and zn is the value
calculated by model B. Then use the yn and znas variables and add them into a new
model C. Moreover, use F test to test the statistically significant of the coefficient of
ynandzn. Assuming that the coefficient of yn and zn are β and α respectively, then the
following conclusions can be draw: If β is significantly different from 0 and α is not
significantly different from 0, then we choose model A; If β is not significantly different
from 0 but α is significantly different from 0, then model B is better than model A; If
both coefficients are significantly different from 0 (or not), then the J test cannot give
a specific answer (Davidson and Mackinnon, 1981). Furthermore, the J test is not
appropriate for small sample, under which the J test may reject the null hypothesis when
it is true (Godfrey and Pesaran, 1983).
3.3.2.5 Jarque-Bera Test
Jarque-Bera test is a method to test whether the sample is normally distributed.
Specially, the skewness and kurtosis of a normal distribution are equal to 0 and 3
respectively. Therefore, the closer the skewness and kurtosis of sample distribution to
0 and 3respectively, the closer the sample distribution to the normal distribution. The
JB test is defined as:
JB =
n
6
(s2
+
1
4
(k − 3)2
)
Macroeconomic effects on the stock market
Page 16 of 60
Where n is the sample size, K is the Kurtosis, S is the Skewness. The JB statistic is
asymptotic to a chi-squared distribution if the sample is derived from a normally
distributed population. The null hypothesis of JB test is that the sample is normally
distributed. The rejection of the null hypothesis means that the distribution of sample
is not normally distributed (Jarque and Bera, 1980).
3.3.3 Autocorrelation
Autocorrelation is the disturbance terms of a regression model correlated to each other.
Under the autocorrelation, the estimators of the model are still un-biased and consistent,
but they may not be efficient any more (Brindley, 2008).
3.3.3.1 Durbin-Watson Test
As shown in the model specification section, Durbin Watson test (DW) is a method to
test the autocorrelation and the d values of the DW test range from 0 to 4. Moreover,
there is an upper bound (du)and a lower bound (dl) in the test. If4 − dl < d < 4,
or0 < d < dl, the model has serial correlation. Ifdu < d < 4 − du, the disturbance
terms do not correlate with each other. Otherwise, the d test cannot provide an answer
(Femenias, 2005).
3.3.3.2 Breusch-Godfrey Test
The Breusch-Godfrey test is a more powerful test for examining serial correlation than
the Durbin Watson test, since it can be used on autoregressive model and to test higher
order autocorrelation. The null hypothesis of the B-G test is that there is no serial
correlation, under which the distribution of (n − p)R2is asymptotic to a chi-squared
distribution. The rejection of the null hypothesis indicates that there is serial correlation
(Breusch, 1978 and Godfrey, 1978).
Macroeconomic effects on the stock market
Page 17 of 60
3.3.3.3 Remedies
If the autocorrelation is caused by model misspecification, then we can specify the
model and avoid the autocorrelation. If not, we can continue to use the OLS model or
use some remedial models. This paper considers two remedial methods: The Cochrane-
OrcuttAR(1) adjusted OLs regression and the heteroskedasticity and autocorrelation
consistent standard errors, define as following:
Cochrane–Orcutt Estimation
If an OLS model has autocorrelation, then the model is not appropriate to be used. In
this situation, the generalized least square (GLS) model can be used to substitute the
OLS model and avoid the autocorrelation.
Newey-West Estimator
If the autocorrelation cannot be eliminated, then the heteroskedasticity and
autocorrelation (HAC) consistent standard errors, which is introduced by Newey
(1986), can be used to solve the problem of autocorrelation and heteroskedasticity.
3.3.4 Heteroskedasticity
3.3.4.1 Preliminary Examination of the Residuals
We test the normality of residuals using the following 2 methods:
Informal Method: Histogram and Q-Q Plot
Histogram is a graphical representation of the distribution of data and is an estimate of
the probability distribution of a continuous variable.
Macroeconomic effects on the stock market
Page 18 of 60
Q–Q plot is a graphical method for comparing two probability distributions by plotting
their quintiles against each other. If the two distributions being compared are similar,
the points in the Q–Q plot will approximately lie on the line y = x.
Formal Method: Jarque-Bera Test
The Jarque–Bera test is a goodness-of-fit test of whether sample data have the skewness
and kurtosis matching a normal distribution:
JB is defined as:
Where n is the number of observations (or degrees of freedom in general); S is the
sample skewness, and K is the sample kurtosis.
In order to test whether they’re heteroskedasticity in the residuals, we use following
three methods:
3.3.4.2 Goldfeld-Quandt Test
Goldfeld–Quandt test is a method used to check for homoscedasticity in regression
model (Thursby, 1982), and there are 4 steps:
Step 1. Order the observations, Y, according to the value of X, beginning with the
lowest of the X values.
Step 2.Omit c central observations (c = (1/5)*n). Remaining two groups of (n-c)/2
observations.
Step 3. Compute the residual sum of squares from the 1st and 2nd groups
Step 4. Compute the ratio Lambda = [RSS2/df]/ [RSS1/df], where df = [(n-c)/2]-k, k is
the number of parameters to be estimated in each regression including the intercept, n
is the sample size.
Macroeconomic effects on the stock market
Page 19 of 60
Under the 5% significance level, if the p-value is larger than 0.05, we accept the null
hypothesis that the residuals in the population regression function are homoscedastic.
Otherwise, we accept the alternative hypothesis that the residuals in the population
regression function are heteroskedastic.
3.3.4.3 White’s General Heteroscedasticity Test
Is easier to implement and does not rely on the normality assumption, it also follows 4
steps (Koenker and Bassett, 1982):
Step 1. Estimate the linear regression model.
Step 2. Obtain the R2 from the auxiliary regression.
Step 3. Under the null of homoskedasticity it can be shown that
n. 𝑅2
~𝑥 𝑑𝑓
2
Step 4. If one rejects the null hypothesis then there is heteroskedasticity at the selected
confidence level.
3.3.4.4 Breusch Pagan Heteroscedasticity Test
This test follows the simple three-step procedure:
Step 1: Apply OLS in the model and compute the regression residuals.
Step 2: Perform the auxiliary regression
Step 3: The test statistic is the result of the coefficient of determination of the auxiliary
regression in Step 2 and sample size with:
The test statistic is asymptotically distributed as 𝜒2
(𝑝 − 1) under the null hypothesis
of homoscedasticity (Lyon and Tsai, 1996).
Macroeconomic effects on the stock market
Page 20 of 60
3.3.5 Multicollinearity
Because there are multiple predictors in our model, if these predictors are correlated
and give redundant information, in other words, the model input variables are not
independent of one another: 𝑥𝑖 ≈ ∑ 𝑥𝑖𝑗≠𝑖 𝛼𝑗.
Perfect model:
𝜆1 𝑋1 + 𝜆2 𝑋2 + ⋯ + 𝜆𝐽 𝑋𝑗 = 0
Less than perfect:
𝜆1 𝑋1 + 𝜆2 𝑋2 + ⋯ + 𝜆𝐽 𝑋𝑗 + 𝜈𝑖 = 0
Multicollinearity has a strong effect on the size of the regression coefficients, and
sometimes it can cause coefficients to have opposite signs. The reason for the event of
multicollinearity problem could lead to the wrong usage of dummy variables for an
equation or including a similar variable which is highly correlated (Gujariti & Porter,
2009). In this section, these methods are used:
1. Variance Inflation Factor (VIF).
2. Tolerance (TOL).
3. Condition Indices (CI)
3.3.5.1 Variance Inflation Factor (VIF)
As we know, the variance of an OLS estimator is:
Var(𝛽𝑖
̂) =
𝜎2
∑(𝑥𝑖 − 𝑥̅)2 (
1
1 − 𝑅𝑖
2)
Where𝛽𝑖
̂is the partial regression coefficient of 𝑥𝑖 and 𝑅𝑖
2
is the R2
in the regression of
𝑥𝑖on the remaining (K-2) regressors.
The variance inflation factor, or VIF, is a measure of the multicollinearity of a given
predictor variable. For a variable i, the VIF is calculated by computing the R2
from a
regression with i and all other predictor variables. The function is:
Macroeconomic effects on the stock market
Page 21 of 60
𝑉𝐼𝐹𝑖 =
1
1 − 𝑅𝑖
2
Larger values of VIF indicate more multicollinearity. In other words, the larger the
VIF, the larger the standard error of the regression coefficient for variable i.
The tolerance is another measure of the multicollinearity for a given variable i.
3.3.5.2 Tolerance (TOL)
The inverse of the VIF is called tolerance (TOL).
𝑇𝑂𝐿𝑖 =
1
𝑉𝐼𝐹𝑖
The smaller the tolerance, the larger the standard error of the regression coefficient
for variable i. In other words, smaller values of tolerance indicate more
multicollinearity.
3.3.5.3 Condition Indices (CI)
And the Condition indices are computed by finding the eigenvalues of the correlation
matrix of the variables in the study. It gives an estimate of multicollinearity for each
successive eigenvalue:
𝐶𝐼𝐼 = √
𝜆 𝑚𝑎𝑥
𝜆𝑖
High variance decomposition proportions (>0.5) for two or more estimated regression
coefficient variances corresponding to the same small singular value associated with
each high condition index will identify the covariates involved in the corresponding
dependency.
3.3.6 Exogeneity
A variable is endogenous when there is a correlation between the parameter or variable
and the error term. endogeneity can arise as a result of measurement error,
autoregression with autocorrelated errors, simultaneity and omitted variables. Broadly,
Macroeconomic effects on the stock market
Page 22 of 60
a loop of causality between the independent and dependent variables of a model leads
to endogeneity.
3.3.6.1 Hausman Test
Here we use Hausman Test to test whether the factors are endogenous explanatory
variables or not. And we have:
H0: Factor is endogenous explanatory variables.
H1: Factor is endogenous explanatory variables.
A simple related test for endogeneity is the Hausman test. Under the null we consider
the model:
y = xβ + 𝜀
Under the alternative we consider the augmented model:
y = xβ + 𝛾𝑥̂∗
+ 𝜀∗
Where x̂∗
are k* the explanatories under suspicion causing endogeneity approximated
by their estimates using the instruments.(k* is the number of explanatories which are
under consideration wrt endogeneity)
The idea is that under the null hypothesis of no endogeneity, x̂∗
represent irrelevant
additional variable, so γ=0.
Under the alternative the null model yields biased estimates. The test statistics is a
common F-test with K*and (n-K0-k*) degrees of freedom, where the restricted model
(under the null γ=0) is tested against the unrestricted (alternative) one. ( K0 is the
number of explanatories which are not under consideration wrt endogeneity) (Hahn,
Ham, and Moon, 2011).
Important to note: The test depends essentially on the choice of appropriate instruments.
Macroeconomic effects on the stock market
Page 23 of 60
Chapter 4: DATA ANALYSIS
In this section, we will be reviewing the descriptive statistic. Model specification test,
ordinary least square results and the diagnostic test were conducted to check whether
our model in-line with the OLS assumption and the Gauss–Markov theorem.
4.1 Descriptive Statistic
Table 4.1 below shows the descriptive statistics of each variable we have collected. But
the figures from different variables have a small divergence, as some of the variables
are transformed into natural logarithm form. As we can see the p-value from Jarque-
Bera test in the table, DEI and OP are normally distributed at the significant level of
5%.
Table 4.1: Summary Stats of Variables
Variable
s
Mean
Media
n
Mode Range
Std.Dev
.
Varianc
e
Skewnes
s
Kurtosi
s
JB.Stat
.
JB.P.Valu
e
SNP
-
0.001
9
0.0143
-
0.314
9
0.489
1
0.0715 0.0051 -1.4524 8.3628 92.993 1.00E-03
MP
-
5.91E-
04
0.0013 -0.043
0.058
5
0.0098
9.57E-
05
-1.8886 8.2779 105.31 1.00E-03
DEI
0.001
9
0.0019
0.001
8
1.16E-
04
3.43E-
05
1.17E-
09
-5.30E-
13
1.7993 3.604 0.0879
UI
0.009
1
0.0057
-
0.007
9
0.052
8
0.0132
1.74E-
04
1.0693 3.4334 11.904 0.0111
UPR
2.400
2
2.18 1.83 4.19 0.971 0.9428 1.6589 4.9923 37.442 1.00E-03
UTS
2.938
5
3.432 -0.245 4.737 1.459 2.1288 -0.9326 2.4853 9.3588 0.0178
OP
5.371
6
5.378
5.059
4
1.398
6
0.3075 0.0946 -0.6609 3.4221 4.8128 0.055
EXP
0.002
2
0.0034
-
0.013
3
0.026
1
0.0045
1.98E-
05
-1.5028 6.2741 49.383 1.00E-03
Figure 4.1 below shows the line graphs of each variable. As we can see some of the
variables have a trend pattern, which is violating the standard statistical assumptions
(e.g. CLRM assumptions). We need stationary data in the OLS model in order to obtain
more reliable results. Transformation of data is being used to solve this problem, we
tried first differencing on the data and realised minor trends could still be observed from
the graph (Figure 4.2), so we used second differencing of data to obtain stationary data,
as shown in Figure 4.3.
Macroeconomic effects on the stock market
Page 24 of 60
Figure 4.1: Line Graph of Variables
Figure 4.2: Line Graph of First Differencing Variables
Macroeconomic effects on the stock market
Page 25 of 60
Figure 4.3: Line Graph of Second Differencing Variables
4.2 Model Construction
After transforming the data to become stationary by using second differencing, we ran
an OLS regression with the second differencing dependent variable (ddSNP) against all
the other second differenced independent variables (Table 4.2). We found that ddDEI
and ddURP are highly insignificant, especially ddDEI with abnormal coefficient. We
decided to formulate a restricted model without these two independent variables, ddDEI
and ddURP, as shown in Table 4.3. As we can see from the result of the restricted
model, its adjusted R-square is higher than the unrestricted model.
Macroeconomic effects on the stock market
Page 26 of 60
Table 4.2: OLS Regression Result of Unrestricted Model
Ordinary Least-squares Estimates
R-squared = 0.3405
Rbar-squared = 0.2482
sigma^2 = 0.0254
Durbin-Watson = 3.3708
Nobs, Nvars = 58, 8
***************************************************************
Variable Coefficient t-statistic t-probability
Cons -0.001362 -0.065003 0.948431
ddMP -2.961828 -2.120907 0.038911
ddDEI 2.27378E+13 1.025358 0.31013
ddUI -10.754665 -1.255579 0.215105
ddURP -0.020966 -0.319217 0.750892
ddUTS 0.096338 2.183662 0.033706
ddOP 0.267986 1.353807 0.181886
ddEXP 5.84429 2.02636 0.048079
Table 4.3: OLS Regression Result of Restricted Model
Ordinary Least-squares Estimates
R-squared = 0.3252
Rbar-squared = 0.2603
sigma^2 = 0.0250
Durbin-Watson = 3.3956
Nobs, Nvars = 58, 6
***************************************************************
Variable Coefficient t-statistic t-probability
Cons -0.001386 -0.06669 0.947085
ddMP -2.539738 -2.211562 0.031416
ddUI -9.919002 -1.383805 0.17233
ddUTS 0.105221 2.63457 0.011073
ddOP 0.223601 1.177789 0.244243
ddEXP 4.290565 1.754197 0.085288
The adjusted R-square of the restricted model is higher, and we suspect that the
unrestricted model has less explanation power for the data. But the result we get from
the Wald F-test (Table 4.4) shows that we have no evidence to reject the restrictions as
inconsistent with the data.
Macroeconomic effects on the stock market
Page 27 of 60
Table 4.4: Wald F-test on Restricted and Unrestricted Model
Wald F-test
f-statistic f-probability
0.5796 0.5639
4.3 Preliminary Examination of Regression Residuals
By looking at the graph of residuals for the restricted and unrestricted model (Figure
4.4, and Figure 4.5), we can see that they are fluctuating around the mean of zero, we
assume that they are stationary.
Figure 4.4: Line Graph of the Residuals for Unrestricted Model
Macroeconomic effects on the stock market
Page 28 of 60
Figure 4.5: Line Graph of the Residuals for Restricted Model
For the normality testing of residuals, we used the Jarque-Bera test on the residuals of
the restricted and unrestricted model. By looking at the histograms of the residuals, we
observe that it is not fully normal distributed. But the result from the Jarque-Bera test
shows that we have no evidence to reject the null hypothesis, which is the residuals are
normal distributed.
Macroeconomic effects on the stock market
Page 29 of 60
Figure 4.6: Normality Test of the Residuals for Unrestricted Model
Jarque-Bera statistic = 4.1248 Jarque-Bera Probability = 0.0706
Figure 4.7: Normality Test of the Residuals for Restricted Model
Jarque-Bera statistic = 2.3255 Jarque-Bera Probability = 0.1834
Macroeconomic effects on the stock market
Page 30 of 60
4.4 Model Specification
4.4.1 Information Criterions
In this section, we are using Akaike Information Criterion (AIC) and Schwarz
Information Criterion (SIC) to compare the restricted and unrestricted model. In Table
4.5, we can see that the AIC and the SIC value for the unrestricted Model is lower,
which shows that the Unrestricted Model is a better fitting model.
Table 4.5: Information Criterions
Unrestricted Model Restricted Model
AIC = -3.6208 SIC = -3.3764 AIC = -3.6645 SIC = -3.4900
4.4.2 Durbin Watson d Test
We are using Durbin Watson d Test to test for an omitted variable. Firstly, we try to
test the ddDEI variable, as it shows insignificant in our Unrestricted Model OLS result
and its coefficient is abnormally high. In this section, we try to see whether ddDEI is
captured by the residuals, when we removed it in our OLS regression. In Table 4.6, the
results show that we could not reject the null hypothesis at 1% significant level, it means
ddDEI do not get captured by the residuals, hence it is not an omitted variable, and we
decided to drop this variable.
Table 4.6: Test for ddDEI as Omitted Variable
Durbin Watson d Value = 2.3617
𝑑𝑙 = 1.382 𝑑 𝑢 = 1.449 4 − 𝑑 𝑢 = 2.5510 4 − 𝑑𝑙 = 2.6180
Besides this, we performed the same test on ddURP, as it shows highly insignificant in
the OLS regression as well. From Table 4.7, the result shows that we could not reject
Macroeconomic effects on the stock market
Page 31 of 60
the null hypothesis at the 1% significant level, which means ddURP is not an omitted
variable, and we decided to drop this variable as well.
Table 4.7: Test for ddURP as Omitted Variable
Durbin Watson d Statistic = 2.0254
𝑑𝑙 = 1.382 𝑑 𝑢 = 1.449 4 − 𝑑 𝑢 = 2.5510 4 − 𝑑𝑙 = 2.6180
4.4.3 Ramsey RESET Test
In this part, we are testing the adequate of functional form for our model, by testing
linear against quadratic and cubic functional form. From the Table 4.8, we can see that
𝑦̂ 2
is not significant, which mean quadratic functional form is not significant in our model.
And from the Table 4.9, we can see that the 𝑦̂ 3
is not significant as well, cubic functional form
is not significant in our model.
Table 4.8: Testing Against Quadratic Functional Form
Ordinary Least-squares Estimates
R-squared = 0.3374
Rbar-squared = 0.2595
sigma^2 = 0.0250
Durbin-Watson = 3.3789
Nobs, Nvars = 58, 7
***************************************************************
Variable Coefficient t-statistic t-probability
Cons -0.010817 -0.471317 0.639424
ddMP -2.097688 -1.696905 0.09581
ddUI -9.860284 -1.374773 0.175212
ddUTS 0.111505 2.754326 0.008132
ddOP 0.236281 1.24093 0.22031
ddEXP 3.857029 1.550377 0.127235
𝑦̂ 2 0.883846 0.969647 0.336799
Macroeconomic effects on the stock market
Page 32 of 60
Table 4.9: Testing Against Cubic Functional Form
Ordinary Least-squares Estimates
R-squared = 0.3687
Rbar-squared = 0.2803
sigma^2 = 0.0243
Durbin-Watson = 3.3436
Nobs, Nvars = 58, 8
***************************************************************
Variable Coefficient t-statistic t-probability
Cons -0.007205 -0.316823 0.752697
ddMP -1.035063 -0.742774 0.461094
ddUI -4.501316 -0.57347 0.568897
ddUTS 0.053503 0.984516 0.329602
ddOP 0.195311 1.030586 0.307695
ddEXP 3.366096 1.361456 0.179473
𝑦̂ 2 0.422823 0.447318 0.656578
𝑦̂ 3 6.324238 1.572559 0.122128
4.4.4 F-Test
By performing F-Test, we can see that the F Statistic is lesser than the critical value of
2.88334, as shown in Table 4.10. We can conclude that there is no problem in functional
form of our model.
Table 4.10: Result of F-Test
𝐹 = ((𝑅 𝑛𝑒𝑤
2
− 𝑅 𝑜𝑙𝑑
2
)/𝑘)/(
1 − 𝑅 𝑛𝑒𝑤
2
𝑛 − 𝑝
)
F Statistic = 1.3377 ; Critical Value = 2.88334
Where,
n = the sample size
k = the number of new regressors
p = the no. of parameters in the new model
Macroeconomic effects on the stock market
Page 33 of 60
4.5 Description of Empirical Model
After we confirmed the model specification, we ended up with an empirical model as
follows:
ddSNP = 𝛼 + 𝛽(ddMP) + 𝛽(ddUI) + 𝛽(ddUTS) + 𝛽(ddOP) + 𝛽(ddEXP) + ε
ddSNP = S&P index (second differenced)
ddMP =Monthly Industrial Production (second differenced)
ddUI = Unexpected Inflation (second differenced)
ddUTS = Term Structure (second differenced)
ddOP = Oil Price (second differenced)
ddEXP = Consumption Expenditures (second differenced)
Furthermore, Table 4.11 below shows the results of OLS regression of the Empirical
model. We can see that ddMP, ddUI, and ddUTS is significant at 5% significant level;
in contrast, ddOP and ddEXP is not significant at 5% significant level. The R-squared
is 0.3253. This means that 32.52% of the variation of ddSNP can be explained by the
model.
Table 4.11: OLS Regression of Empirical Model
Ordinary Least-squares Estimates
R-squared = 0.3252
Rbar-squared = 0.2603
sigma^2 = 0.0250
Durbin-Watson = 3.3956
Nobs, Nvars = 58, 6
***************************************************************
Variable Coefficient t-statistic t-probability
Cons -0.001386 -0.06669 0.947085
ddMP -2.539738 -2.211562 0.031416
ddUI -9.919002 -1.383805 0.17233
ddUTS 0.105221 2.63457 0.011073
ddOP 0.223601 1.177789 0.244243
ddEXP 4.290565 1.754197 0.085288
Macroeconomic effects on the stock market
Page 34 of 60
After we ran the OLS regression, we got the coefficients for each variable and we
substituted it into the Empirical Model, as follows:
ddSNP = −0.001386 + (−2.539738)(ddMP) + (−9.919002)(ddUI)
+ (0.105221)(ddUTS) + (0.223601)(ddOP) + (4.290565)(ddEXP)
+ ε
We can interpret this result as: when there is one unit increase in ddMP, ddSNP will
decrease by 2.54. While one unit decreases in ddUI, there will be increase of 10 units
in ddSNP, vice versa. ddSNP will be increased by 0.1053 units when ddUTS increase
by one unit. When ddOP increases by one unit, ddSNP increases by 0.2236 units. While
if ddEXP increases by one unit, ddSNP will increase by 4.3 units. All interpretations
here are assuming ceteris paribus.
4.6 Diagnostic Testing
4.6.1 Autocorrelation
To determine whether there is serial correlation of error term in our model, we have
used the Durbin-Watson test and Breusch-Godfrey Test.
4.6.1.1 Durbin-Watson Test
We obtained the Durbin-Watson Value from the OLS regression, the result shown in
Table 4.12. We have to reject the null hypothesis of the Durbin-Watson test. The
result shows that we have a negative autocorrelation problem in our model.
Table 4.12: Durbin-Watson Test
Durbin-Watson Value = 3.3956
𝑑𝑙 = 1.248 𝑑 𝑢 = 1.598 4 − 𝑑 𝑢 = 2.4020 4 − 𝑑𝑙 = 2.7520
Macroeconomic effects on the stock market
Page 35 of 60
4.6.1.2 Breusch-Godfrey Test
From the result of Table 4.13, we can see that theε 𝑡−1,ε 𝑡−2 and ε 𝑡−3 are significant at
1% level. We can conclude that there is serial autocorrelation in our model.
Table 4.13: Breusch-Godfrey Test
Ordinary Least-squares Estimates
R-squared = 0.6675
Rbar-squared = 0.6132
sigma^2 = 0.0088
Durbin-Watson = 2.2930
Nobs, Nvars = 58, 9
***************************************************************
Variable Coefficient t-statistic t-probability
Cons 0.002653 0.2147 0.830892
ddMP -0.780689 -1.13398 0.26232
ddUI 7.30608 1.614222 0.112901
ddUTS 0.019732 0.798857 0.428229
ddOP -0.099815 -0.869827 0.388636
ddEXP -2.269455 -1.525207 0.133637
ε 𝑡−1 -1.107859 -8.764289 0
ε 𝑡−2 -0.825458 -4.670847 0.000024
ε 𝑡−3 -0.560972 -4.19637 0.000114
4.6.1.3 Remedy
Cochrane–Orcutt Estimation
We solve the autocorrelation problem by transforming the model to Generalised least
Squares, which is Cochrane-Orcutt AR(1) adjusted OLS regression as shown in Table
4.14. The result shows that the Durbin-Watson Statistic is closer to 2. Besides, the R-
squared is obviously higher, and the ddEXP is significant at 5% significant level in this
transformation model.
Macroeconomic effects on the stock market
Page 36 of 60
Table 4.14: Cochrane–Orcutt Estimation
Cochrane-Orcutt serial correlation Estimates
R-squared = 0.4636
Rbar-squared = 0.4110
sigma^2 = 0.0119
Durbin-Watson = 2.4772
Rho estimate = -0.7418
Rho t-statistic = -8.2781
Rho probability = 0.0000
Nobs, Nvars = 57, 6
***************************************************************
Iteration information
rho value convergence iteration
-0.700337 0.700337 1
-0.740943 0.040606 2
-0.741803 0.00086 3
-0.741819 0.000016 4
***************************************************************
Variable Coefficient t-statistic t-probability
Cons -0.00092 -0.110928 0.912109
ddMP -3.872029 -3.714257 0.000506
ddUI -13.932701 -3.137159 0.002832
ddUTS 0.072536 2.324864 0.024097
ddOP 0.243548 1.585996 0.118922
ddEXP 5.776322 2.383445 0.020913
4.6.2 Heteroskedasticity
4.6.2.1 Preliminary Examination of the Residuals
We test the normality of residuals using the following 2 methods:
Informal Method: Histogram and Q-Q Plot
Here we compare the residuals’ distribution of our regression model and residuals’
distribution of random normal. And find that residuals of both two regression models
follow normal distribution as shown in Figure 4.8.
Macroeconomic effects on the stock market
Page 37 of 60
Figure 4.8: Graphs of the Residuals
OLS Residuals OLS Residuals^2
Normal rand Normal rand^2
From the Figure 4.9, we can see from the figure that, both of two lines lie approximately
on the line y=x. So, we conclude that residuals of both the regression models follow
normal distribution.
5 10 15 20 25 30 35 40 45 50 55
-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
OLSResiduals
5 10 15 20 25 30 35 40 45 50 55
0
0.05
0.1
0.15
0.2
0.25
OLSResiduals2
5 10 15 20 25 30 35 40 45 50 55
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
Normalrand2
5 10 15 20 25 30 35 40 45 50 55
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
Normalrand
-0.5 0 0.5
0
1
2
3
4
5
6
7
8
OLS Residuals
-0.5 0 0.5
0
1
2
3
4
5
6
7
Normal Random
Macroeconomic effects on the stock market
Page 38 of 60
Figure 4.9: Q-Q Plot of Residuals
Formal method Jarque-Bera Test
Next, we perform the Jarque-Bera test on the normality on residuals, as shown in Table
4.15. If h =0, we can accept the null hypothesis that residuals of regression model follow
normal distribution. From the result, we can conclude that residuals follow normal
distribution at 1% significance level, at 5% significance level and at 10% significance
level respectively.
Table 4.15: Results of Jarque-Bera test
h jbstat p-value
Jarque Bera Test at 1% significance 0 2.3255 0.1834
Jarque Bera Test at 5% significance 0 2.3255 0.1834
Jarque Bera Test at 10% significance 0 2.3255 0.1834
-4 -2 0 2 4
-0.5
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
Standard Normal Quantiles
QuantilesofInputSample
OLS Residuals
-4 -2 0 2 4
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
Standard Normal Quantiles
QuantilesofInputSample
Normal Random
Macroeconomic effects on the stock market
Page 39 of 60
Goldfeld-Quandt Test
After confirming the residuals are in normal distribution, we proceed to the Goldfeld-
Quandt Test, as shown in Table 4.16. Since the p-value is larger than 0.05, we fail to
reject the null hypothesis, so the residuals in the population regression function are
homoscedastic.
Table 4.16: Result of Goldfeld-Quandt Test
Goldfeld-Quandt Test
f-stat f-prob Result
1.2999 0.2826 Homoscedastic
White’s General Heteroscedasticity Test
From the Table 4.17, we can see that the P-value is larger than 0.05, so we get the same
result: the residuals in the population regression function are homoscedastic.
Table 4.17: Result of White’s General Heteroskedasticity Test
White’s General Heteroskedasticity Test
Chisqr prob Result
14.0082 0.5509 Homoscedastic
Breusch Pagan Heteroscedasticity test
The result we got from this test shows the same result (Table 4.18), there is no
Heteroscedasticity in the residuals of the population regression function.
Macroeconomic effects on the stock market
Page 40 of 60
Table 4.18: Result of Breusch Pagan Heteroscedasticity test
Breusch Pagan Heteroscedasticity test
Breush-Pagan LM-
statistic
Chi-squared
probability
Degrees of
freedom
Result
3.38448744 0.6409 5 Homoscedastic
4.6.3 Mutlicollinearity
4.6.3.1 Preliminary Examination of Multicollinearity
In the first step, we analyze the data briefly. As we can see from the OLS result of the
Empirical Model, the R2
of our model is 0.3252, it is relatively low. That means the
possibility of having multicollinearity in our model is very low. Because there is
unlikely to be multicollinearity if we have high R2
but few significant t ratios. And from
the Figure 4.10, we can have an overview impression of the relationship between 5
variables and ddSNP. There is no significant multicollinearity problem.
Figure 4.10: Graph of Mutlicollinearity between Variables
-0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
ddMP
ddSNP
-0.01 -0.005 0 0.005 0.01 0.015
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
ddUI
ddSNP
Macroeconomic effects on the stock market
Page 41 of 60
Multicollinearity is to check the relationship or correlation between independent
variables in the model. From Table 4.19, there is one pair of independent variables that
are highly correlated (>0.5), and the condition number is 0.2314, less than 1.
Table 4.19: Result of Correlation Test of Variables
ddMP ddUI ddUTS ddOP ddEXP
ddMP 1.0000 0.1418 0.0000 -0.0710 0.0409
ddUI 0.1418 1.0000 -0.2708 0.4988 0.2191
ddUTS 0.0000 -0.2708 1.0000 0.1064 0.0627
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
ddUTS
ddSNP
-0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
ddOP
ddSNP
-0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04
-0.6
-0.4
-0.2
0
0.2
0.4
0.6
0.8
ddEXP
ddSNP
-0.01 -0.005 0 0.005 0.01 0.015
-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
ddUI
ddOP
Macroeconomic effects on the stock market
Page 42 of 60
ddOP -0.0710 0.4988 0.1064 1.0000 0.2478
ddEXP 0.0409 0.2191 0.0627 0.2478 1.0000
Condition Number: 0.4731
4.6.3.2 Variance Inflation Factor (VIF) and Tolerance (TOL)
Therefore, as we can see in the Table 4.20, the estimation from VIF and TOL shows
that it has no serious Multicollinearity problem between OP and UI.
Table 4.20: Multivariate Variance Inflation Factors & Tolerance
VIF_ddMP 1.0594 TOL_ddMP 0.9439
VIF_ddDEI 1.6597 TOL_ddDEI 0.6025
VIF_ddUI 1.1967 TOL_ddUI 0.8356
VIF_ddOP 1.5330 TOL_ddURP 0.6523
VIF_ddEXP 1.0887 TOL_ddUTS 0.9185
VIF_ddOP VS ddUI 1.0887 TOL_ddOP VS ddUI 0.9185
4.6.3.3 Condition Indices (CI)
However, the estimation from CI is 18.5940 (Table 4.21), which shows that it has some
multicollinearity problems with our model. Although multicollinearity will deteriorate
statistical power; hypotheses testing may suffer from a type II error, we chose to do
nothing. Because it is a data deficiency problem and cannot be easily circumvented.
Macroeconomic effects on the stock market
Page 43 of 60
Table 4.21: Belsley, Kuh, Welsch Variance-decomposition
4.6.4 Exogeneity
4.6.4.1 Hausman Test
We can see from the result (Table 4.22) that: input ddUI, ddUTS, ddOP and ddEXP are
endogenous variables.
Table 4.22: Result from Hausman Test
ddMP ddUI ddUTS ddOP ddEXP
Hausman stat 1.5792 7.2194 -4.4881 -4.9302 -4.9868
p-value 0.8691 1.7647e-09 0.0026 4.5855e-04 3.6119e-04
We can use instrument variable of relative endogenous variable to replace this
endogenous variable and get consistent but biased estimator. This instrument variable
must be correlated with the endogenous explanatory variables but cannot be correlated
with the error term in the explanatory equation. Besides, Two Stage Least Square
(TSLS) is a commom method, which includes create an investment variable to
eliminate endogeneity
K(x) CONS ddMP ddDEI ddUI ddOP ddEXP
1 1.00 0.00 0.00 0.00 0.00 0.00
2 0.00 0.00 0.00 0.83 0.00 0.00
7 0.00 0.00 0.00 0.01 0.66 0.00
54 0.00 0.94 0.00 0.00 0.00 0.00
117 0.00 0.01 0.00 0.00 0.05 0.98
346 0.00 0.05 1.00 0.15 0.29 0.02
CI = 18.5940
Macroeconomic effects on the stock market
Page 44 of 60
CHAPTER 5: CONCLUSION
5.1 Discussions
From the results we presented in Chapter 4 Data Analysis, we can conclude that our
Empirical Model is not the best linear unbiased estimator. Since we performed the
preliminary test, our data has transformed to become stationary and the residuals are
normally distributed, we assume that our error term has zero population mean. In the
model specification test, we found that our Empirical model is correctly specified, and
have a correct functional form. Next, we found that we have a serial autocorrelation
problem in our model as well, and we use GLS regression to solve this problem.
Furthermore, we found that the error term of our model has constant variance, which is
homoscedasticity. Moreover, we found that our independent variables are correlated,
which leads to multicollinearity in our model, this will deteriorate the statistical power
of our model and hypotheses testing may suffer from a type II error. The
mutlicollinearity has little consequences to our Empirical Model’s result, so we chose
to do nothing about this problem. In the last diagnostic test, the result shows that some
of our independent variables are correlated with error terms, that means our model has
endogenous variables, therefore our OLS regression will yield biased and inconsistent
estimates as well as type II errors, because we have a mutlicollinearity problem.
5.2 Summary of Statistical Analyses
We solve the autocorrelation problem by transforming the model to Generalized least
Squares, which is Cochrane-Orcutt AR(1) adjusted OLS regression as shown in Table
5.1. Unfortunately we have mutlicollinearity and endogenous variables in our model.
This affects the reliability of our model, we assume this Generalised least Squares
method gave us the best results in this paper.
Macroeconomic effects on the stock market
Page 45 of 60
Table 5.1: Result Cochrane–Orcutt Estimation
Cochrane-Orcutt serial correlation Estimates
R-squared = 0.4636
Rbar-squared = 0.4110
sigma^2 = 0.0119
Durbin-Watson = 2.4772
Rho estimate = -0.7418
Rho t-statistic = -8.2781
Rho probability = 0.0000
Nobs, Nvars = 57, 6
***************************************************************
Iteration information
rho value convergence iteration
-0.700337 0.700337 1
-0.740943 0.040606 2
-0.741803 0.00086 3
-0.741819 0.000016 4
***************************************************************
Variable Coefficient t-statistic t-probability
Cons -0.00092 -0.110928 0.912109
ddMP -3.872029 -3.714257 0.000506
ddUI -13.932701 -3.137159 0.002832
ddUTS 0.072536 2.324864 0.024097
ddOP 0.243548 1.585996 0.118922
ddEXP 5.776322 2.383445 0.020913
From the Table 5.1, we can conclude that 46% of the variation of the dependent variable
(ddSNP) can be explained by the variation of the independent variables. There is only
one insignificant variable in our model, which is ddOP. While ddMP and ddUI are
significant at the 1% level, and they have a negative relationship with ddSNP. While
ddOP and ddEXP are significant at the 5% level, and have a positive relationship to the
ddSNP. When the variable increases by one unit, ddSNP will increase by 𝛽 value,
shown in Table 5.2.
Macroeconomic effects on the stock market
Page 46 of 60
Table 5.2: Relationship between ddSNP with the independent variables
Variable 𝛽
ddMP -3.872029
ddUI -13.932701
ddUTS 0.072536
ddOP 0.243548
ddEXP 5.776322
5.3 Conclusion
The aim of this paper was to investigate the effect of macroeconomic determinants on
the performance of the S&P 500. As can be seen from our results, There is only one
insignificant variable in our model, which is Oil Prices (ddOP), Industrial production
(ddMP) and Unexpected inflation (ddUI), are significant at the 1% level, and they have
a negative relationship with the S&P500 Index (ddSNP), while Oil Price Changes
(ddOP) and Consumption Expenditure (ddEXP) are significant at the 5% level, and
have a positive relationship to the S&P500 Index. When the variable increases by one
unit, the S&P500 will increase by 𝛽 value, shown in Table 5.2. This tells us that if there
is a decrease in industrial production and unexpected inflation, there will be an increase
in the S&P500 index and vice, versa.
Our results are in line with that of Chen, Roll and Ross, 1986, especially regarding
Industrial production. Our results were also in line with Shanken and Weinstein (2006)
and Lamont (2000) regarding Industrial Production. However, our results were not
consistent with Cutler, Poterba and Summers, 1989 who found that Industrial
Production Growth is significantly positively correlated with real stock returns over the
period 1926 – 1986.They also found that Inflation, did not affect stock returns which
again, is not consistent with our results.
We conclude that Chen, Roll and Ross’s 1986 model is still valid and the results
conveyed by their research is not differ over time given the advances in technology and
Macroeconomic effects on the stock market
Page 47 of 60
ease of access of information now, compared with back then. This result would give
investors in the market as well as governments more pertinent information regarding
macroeconomic factors that affect stock prices.
Our results might not be reliable, because it has some diagnostic problem and it is not
following Gauss-Markov theorem. But, in contrast, they are in line with several
previous literatures. Our suggestions for the future scholars are to solve the diagnostics
problem we are facing in this paper. Reexamining the same model in varies of stock
market could provide a more reliable and valid information to the participants in the
market.
Macroeconomic effects on the stock market
Page 48 of 60
References
Adebiyi, M.A., Adenuga, A.O., et al. (2009). Oil Price Shocks, Exchange Rate and
Stock Market Behaviour: the Empirical Evidence from Nigeria.
Black, F. 1972. “The capital market equilibrium with restricted borrowing”. Journal of
Business, Vol. 45, No. 3, 444–454.
Boyd, Jagannathan & Hu, (2001), “The stock market’s reaction to unemployment news;
why bad news is usually good for stocks”. Working paper 8092, NBER
Bozdogan, H. (2000). Akaike's information criterion and recent developments in
information complexity. Journal of mathematical psychology, 44(1), 62-91.
Breeden, D. (1979). “An intertemporal asset pricing model with stochastic consumption
and investment opportunities”. Journal of Financial Economics, Vol. 7, No. 3, 265–
29
Breusch, T. S. (1978). Testing for autocorrelation in dynamic linear models*.
Australian Economic Papers, 17(31), 334-355.
Brindley, B. (2008). A dictionary of finance and banking. J. Law, & J. Smullen (Eds.).
Oxford University Press.
Chen, G. J. (2012). A simple way to deal with multicollinearity. Journal of Applied
Statistics, 39(9), 1893-1909.
Chen, N. F., Roll, R., & Ross, S. A. (1986). Economic forces and the stock
market. Journal of business, 383-403.
Chen, N., Roll, R., & Ross, S. (1986). “Economic forces and the stock market”.
Chipman, J. S. (2011). Gauss-Markov Theorem. In International Encyclopedia of
Statistical Science (pp. 577-582). Springer Berlin Heidelberg.
Cox, J., Ingersoll, J., Ross, S. (1985). “An intertemporal general equilibrium model of
asset prices”. Econometrica, Vol. 53, No. 2, 363–384.
Cutler, David M., James M. Poterba and Lawrence Summers, (1989), What moves
stock prices, Journal of Portfolio Management, 15: 4-11.
Davidson, R., & MacKinnon, J. G. (1981).Several tests for model specification in the
presence of alternative hypotheses. Econometric a: Journal of the Econometric
Society, 781-793.
Fama & MacBeth, 1973, Risk, Return and Equilibrium: Empirical Tests, The Journal
of Political Economy, Volume 81, issue 3.
Macroeconomic effects on the stock market
Page 49 of 60
Fama, E.F., (1981), “Stock Returns, Real Activity, Inflation and Money”, American
Economic Review 71, 545-565
Fama. E, 1990, “Stock Returns, Expected Returns and Real Activity” Journal of
Finance 45, 1089 – 1108
Féménias, J. L. (2005). Fitting models to correlated data III: A comparison between
residual analysis and other methods. Journal of Molecular Spectroscopy, 232(1),
80-101.
Ferson and Harvey, 1993 “The risk and predictability of international equity returns”,
Review of financial studies, 6- 527 – 566
Godfrey, L. G. (1978). Testing against general autoregressive and moving average error
models when the regressors include lagged dependent variables. Econometric a:
Journal of the Econometric Society, 1293-1301.
Godfrey,L. G., & Pesaran, M. H. (1983). Tests of non-nested regression models: small
sample adjustments and Monte Carlo evidence. Journal of Econometrics, 21(1),
133-154.
Hahn, J., Ham, J. C., & Moon, H. R. (2011). The Hausman test and weak instruments.
Journal of Econometrics, 160(2), 289-299
Hamilton and Susmelb, (1994) “Autoregressive conditional heteroskedasticity and
changes in regime” Journal of Econometrics 64 (1994) 307-333
Jarque, C. M., & Bera, A. K. (1980).Efficient tests for normality, homoscedasticity and
serial independence of regression residuals. Economics Letters, 6(3),255-259.
Journal of Business, Vol. 59, No. 3, 383–403.
Koenker, R., & Bassett Jr, G. (1982). Robust tests for heteroscedasticity based on
regression quantiles. Econometrica: Journal of the Econometric Society, 43-61.
Lamont, O. (2000). "Investment plans and stock returns". Journal of Finance, Vol.6,
pp.2719-2743.
Leng, L., Zhang, T., Kleinman, L., & Zhu, W. (2007, July). Ordinary least square
regression, orthogonal regression, geometric mean regression and their applications
in aerosol science. In Journal of Physics: Conference Series (Vol. 78, No. 1, p.
012084). IOP Publishing.
Liddle, A. R. (2007). Information criteria for astrophysical model selection. Monthly
Notices of the Royal Astronomical Society: Letters, 377(1),L74-L78.
Macroeconomic effects on the stock market
Page 50 of 60
Lintner, J., 1965, “The Valuation of Risk Assets and the Selection of Risky Investments
in Stock Portfolios and Capital Budgets”, The Review of Economics and Statistics,
Vol. 47, No. 1. (Feb., 1965), pp. 13-37.
Long, J. 1974. “Stock prices, inflation, and the term structure of interest rates”. Journal
of Financial Economics, Vol. 1, No. 2, 131–170.
Lyon, J. D., & Tsai, C. L. (1996). A comparison of tests for heteroscedasticity. The
Statistician, 337-349.
Mcqueen, G and V Roley, 1993, “Stock Prices, News and Business conditions, Review
of Financial Studies, 6, 683 – 707
Merton, R. C. 1973. “An intertemporal Capital Asset Pricing Model”. Econometrica,
Vol. 41, No. 5, 867–88
Morton, T. G. (1977). Factor Analysis, Multicollinearity, and Regression Appraisal
Models. Appraisal Journal, 45(4), 578.
Newey, W. K., & West, K. D. (1986). A simple, positive semi-definite,
heteroskedasticity and autocorrelation consistent covariance matrix.
Ramsey,J. B. (1969). Tests for specification errors in classical linear least-squares
regression analysis. Journal of the Royal Statistical Society. Series B
(Methodological), 350-371.
Ross, S. A. 1976 “The Arbitrage Pricing Theory of Capital Asset Pricing”. Journal of
Economic Theory, Vol. 13, No. 2, 341–360.
Rubinstein, M. 1976. “The valuation of uncertain income streams and the pricing of
options”. Bell Journal of Economics, Vol. 7, No. 2, 407–425.
Schwert, (1989), “Why does stock market volatility change over time?”, Journal of
finance 44, 1115 – 1145
Shanken, J. & Mark, I. (2006). Weinstein Economic forces and the stock market
revisited. Journal of Empirical Finance,13, 129–144.
Sharpe,William F.,Capital Asset Prices: A Theory of Market Equilibrium under
Conditions of Risk, The Journal of Finance, Vol. 19, No. 3 (Sep., 1964), pp. 425-
442
Shukur, G., & Mantalos, P. (2004). Size and power of the RESET test as applied to
systems of equations: A Boots trap approach. Journal of Modern Applied Statistical
Methods, 3(2),10.
Thursby, J. G. (1982). Misspecification, heteroscedasticity, and the Chow and
Goldfeld-Quandt tests. The Review of Economics and Statistics, 314-321.
Macroeconomic effects on the stock market
Page 51 of 60
Appendices
%% Preliminary examinations of the Data
%% input variables
%
[Data,TXT,RAW]= xlsread('Data.xls',1,'A1:H60');
SNP = Data(:,1);
MP = Data(:,2);
DEI = Data(:,3);
UI = Data(:,4);
URP = Data(:,5);
UTS = Data(:,6);
OP = Data(:,7);
EXP = Data(:,8);
%% [1] Plot Data
f = figure;
subplot(4,2,1);
plot(SNP);
title('SNP');
subplot(4,2,2);
plot(MP);
title('MP');
subplot(4,2,3);
plot(DEI);
title('DEI');
subplot(4,2,4);
plot(UI);
title('UI');
subplot(4,2,5);
plot(URP);
title('URP');
subplot(4,2,6);
plot(UTS);
title('UTS');
subplot(4,2,7);
plot(OP);
title('OP');
subplot(4,2,8);
plot(EXP);
title('EXP');
%
%% [1] Plot Data
f = figure;
subplot(4,2,1);
plot(SNP);
title('SNP');
subplot(4,2,2);
plot(MP);
title('MP');
subplot(4,2,3);
plot(DEI);
title('DEI');
subplot(4,2,4);
plot(UI);
title('UI');
subplot(4,2,5);
plot(URP);
Macroeconomic effects on the stock market
Page 52 of 60
title('URP');
subplot(4,2,6);
plot(UTS);
title('UTS');
subplot(4,2,7);
plot(OP);
title('OP');
subplot(4,2,8);
plot(EXP);
title('EXP');
%1st different
D1 = LagOp({1,-1},'Lags',[0,1]);
dSNP = filter(D1,SNP);
dMP = filter(D1,MP);
dDEI = filter(D1,DEI);
dUI = filter(D1,UI);
dURP = filter(D1,URP);
dUTS = filter(D1,UTS);
dOP = filter(D1,OP);
dEXP = filter(D1,EXP);
% plot 1st different
f = figure;
subplot(4,2,1);
plot(dSNP);
title('dSNP');
subplot(4,2,2);
plot(dMP);
title('dMP');
subplot(4,2,3);
plot(dDEI);
title('dDEI');
subplot(4,2,4);
plot(dUI);
title('dUI');
subplot(4,2,5);
plot(dURP);
title('dURP');
subplot(4,2,6);
plot(dUTS);
title('dUTS');
subplot(4,2,7);
plot(dOP);
title('dOP');
subplot(4,2,8);
plot(dEXP);
title('dEXP');
%2nd different
D2 = D1*D1;
ddSNP = filter(D2,SNP);
ddMP = filter(D2,MP);
ddDEI = filter(D2,DEI);
ddUI = filter(D2,UI);
ddURP = filter(D2,URP);
ddUTS = filter(D2,UTS);
ddOP = filter(D2,OP);
ddEXP = filter(D2,EXP);
% plot 2nd different
f = figure;
subplot(4,2,1);
Macroeconomic effects on the stock market
Page 53 of 60
plot(ddSNP);
title('ddSNP');
subplot(4,2,2);
plot(ddMP);
title('ddMP');
subplot(4,2,3);
plot(ddDEI);
title('ddDEI');
subplot(4,2,4);
plot(ddUI);
title('ddUI');
subplot(4,2,5);
plot(ddURP);
title('ddURP');
subplot(4,2,6);
plot(ddUTS);
title('ddUTS');
subplot(4,2,7);
plot(ddOP);
title('ddOP');
subplot(4,2,8);
plot(ddEXP);
title('ddEXP');
%% [2] Measures of Central Tendancy
Mean = mean(Data);
Median = median(Data);
Mode = mode(Data);
% [3] Measures of Range
Range = max(Data)-min(Data);
Standdev = std(Data);
Variance = var(Data);
% [4] Higher 3rd and 4th Moments
S = skewness(Data);
K = kurtosis(Data);
% [5] Perform a normality test
[h,p,jbstat] = jbtest(SNP,.05);
[h1,p1,jbstat1] = jbtest(MP,.05);
[h2,p2,jbstat2] = jbtest(DEI,.05);
[h3,p3,jbstat3] = jbtest(UI,.05);
[h4,p4,jbstat4] = jbtest(URP,.05);
[h5,p5,jbstat5] = jbtest(UTS,.05);
[h6,p6,jbstat6] = jbtest(OP,.05);
[h7,p7,jbstat7] = jbtest(EXP,.05);
% [6] Restricted model
X=[ones(length(ddSNP(:,1)),1),ddMP,ddUI,ddUTS,ddOP,ddEXP];
resultr=ols(ddSNP,X);
prt(resultr)
% [7] Unrestricted model
X1=[ones(length(ddSNP(:,1)),1),ddMP,ddDEI,ddUI,ddURP,ddUTS,ddOP,ddEXP
];
resultu=ols(ddSNP,X1);
prt(resultu)
%
% % [8] Use an F-statistic to test the null that all the coefficients
are
% % simultaneously zero.
[fstat fprob] = waldf(resultr,resultu);
disp('Wald F-test results');
[fstat fprob]
% [9] Preliminary examination of Regression Residuals
Macroeconomic effects on the stock market
Page 54 of 60
%
plot(resultr.resid);
ylabel('Residuals');
title('Restricted Model');
hist(resultr.resid);
title('Restricted Model');
%
plot(resultu.resid);
ylabel('Residuals');
title('Unrestricted Model');
hist(resultu.resid);
title('Unrestricted Model');
%
%
%% Normality of the residual
%
[h,p,jbstat] = jbtest(resultr.resid,.05)
[h,p,jbstat] = jbtest(resultu.resid,.05)
%
%
%
constant = ones(length(ddSNP),1);
Data_Ori = [constant,ddMP,ddDEI,ddUI,ddURP,ddUTS,ddOP,ddEXP];
Data = [constant,ddMP,ddUI,ddUTS,ddOP,ddEXP];
% model specification
%
result_Ori = ols(ddSNP,Data_Ori);
result = ols(ddSNP,Data);
%
%
SSR = sum(result_Ori.resid.^2);
SSR1 = sum(result.resid.^2);
T = length(SNP);
%
% Information Criteria
%
Akaike = log(SSR/T)+(2*7)/T
Schwarz = log(SSR/T)+(7*log(T))/T
Akaike1 = log(SSR1/T)+(2*5)/T
Schwarz1 = log(SSR1/T)+(5*log(T))/T
%%
% Durbin Watson d Test: a test for an omitted variable
%
Data2 = [constant,ddMP,ddUI,ddUTS,ddOP,ddEXP,ddURP];
result2 = ols(ddSNP,Data2);
Data3 = [ddDEI,result2.resid];
Data4 = sortrows(Data3,1);
resid_sort = [Data4(:,2)];
%
result3 = ols(resid_sort,constant);
disp('Durbin Watson d Test: null of no autocorrelation (no omitted
variable)')
result3.dw
Macroeconomic effects on the stock market
Page 55 of 60
%
%(n=60, k=1,1 percent significant)
dl=1.382
du=1.449
4-du=2.5510
4-dl=2.6180
%
%
Data = [constant,ddMP,ddUI,ddUTS,ddOP,ddEXP];
result = ols(ddSNP,Data);
Data5 = [ddURP,result.resid];
Data6 = sortrows(Data5,1);
resid_sort = [Data6(:,2)];
%
result4 = ols(resid_sort,constant);
disp('Durbin Watson d Test: null of no autocorrelation (no omitted
variable)')
result4.dw
%
% Ramsey Reset Test: a test for adequate functional form
%
result = ols(ddSNP,Data);
predictsq = result.yhat.^2;
predictcube = result.yhat.^3;
Data7 = [Data,predictsq];
Data8 = [Data,predictsq,predictcube];
result5 = ols(ddSNP,Data7);
result5a = ols(ddSNP,Data8);
disp('Ramsey Reset Test: linear against quadratic functional form')
prt(result5)
%
disp('Ramsey Reset Test: linear against quadratic + cubic functional
form')
prt(result5a)
%quadratic + cubic functional form are not significant
Fstat = ((result5a.rsqr - result.rsqr)/2)/((1-
result5a.rsqr)/length((SNP)-8))
%
% Autocorrelation
% Durbin-Watson Procedure
%
disp('Durbin-Watson Test: null of no autocorrelation')
durbwat = result.dw
(k=7)
dl=1.179
du=1.682
4-du=2.3180
4-dl=2.8210
(k=5)
Macroeconomic effects on the stock market
Page 56 of 60
dl=1.248
du=1.598
4-du=2.4020
4-dl=2.7520
%
% Breusch-Godfrey Test for serial correlation
%
plot(result.resid)
hist(result.resid)
resid = result.resid;
reslag1 = lag(resid,1);
reslag2 = lag(resid,2);
reslag3 = lag(resid,3);
Data1 = [Data,reslag1,reslag2,reslag3];
result1 = ols(resid,Data1);
prt(result1)
%
% Cochrane Orcutt procedure for AR(1) errors
%
%
disp('Cochrane-Orcutt AR(1) adjusted OLS regression')
results = olsc(ddSNP,Data)
prt(results)
w%
% heteroskedasticity
%Test the residuals for normality
x = result.resid;
y = normrnd(mean(x), std(x), length(x), 1);
%
figure;
plot(x, 'Color', 'k')
xlim([1, length(x)])
ylabel('OLS Residuals')
%
figure;
plot(x.^2, 'Color', 'k')
xlim([1, length(x)])
ylabel('OLS Residuals^2')
%
figure;
plot(y, 'Color', 'k')
xlim([1, length(y)])
ylabel('Normal rand')
%
figure;
plot(y.^2, 'Color', 'k')
xlim([1, length(y)])
ylabel('Normal rand^2')
% Histogram
figure;
subplot(1,2,1)
hist(x, 30)
%histogram(x, 20)
title('OLS Residuals')
subplot(1,2,2)
hist(y, 30)
title('Normal Random')
Macroeconomic effects on the stock market
Page 57 of 60
% Q-Q plot
figure;
subplot(1,2,1)
qqplot(x)
title('OLS Residuals')
subplot(1,2,2)
qqplot(y)
title('Normal Random')
% Jarque Bera test
disp('Jarque Bera Test, null is normality of residuals')
[H,P,JBSTAT] = jbtest(x, .05)
disp('Jarque Bera Test, null is normality of residuals')
[H,P,JBSTAT] = jbtest(x, .01)
disp('Jarque Bera Test, null is normality of residuals')
[H,P,JBSTAT] = jbtest(x, .10)
%%
% Goldfeld-Quandt
B = sortrows(Data,2);
%
c = round(length(ddSNP)/5);
n = round((length(ddSNP) - c)/2);
B1 = B(1:n, :);
B2 = B(n+c:end, :);
%
Data1 = [ones(size(B1,1),1),B1(:,2:4)];
Data2 = [ones(size(B2,1),1),B2(:,2:4)];
%
results1 = ols(B1(:,1), Data1);
results2 = ols(B2(:,1), Data2);
RSS1 = results1.resid'*results1.resid;
RSS2 = results2.resid'*results2.resid;
df1 = size(Data1, 1) - size(Data1, 2);
df2 = size(Data2, 1) - size(Data2, 2);
disp('Goldfeld Quandt F statistic, null is homoscedasticity and
normality of errors')
fstat = (RSS2/df2)/(RSS1/df1)
disp('Goldfeld Quandt F statistic, P value of F-statistic')
fprob = fdis_prb(fstat, df1, df2)
% 2. White heteroscedasticity test (does not assume normality of
errors)
Data3 = [ones(length(ddSNP),1),ddMP,ddUI,ddUTS,ddOP,ddEXP];
results3 = ols(ddSNP,Data3);
ressq3 = results3.resid.^2;
% auxilary regression
ddMP_sq = ddMP.*ddMP;
ddUI_sq = ddUI.*ddUI;
ddUTS_sq = ddUTS.*ddUTS;
ddOP_sq = ddOP.*ddOP;
ddEXP_sq = ddEXP.*ddEXP;
ddMP_UI = ddMP.*ddUI;ddMP_UTS = ddMP.*ddUTS;ddMP_OP =
ddMP.*ddOP;ddMP_EXP = ddMP.*ddEXP;
ddUI_UTS = ddUI.*ddUTS; ddUI_OP = ddUI.*ddOP;ddUI_EXP = ddUI.*ddEXP;%
ddUTS_OP = ddUTS.*ddOP;ddUTS_EXP = ddUTS.*ddEXP;
Data4 =
[ones(length(ddSNP),1),ddMP,ddUI,ddURP,ddUTS,ddOP,ddMP_UI,ddMP_UTS,dd
MP_OP,ddMP_EXP,ddUI_UTS,ddUI_OP,ddUI_EXP,ddUTS_OP,ddUTS_EXP];
results4 = ols(ressq3,Data4);
%
disp('White test, null is homoscedasticity')
Chisqr = results4.rsqr*length(ressq3)
Macroeconomic effects on the stock market
Page 58 of 60
prob = chis_prb(Chisqr,14)
%3. Breusch Pagan heteroscedasticity test
disp('Breusch Pagan Godfrey heteroscedasticity test, null is
homoscedasticity and normality of errors')
bpagan(ddSNP,Data)
% multicollinearity
% Unconditional Covariance and Correlation of Data matrix
disp('Covariance and Correlation Matrices for Data')
cov([ddMP ddUI ddUTS ddOP ddEXP])
corrcoef([ddMP ddUI ddUTS ddOP ddEXP])
R = corrcoef([ddMP ddUI ddUTS ddOP ddEXP])
cond(R)
e = eig(R)
e(5)/e(1)
[V,D] = eig(R)
%%%
figure;
subplot(1,2,1)
plot(ddMP, ddSNP, '.b', 'MarkerSize', 22)
xlabel('ddMP'); ylabel('ddSNP'); grid on; axis square;
subplot(1,2,2)
plot(ddUI, ddSNP, '.r','MarkerSize', 22)
xlabel('ddUI'); ylabel('ddSNP'); grid on; axis square;
figure;
subplot(1,2,1)
plot(ddUTS, ddSNP, '.k', 'MarkerSize', 22)
xlabel('ddUTS'); ylabel('ddSNP'); grid on; axis square;
subplot(1,2,2)
plot(ddOP, ddSNP, '.y', 'MarkerSize', 22)
xlabel('ddOP'); ylabel('ddSNP'); grid on; axis square;
figure;
subplot(1,2,1)
plot(ddEXP, ddSNP, '.c', 'MarkerSize', 22)
xlabel('ddEXP'); ylabel('ddSNP'); grid on; axis square;
subplot(1,2,2)
plot(ddUI, ddOP, '.m', 'MarkerSize', 22)
xlabel('ddUI'); ylabel('ddOP'); grid on; axis square;
% Variance Inflation Factors
results_1 = ols(ddMP,[ones(length(ddUI),1),ddUI,ddUTS,ddOP,ddEXP]);
results_2 = ols(ddUI,[ones(length(ddUI),1),ddMP,ddUTS,ddOP,ddEXP]);
results_3 = ols(ddUTS,[ones(length(ddUI),1),ddUI,ddMP,ddOP,ddEXP]);
results_4 = ols(ddOP,[ones(length(ddUI),1),ddUTS,ddMP,ddUI,ddEXP]);
results_5 = ols(ddEXP,[ones(length(ddUI),1),ddUTS,ddMP,ddUI,ddOP]);
results_6 = ols(ddOP,[ones(length(ddUI),1),ddUI]);
%
disp('Multivariate Variance Inflation Factors')
disp('Multivariate Variance Inflation Factors MP')
VIF1 = (1/(1-(results_1.rsqr)))
disp('Multivariate Variance Inflation Factors DEI')
VIF2 = (1/(1-(results_2.rsqr)))
disp('Multivariate Variance Inflation Factors UI')
VIF3 = (1/(1-(results_3.rsqr)))
disp('Multivariate Variance Inflation Factors ERP')
VIF4 = (1/(1-(results_4.rsqr)))
disp('Multivariate Variance Inflation Factors UTS')
VIF5 = (1/(1-(results_5.rsqr)))
Macroeconomic effects on the stock market
Page 59 of 60
VIF6 = (1/(1-(results_5.rsqr)))
%Tolerance
Tol1 = 1./VIF1
Tol2 = 1./VIF2
Tol3 = 1./VIF3
Tol4 = 1./VIF4
Tol5 = 1./VIF5
Tol6 = 1./VIF6
% Condition Index
disp('Condition Indices and associated statistics')
bkw(Data)
s = svd(Data);
k = max(s)/min(s);
ci = sqrt(k)
% exogeneiy
Data_exo1 =
[ones(length(ddMP),1),lag(ddMP,1),lag(ddMP,2),lag(ddMP,3)];
Result1 = ols(ddMP,Data_exo1);
ddMP_hat = Result1.yhat;
% 2. Second stage regression
Data_exo2 = [ddMP_hat,ddUI,ddUTS,ddOP,ddEXP];
DataIV = [ones(length(ddSNP),1),Data_exo2];
ResultIV = ols(ddSNP, DataIV);
prt(ResultIV)
%if UI is endogeneous then its parameter estimate is biased.
Data_exo1 =
[ones(length(ddUI),1),lag(ddUI,1),lag(ddUI,2),lag(ddUI,3)];
Result1 = ols(ddUI,Data_exo1);
ddUI_hat = Result1.yhat;
% 2. Second stage regression
Data_exo2 = [ddUI_hat,ddUI,ddUTS,ddOP,ddEXP];
DataIV = [ones(length(ddSNP),1),Data_exo2];
ResultIV = ols(ddSNP, DataIV);
prt(ResultIV)
%if UTS is endogeneous then its parameter estimate is biased
Data_exo1 =
[ones(length(ddUTS),1),lag(ddUTS,1),lag(ddUTS,2),lag(ddUTS,3)];
Result1 = ols(ddUTS,Data_exo1);
ddUTS_hat = Result1.yhat;
% 2. Second stage regression
Data_exo2 = [ddUTS_hat,ddUI,ddUTS,ddOP,ddEXP];
DataIV = [ones(length(ddSNP),1),Data_exo2];
ResultIV = ols(ddSNP, DataIV);
prt(ResultIV)
%if OP is endogeneous then its parameter estimate is biased.
Data_exo1 =
[ones(length(ddOP),1),lag(ddOP,1),lag(ddOP,2),lag(ddOP,3)];
Result1 = ols(ddOP,Data_exo1);
ddOP_hat = Result1.yhat;
% 2. Second stage regression
Data_exo2 = [ddOP_hat,ddUI,ddUTS,ddOP,ddEXP];
DataIV = [ones(length(ddSNP),1),Data_exo2];
ResultIV = ols(ddSNP, DataIV);
prt(ResultIV)
%if EXP is endogeneous then its parameter estimate is biased.
Data_exo1 =
[ones(length(ddEXP),1),lag(ddEXP,1),lag(ddEXP,2),lag(ddEXP,3)];
Result1 = ols(ddEXP,Data_exo1);
ddEXP_hat = Result1.yhat;
% 2. Second stage regression
Macroeconomic effects on the stock market
Page 60 of 60
Data_exo2 = [ddEXP_hat,ddUI,ddUTS,ddOP,ddEXP];
DataIV = [ones(length(ddSNP),1),Data_exo2];
ResultIV = ols(ddSNP, DataIV);
prt(ResultIV)
% Hausman test
beta_ols = ResultOLS.beta
beta_iv = ResultIV.beta
varbeta_ols = ResultOLS.sige*inv(DataOLS'*DataOLS); varbeta_iv =
ResultIV.sige*inv(DataIV'*DataIV); df = rank(varbeta_iv-varbeta_ols);
hausman = (beta_ols-beta_iv)'*inv(varbeta_iv-varbeta_ols)*(beta_ols-
beta_iv) pval = 1 - chis_prb(hausman.^2,df)

More Related Content

What's hot

Choudhri et-al-2015-working-paper-1
Choudhri et-al-2015-working-paper-1Choudhri et-al-2015-working-paper-1
Choudhri et-al-2015-working-paper-1
Arslan Ishaq
 
Vol7no2 6
Vol7no2 6Vol7no2 6
Vol7no2 6
Arslan Ishaq
 
132 article text-185-1-10-20210523
132 article text-185-1-10-20210523132 article text-185-1-10-20210523
132 article text-185-1-10-20210523
Arslan Ishaq
 
Paper (2)
Paper (2)Paper (2)
Paper (2)
Arslan Ishaq
 
Causal Relationship between Stock market and Real Economy in India using Gran...
Causal Relationship between Stock market and Real Economy in India using Gran...Causal Relationship between Stock market and Real Economy in India using Gran...
Causal Relationship between Stock market and Real Economy in India using Gran...
sammysammysammy
 
Dp12197
Dp12197Dp12197
Dp12197
Arslan Ishaq
 
Final report
Final reportFinal report
Final report
roshan a
 
Macro economic factors
Macro economic factorsMacro economic factors
Macro economic factors
Vinu Arpitha
 
Economic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of indiaEconomic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of india
IAEME Publication
 
Stock market volatility and macroeconomic variables volatility in nigeria an ...
Stock market volatility and macroeconomic variables volatility in nigeria an ...Stock market volatility and macroeconomic variables volatility in nigeria an ...
Stock market volatility and macroeconomic variables volatility in nigeria an ...Alexander Decker
 
5.john kofi mensah 49 63
5.john kofi mensah   49 635.john kofi mensah   49 63
5.john kofi mensah 49 63
Alexander Decker
 
B331321.pdf
B331321.pdfB331321.pdf
B331321.pdf
ajmrdjournals
 
1.[1 14]the impact of macroeconomic indicators on stock prices in nigeria
1.[1 14]the impact of macroeconomic indicators on stock prices in nigeria1.[1 14]the impact of macroeconomic indicators on stock prices in nigeria
1.[1 14]the impact of macroeconomic indicators on stock prices in nigeriaAlexander Decker
 
11.the impact of macroeconomic indicators on stock prices in nigeria
11.the impact of macroeconomic indicators on stock prices in nigeria11.the impact of macroeconomic indicators on stock prices in nigeria
11.the impact of macroeconomic indicators on stock prices in nigeriaAlexander Decker
 
Chinh sach tien te va gia chung khoan
Chinh sach tien te va gia chung khoanChinh sach tien te va gia chung khoan
Chinh sach tien te va gia chung khoan
Nghiên Cứu Định Lượng
 
Empirical analysis of the relationship between stock market returns and macro...
Empirical analysis of the relationship between stock market returns and macro...Empirical analysis of the relationship between stock market returns and macro...
Empirical analysis of the relationship between stock market returns and macro...
Alexander Decker
 
Examining the Relationship between Term Structure of Interest Rates and Econo...
Examining the Relationship between Term Structure of Interest Rates and Econo...Examining the Relationship between Term Structure of Interest Rates and Econo...
Examining the Relationship between Term Structure of Interest Rates and Econo...
International Journal of Economics and Financial Research
 

What's hot (19)

Choudhri et-al-2015-working-paper-1
Choudhri et-al-2015-working-paper-1Choudhri et-al-2015-working-paper-1
Choudhri et-al-2015-working-paper-1
 
Vol7no2 6
Vol7no2 6Vol7no2 6
Vol7no2 6
 
132 article text-185-1-10-20210523
132 article text-185-1-10-20210523132 article text-185-1-10-20210523
132 article text-185-1-10-20210523
 
Paper (2)
Paper (2)Paper (2)
Paper (2)
 
Causal Relationship between Stock market and Real Economy in India using Gran...
Causal Relationship between Stock market and Real Economy in India using Gran...Causal Relationship between Stock market and Real Economy in India using Gran...
Causal Relationship between Stock market and Real Economy in India using Gran...
 
Md iw mtq3nde=
Md iw mtq3nde=Md iw mtq3nde=
Md iw mtq3nde=
 
Dp12197
Dp12197Dp12197
Dp12197
 
Final report
Final reportFinal report
Final report
 
Macro economic factors
Macro economic factorsMacro economic factors
Macro economic factors
 
Meco and stock
Meco and stockMeco and stock
Meco and stock
 
Economic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of indiaEconomic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of india
 
Stock market volatility and macroeconomic variables volatility in nigeria an ...
Stock market volatility and macroeconomic variables volatility in nigeria an ...Stock market volatility and macroeconomic variables volatility in nigeria an ...
Stock market volatility and macroeconomic variables volatility in nigeria an ...
 
5.john kofi mensah 49 63
5.john kofi mensah   49 635.john kofi mensah   49 63
5.john kofi mensah 49 63
 
B331321.pdf
B331321.pdfB331321.pdf
B331321.pdf
 
1.[1 14]the impact of macroeconomic indicators on stock prices in nigeria
1.[1 14]the impact of macroeconomic indicators on stock prices in nigeria1.[1 14]the impact of macroeconomic indicators on stock prices in nigeria
1.[1 14]the impact of macroeconomic indicators on stock prices in nigeria
 
11.the impact of macroeconomic indicators on stock prices in nigeria
11.the impact of macroeconomic indicators on stock prices in nigeria11.the impact of macroeconomic indicators on stock prices in nigeria
11.the impact of macroeconomic indicators on stock prices in nigeria
 
Chinh sach tien te va gia chung khoan
Chinh sach tien te va gia chung khoanChinh sach tien te va gia chung khoan
Chinh sach tien te va gia chung khoan
 
Empirical analysis of the relationship between stock market returns and macro...
Empirical analysis of the relationship between stock market returns and macro...Empirical analysis of the relationship between stock market returns and macro...
Empirical analysis of the relationship between stock market returns and macro...
 
Examining the Relationship between Term Structure of Interest Rates and Econo...
Examining the Relationship between Term Structure of Interest Rates and Econo...Examining the Relationship between Term Structure of Interest Rates and Econo...
Examining the Relationship between Term Structure of Interest Rates and Econo...
 

Viewers also liked

1.[1 12]stock prices and microeconomic variables
1.[1 12]stock prices and microeconomic variables1.[1 12]stock prices and microeconomic variables
1.[1 12]stock prices and microeconomic variables
Alexander Decker
 
Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)
Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)
Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)
Ahmad Sayadi
 
Infografia
InfografiaInfografia
LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)
LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)
LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)
Ahmad Sayadi
 
Oportunidades de estudio
Oportunidades de estudioOportunidades de estudio
Oportunidades de estudio
Katherine Feliz
 
El futuro de la arquitectura en 100 edificios
El futuro de la arquitectura en 100 edificiosEl futuro de la arquitectura en 100 edificios
El futuro de la arquitectura en 100 edificios
Katherine Feliz
 
DERECHO AGRARIO
DERECHO AGRARIODERECHO AGRARIO
CAO Newsletter 2014 Final
CAO Newsletter 2014 FinalCAO Newsletter 2014 Final
CAO Newsletter 2014 FinalMelissa Walker
 

Viewers also liked (8)

1.[1 12]stock prices and microeconomic variables
1.[1 12]stock prices and microeconomic variables1.[1 12]stock prices and microeconomic variables
1.[1 12]stock prices and microeconomic variables
 
Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)
Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)
Laporan praktek kerja industri (prakerin) smk al baisuny 2014-2015 (kholilah)
 
Infografia
InfografiaInfografia
Infografia
 
LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)
LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)
LAPORAN PRAKTEK KERJA INDUSTRI (Prakerin) SMK AL-BAISUNY 2014-2015 (Tholib)
 
Oportunidades de estudio
Oportunidades de estudioOportunidades de estudio
Oportunidades de estudio
 
El futuro de la arquitectura en 100 edificios
El futuro de la arquitectura en 100 edificiosEl futuro de la arquitectura en 100 edificios
El futuro de la arquitectura en 100 edificios
 
DERECHO AGRARIO
DERECHO AGRARIODERECHO AGRARIO
DERECHO AGRARIO
 
CAO Newsletter 2014 Final
CAO Newsletter 2014 FinalCAO Newsletter 2014 Final
CAO Newsletter 2014 Final
 

Similar to Macroeconomic effects on the stock market

Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...
Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...
Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...
International Journal of Arts and Social Science
 
Ssrn id1911492 code1641040
Ssrn id1911492 code1641040Ssrn id1911492 code1641040
Ssrn id1911492 code1641040annabogd
 
Economic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of indiaEconomic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of india
IAEME Publication
 
Int Conferece Reva Dec 2022.ppt
Int Conferece Reva Dec 2022.pptInt Conferece Reva Dec 2022.ppt
Int Conferece Reva Dec 2022.ppt
DrPurnaPrasadArcot
 
Martin Reilly, 2168944, Final Version
Martin Reilly, 2168944, Final VersionMartin Reilly, 2168944, Final Version
Martin Reilly, 2168944, Final VersionMartin Reilly
 
Effect of Leverage on Expected Stock Returns and Size of the Firm
Effect of Leverage on Expected Stock Returns and Size of the FirmEffect of Leverage on Expected Stock Returns and Size of the Firm
Effect of Leverage on Expected Stock Returns and Size of the Firm
Aakash Kumar
 
An Examination into the Predictive Content of the Composite Index of Leading ...
An Examination into the Predictive Content of the Composite Index of Leading ...An Examination into the Predictive Content of the Composite Index of Leading ...
An Examination into the Predictive Content of the Composite Index of Leading ...Sean Delehunt
 
Predicting U.S. business cycles: an analysis based on credit spreads and mark...
Predicting U.S. business cycles: an analysis based on credit spreads and mark...Predicting U.S. business cycles: an analysis based on credit spreads and mark...
Predicting U.S. business cycles: an analysis based on credit spreads and mark...
Gabriel Koh
 
CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...
CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...
CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...
CASE Center for Social and Economic Research
 
81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx
taishao1
 
81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx
evonnehoggarth79783
 
B331321.pdf
B331321.pdfB331321.pdf
B331321.pdf
ajmrdjournals
 
Fisher Theory and Stock Returns: An empirical investigation for industry stoc...
Fisher Theory and Stock Returns: An empirical investigation for industry stoc...Fisher Theory and Stock Returns: An empirical investigation for industry stoc...
Fisher Theory and Stock Returns: An empirical investigation for industry stoc...
theijes
 
4. 37 52 the stock price paper
4.  37 52 the stock price paper4.  37 52 the stock price paper
4. 37 52 the stock price paper
Alexander Decker
 
Volatility, Firm Size and Economic Growth: Evidence from Chinese Stock Market
Volatility, Firm Size and Economic Growth: Evidence from Chinese Stock MarketVolatility, Firm Size and Economic Growth: Evidence from Chinese Stock Market
Volatility, Firm Size and Economic Growth: Evidence from Chinese Stock Market
The International Journal of Business Management and Technology
 
Banking sector development and economic growth slides for presentation edited
Banking sector development and economic growth slides for presentation editedBanking sector development and economic growth slides for presentation edited
Banking sector development and economic growth slides for presentation editedComrade Ibrahim Gani
 
The time consistency of economic policy and the driving forces behind busines...
The time consistency of economic policy and the driving forces behind busines...The time consistency of economic policy and the driving forces behind busines...
The time consistency of economic policy and the driving forces behind busines...accounting2010
 
Scope book
Scope bookScope book
Scope book
Ijcem Journal
 

Similar to Macroeconomic effects on the stock market (20)

Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...
Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...
Interplay Between Macroeconomic Factors and Equity Premium: Evidence Pakistan...
 
Ssrn id1911492 code1641040
Ssrn id1911492 code1641040Ssrn id1911492 code1641040
Ssrn id1911492 code1641040
 
Econometrics project
Econometrics projectEconometrics project
Econometrics project
 
Economic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of indiaEconomic indicators and stock market performance an empirical case of india
Economic indicators and stock market performance an empirical case of india
 
Int Conferece Reva Dec 2022.ppt
Int Conferece Reva Dec 2022.pptInt Conferece Reva Dec 2022.ppt
Int Conferece Reva Dec 2022.ppt
 
Martin Reilly, 2168944, Final Version
Martin Reilly, 2168944, Final VersionMartin Reilly, 2168944, Final Version
Martin Reilly, 2168944, Final Version
 
Effect of Leverage on Expected Stock Returns and Size of the Firm
Effect of Leverage on Expected Stock Returns and Size of the FirmEffect of Leverage on Expected Stock Returns and Size of the Firm
Effect of Leverage on Expected Stock Returns and Size of the Firm
 
An Examination into the Predictive Content of the Composite Index of Leading ...
An Examination into the Predictive Content of the Composite Index of Leading ...An Examination into the Predictive Content of the Composite Index of Leading ...
An Examination into the Predictive Content of the Composite Index of Leading ...
 
Predicting U.S. business cycles: an analysis based on credit spreads and mark...
Predicting U.S. business cycles: an analysis based on credit spreads and mark...Predicting U.S. business cycles: an analysis based on credit spreads and mark...
Predicting U.S. business cycles: an analysis based on credit spreads and mark...
 
CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...
CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...
CASE Network Studies and Analyses 272 - Exchange Rate: Shock Generator or Sho...
 
81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx
 
81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx81Journal of International Studies© Foundation .docx
81Journal of International Studies© Foundation .docx
 
B331321.pdf
B331321.pdfB331321.pdf
B331321.pdf
 
Fisher Theory and Stock Returns: An empirical investigation for industry stoc...
Fisher Theory and Stock Returns: An empirical investigation for industry stoc...Fisher Theory and Stock Returns: An empirical investigation for industry stoc...
Fisher Theory and Stock Returns: An empirical investigation for industry stoc...
 
4. 37 52 the stock price paper
4.  37 52 the stock price paper4.  37 52 the stock price paper
4. 37 52 the stock price paper
 
FYP
FYPFYP
FYP
 
Volatility, Firm Size and Economic Growth: Evidence from Chinese Stock Market
Volatility, Firm Size and Economic Growth: Evidence from Chinese Stock MarketVolatility, Firm Size and Economic Growth: Evidence from Chinese Stock Market
Volatility, Firm Size and Economic Growth: Evidence from Chinese Stock Market
 
Banking sector development and economic growth slides for presentation edited
Banking sector development and economic growth slides for presentation editedBanking sector development and economic growth slides for presentation edited
Banking sector development and economic growth slides for presentation edited
 
The time consistency of economic policy and the driving forces behind busines...
The time consistency of economic policy and the driving forces behind busines...The time consistency of economic policy and the driving forces behind busines...
The time consistency of economic policy and the driving forces behind busines...
 
Scope book
Scope bookScope book
Scope book
 

Macroeconomic effects on the stock market

  • 1. UCD Michael Smurfit Business School FIN40020 Financial Econometrics Group Project Macroeconomic effects on the stock market Chan, Wing Fei 14201368 Kevin Walsh 05595304 Ye, Ying 14203002 Zhou, Xuan 13209238 Zhu, Qing Ying 14203262 Statement we declare that all material included in this project is the end result of our own work and that due acknowledgement has been given in the bibliography and references to all sources be they printed, electronic or personal 3rd December 2014
  • 2. Macroeconomic effects on the stock market Page 2 of 60 Contents CHAPTER 1: INTRODUCTION .....................................................................................................4 1.1 Introduction...........................................................................................................................4 1.2 Motivation...............................................................................................................................5 CHAPTER 2: LITERATURE REVIEW.........................................................................................6 2.1 Introduction...........................................................................................................................6 2.2 Chen, Roll and Ross, (1986).............................................................................................6 2.3 Other important research.................................................................................................8 2.3.1 Shanken and Weinstein (2006) .............................................................................8 2.3.2 Lamont, (2000).............................................................................................................8 2.3.3 Ferson & Harvey, (1993)..........................................................................................8 2.3.4 Cutler, Poterba and Summers, (1989).................................................................9 2.3.5 Mcqueen & Roley, (1993), Boyd, Jagannathan & Hu, (2001) .....................9 2.3.6 Hamilton & Susmelb, (1994)...................................................................................9 2.3.7 Fama, (1981), (1990).............................................................................................. 10 2.3.8 Schwert, (1989) ........................................................................................................ 10 CHAPTER 3: METHODOLOGY .................................................................................................. 11 3.1 Data Collection................................................................................................................... 11 3.2 Data Processing ................................................................................................................. 12 3.3 Methodology....................................................................................................................... 13 3.3.1 Ordinary Least Square............................................................................................ 13 3.3.2 Model Specification.................................................................................................. 13 3.3.3 Autocorrelation......................................................................................................... 16 3.3.4 Heteroskedasticity................................................................................................... 17 3.3.5 Multicollinearity ....................................................................................................... 20 3.3.6 Exogeneity................................................................................................................... 21 Chapter 4: DATA ANALYSIS...................................................................................................... 23 4.1 Descriptive Statistic......................................................................................................... 23 4.2 Model Construction.......................................................................................................... 25 4.3 Preliminary Examination of Regression Residuals ............................................. 27 4.4 Model Specification.......................................................................................................... 30 4.4.1 Information Criterions ........................................................................................... 30 4.4.2 Durbin Watson d Test............................................................................................. 30 4.4.3 Ramsey RESET Test................................................................................................. 31 4.4.4 F-Test ............................................................................................................................ 32
  • 3. Macroeconomic effects on the stock market Page 3 of 60 4.5 Description of Empirical Model................................................................................... 33 4.6 Diagnostic Testing............................................................................................................ 34 4.6.1 Autocorrelation......................................................................................................... 34 4.6.2 Heteroskedasticity................................................................................................... 36 4.6.3 Mutlicollinearity ....................................................................................................... 40 4.6.4 Exogeneity................................................................................................................... 43 CHAPTER 5: CONCLUSION........................................................................................................ 44 5.1 Discussions.......................................................................................................................... 44 5.2 Summary of Statistical Analyses................................................................................. 44 5.3 Conclusion ........................................................................................................................... 46 References ....................................................................................................................................... 48 Appendices...................................................................................................................................... 51
  • 4. Macroeconomic effects on the stock market Page 4 of 60 CHAPTER 1: INTRODUCTION 1.1 Introduction The relationship between macroeconomic factors and stock market returns has been a prominent topic of academic research over the past number of decades. Some financial theory suggests that macroeconomic variables should systematically affect stock market returns. Asset prices are commonly believed to react sensitively to economic news and daily practice seems to support the view that individual asset prices are influenced by a wide variety of unanticipated events and that some events have a more prevalent effect on asset prices than do others. Some fundamental macroeconomic variables such as exchange rate, interest rate, industrial production and inflation have been argued to be the determinants of stock prices. It is believed that government financial policies and macroeconomic events have large influence on general economic activities including the stock market. This has motivated many researchers to investigate the dynamic relationship between stock returns and macroeconomic variables This report sets out to establish how macroeconomic factors affect returns on the S&P 500 Index. We expand on previous research by Chen, Roll and Ross, 1986 by modelling equity returns as functions of macro-economic variables and asset returns. We ran Ordinary Least Squares (OLS) regression to test the significance of the economic variables on the S&P 500 index. To make sure OLS provided a valid result, we had to insure that the tests were in line with gauss Markov Theorem. We also had to perform tests to insure that we avoided problems such as model specification, autocorrelation, heteroskedasticity, mutlicollinearity and exogeneity. In our tests, the S&P500 is our dependent variable and our independent variables include Monthly industrial Production, Change in expected Inflation, Unexpected Inflation, Risk Premium, Term Structure, oil price changes and concumption expenditure. Whilst Chen, Roll and Ross used data from 1953 - 1978, we used data from 2007 - 2011. Our data sample is 60 and we used a monthly timeframe. In this paper, we investigate the null hypothesis that each of the macroeconomic factors is not related to any one of the common stock factors.
  • 5. Macroeconomic effects on the stock market Page 5 of 60 Our research will help investors by showing them how macroeconomic factors might predict the future returns of the S&P 500 Index. It could also provide information to governments regarding how decisions they make concerning economic policy will affect the stock market. 1.2 Motivation Chen, Roll and Ross (1986) state that “A rather embarrassing gap exists between the theoretically exclusive importance of systematic "state variables" and our complete ignorance of their identity. The co movements of asset prices suggest the presence of underlying exogenous influences, but we have not yet determined which economic variables, if any, are responsible” (Chen, Roll and Ross, 1986) Our aim was to investigate the effect of macroeconomic determinants on the performance of the S&P 500 using monthly data over the period from 2007 – 2011 for seven macroeconomic variables. We used Chen, Roll and Ross’s 1986 model which determined seven economic variables that could be a source of systematic risk. The empirical model of our report uses variables including, Monthly industrial Production, Change in expected Inflation, Unexpected Inflation, Risk Premium, Term Structure, Oil price and Consumption expenditure. We believe that Chen, Roll and Ross’s 1986 model is outdated and the results conveyed by their research could differ over time given the advances in technology and ease of access of information now, compared with back then. Retesting their model using more recent data will give investors in the market as well as governments more pertinent information regarding macroeconomic factors that affect stock prices. The rest of this paper is organised as follows; Chapter 2 of this report is a Literature Review, we review past literature on the subject and explain how it corresponds to our research. Chapter 3 is the Methodology. In this chapter, we then explain the techniques used to measure unanticipated movements in the proposed variables Chapter 4 reports the results from our tests and finally Chapter 5 is the Conclusion. This section briefly summarises our findings and suggests some directions for future research.
  • 6. Macroeconomic effects on the stock market Page 6 of 60 CHAPTER 2: LITERATURE REVIEW 2.1 Introduction The relationship between macroeconomic variables and a developed stock market is well documented in literature. There is vast amounts of research concerned with the forces that determine the prices of risky securities, and there are a number of competing theories of asset pricing. These include the original capital asset pricing models (CAPM) of Sharpe (1964), Lintner (1965) and Black (1972), the intertemporal models of Merton (1973), Long (1974), Rubinstein (1976), Breeden (1979), and Cox, J., Ingersoll, J., Ross, S. 1985, and the arbitrage pricing theory (APT) of Ross (1976). The most relevant study relating to our paper is the Chen, Roll and Ross 1986 paper, which we have based our model on. Chen, Roll and Ross were the first, in a series of studies, to employ specific macroeconomic factors as proxies for the state variables in the Arbitrage Pricing Model 2.2 Chen, Roll and Ross, (1986) This paper tests whether innovations in macroeconomic variables are risks that are rewarded in the stock market. They note that financial theory suggests that macro- economic variables such as the spread between long and short interest rates, expected and unexpected inflation, industrial production, and the spread between high- and low- grade bonds, should all systematically affect stock market returns The authors believed however, that there was little research completed regarding which macroeconomic events are likely to influence all assets. Tests The set of variables they used to undertake the tests were, Industrial production, Inflation, risk premium, the term structure, market indices, consumption and finally oil prices.
  • 7. Macroeconomic effects on the stock market Page 7 of 60 They used a version of the Fama,MacBeth (1973) model to determine whether the identified economic state variables are related to the underlying factors that explain pricing in the stock market. This involved:  Choosing a sample of assets  Estimating the assets exposure to the economic state variables by regressing their returns on the unanticipated changes in the economic variables over an estimation period  The resulting estimates of exposure (betas) were used as the independent variables in 12 cross-sectional regressions, with asset returns for the month being the dependent variable. This determined the risk premium associated with the state variable and the unanticipated movement in the state variable for that month.  The first two steps were then repeated for each year in the sample. This yielded a time series of estimates of its associated risk premium for each macro variable.  The time-series means of these estimates were then tested by a t-test for significant difference from zero. Conclusion They find that these sources of risk are significantly priced and that neither the market portfolio nor aggregate consumption are priced separately. They also find that oil price risk is not separately rewarded in the stock market. Several of the economic variables that they chose to use were found to be significant in explaining expected stock returns, most notably, industrial production, changes in the risk premium and twists in the yield curve. They found that even though a stock market index such as the value-weighted New York Stock Exchange index, explains a significant portion of the time-series variability of stock returns, it has an insignificant influence on pricing when compared against the economic state variables.
  • 8. Macroeconomic effects on the stock market Page 8 of 60 They also examined the influence on pricing of exposure to innovations in real per capita consumption and found that the consumption variable was never significant. Finally, Finally they examined the impact of an index of oil price changes on asset pricing and found no overall effect. They conclude that stock returns are exposed to systematic economic news, that they are priced in accordance with their exposures, and that the news can be measured as innovations in state variables whose identification can be accomplished through simple and intuitive financial theory. They report that the null hypothesis that each of the macroeconomic factors is not related to any one of the common stock factors is rejected in every case, except for the case of inflation. 2.3 Other important research 2.3.1 Shanken and Weinstein (2006) Shanken and Weinstein (2006) re-examined the pricing of the Chen, Roll, and Ross’s macro variables and found them to be surprisingly sensitive to reasonable alternative procedures for generating size portfolio returns and estimating their betas. They concluded that Industrial Production was the only significant economic factor that affects stock markets. 2.3.2 Lamont, (2000) Lamont,(2000), seeks to identify priced macro factors by determining whether a portfolio Constructed to track the future path of a macro series earns positive abnormal returns. He concludes that portfolio’s that track the growth rates of Industrial Production, Consumption and Labour Income, earn abnormal positive returns. While the portfolio that tracks the Consumer Price Index does not. 2.3.3 Ferson & Harvey, (1993) Ferson & Harvey, 1993 investigate the predictability in national equity market returns, and its relation to global economic risks. They show how to consistently estimate the
  • 9. Macroeconomic effects on the stock market Page 9 of 60 fraction of the predictable variation that is captured by an asset pricing model for the expected returns. They used a model in which conditional betas of the national equity markets depend on local information variables, while global risk premia depend on global variables. They examined single and multiple-beta models, using monthly data for 1970 to 1989. They found that models can capture much of the predicted variation in a sample of returns for 18 countries. 2.3.4 Cutler, Poterba and Summers, (1989) Cutler, Poterba & Summers, 1989 examined the extent to which ex-post movements in aggregate stock prices could be attributed to the arrival of news. They examined the fifty largest one-day returns on the S&P 500 index over the period from 1946 through 1987. They found that Industrial Production Growth is significantly positively correlated with real stock returns over the period 1926 – 1986 but not in the 1946 – 1985 sub period. They also found that Inflation, money supply and long-term interest rates did not affect stock returns. 2.3.5 Mcqueen & Roley, (1993), Boyd, Jagannathan & Hu, (2001) There are studies that suggest that surprise announcements about macroeconomic factors may yield different results depending on the period of the business cycle that we are currently in. Mcqueen and Roley, 1993 suggest that an increase in employment may be a bullish sign as the economy emerges from a recession but may be a bearish sign near a cyclical peak. Boyd, Jagannathan and Hu, 2001 also prescribe to this theory. They examined the impact of surprise unemployment announcements on the S&P 500 over the 1948 – 1995 period. They conclude that high surprise unemployment raises stock prices during an economic expansion but lowers stock value during a contraction. 2.3.6 Hamilton & Susmelb, (1994) Hamilton & Susmelb, 1994 found that extremely large shocks, such as the October 1987 crash, arise from different causes and have different consequences for subsequent volatility than small shocks. They explore this possibility with U.S. weekly stock returns, allowing the parameters of an ARCH process to come from one of several
  • 10. Macroeconomic effects on the stock market Page 10 of 60 different regimes, with transitions between regimes governed by an unobserved Markov chain. They estimate models with two to four regimes in which the latent innovations come from Gaussian and Student f distributions. They conclude that macro conditions significantly affect equity returns. 2.3.7 Fama, (1981), (1990) A study of the relationships between stock prices and real activity, inflation, and money conducted by Fama in 1981 shows a strong positive correlation between common stock returns and real variables. Another study by Fama, 1990 argues that because equity prices reflect expected future cash flows, equity price changes should predict future macro conditions. 2.3.8 Schwert, (1989) Schwert, 1989 analyses the relation of stock volatility with real and nominal macroeconomic volatility, economic activity, financial leverage, and stock trading activity using monthly data from 1857 to 1987. He found that financial asset volatility helps to predict future macroeconomic volatility And finally Adebiyi et al. (2009) found that there was a causal relationship between oil price shocks and real exchange rates, to stock prices. As can be seen from the above literature review, there have been many contradictory studies regarding the topic. We hope that our tests can provide some clarity to the issue and encourage further research regarding macroeconomic factors effect on stock returns.
  • 11. Macroeconomic effects on the stock market Page 11 of 60 CHAPTER 3: METHODOLOGY In this section, we will be clarifying the data collection and the methodology used in this paper. Our main objective is to examine the relationship between various macroeconomic factors and S&P 500 stock index. We are using ordinary least square to run regression analysis, and a few diagnostic tests are carried out to make sure our linear regression model is in line with Gauss–Markov theorem. In order to compute this regression model, software from MathWork is adapted in our paper: MATLAB. 3.1 Data Collection Secondary data was collected for the following analysis. Historical closing price of S&P 500 stock index and macroeconomic variables data were obtained from Thomson Reuters Datastream. We are reexamining the same model from Chen, Roll, and Ross (1986) and applying it to recent data. The data collected covered a 5 year period, starting from January 2007 to December 2011 in a monthly frequency with a total of 60 observations. Table 3.1 Definitions of Variables Symbol Variable Definition (Data stream: source code) I Inflation Log Relative of U.S. Consumer Price Index (USCONPRCE) TB Treasury-Bill Rate US T-BILLS BID YLD 1M (TRUS1MT) LGB Long-Term Government Bonds US TREASURY YIELD ADJUSTED TO CONSTANT MATURITY - 20 YEAR (USGBOND.) IP Industrial Production US INDUSTRIAL PRODUCTION - TOTAL INDEX (USIPTOT.G)
  • 12. Macroeconomic effects on the stock market Page 12 of 60 Baa Low-Grade Bonds US CORP BONDS MOODYS SEASONED BAA (D) - MIDDLE RATE (FRCBBAA) OG Oil Prices Log Relative of US PPI - CRUDE PETROLEUM (USPCIPCOF) S&P S&P Composite Index S&P 500 COMPOSITE - PRICE INDEX (S&PCOMP) EXP Consumption Expenditures US PERSONAL CONSUMPTION EXPENDITURES (AR) CURA (USPERCONB) 3.2 Data Processing After we collected the data we needed from the reliable data source, Thomson Reuters Datastream. We rearranged it to transform it into the variables we needed to run the Chen, Roll, and Ross (1986) model. The formulas for data transformation can be observed in Table 3.2 Table 3.2 Data processing Symbol Variable Derived Series S&P S&P composite index - MP Monthly Industrial Production ln[𝐼𝑃(𝑡)/𝐼𝑃(𝑡 − 1)] DEI Change in Expected Inflation E[I(t + 1)|t] - E[I(t)|t - 1] UI Unexpected Inflation I(t) - E[I(t)|t - 1] UPR Risk Premium Baa(t) - LGB(t) UTS Term Structure LGB(t) - TB(t - 1) OP Oil prices 𝑙𝑛 [𝑂𝑃(𝑡)/𝑂𝑃(𝑡 − 1)] EXP Personal Consumption Expenditures 𝑙𝑛 [𝐸𝑋𝑃(𝑡)/𝐸𝑋𝑃(𝑡 − 1)]
  • 13. Macroeconomic effects on the stock market Page 13 of 60 3.3 Methodology 3.3.1 Ordinary Least Square Ordinary least square (OLS) is a method that generates the estimators, which minimize the squared distance between the regression value and the real value, for the regression model (Leng, Zhang, Kleinman and Zhu, 2007). Moreover, “The so-called Gauss- Markov theorem states that under certain conditions, least-squares estimators are ‘best linear unbiased estimators’ (BLUE), ‘best’ meaning having minimum variance in the class of unbiased linear estimators”. Furthermore, the certain conditions are: First, the regressand can be calculated by the linear function of regressors; second, the mean of the disturbance term is zero; third, the variance of the disturbance term is constant; fourth, the covariance of the disturbance term is zero; fifth, the distribution of residuals of the regression model should be normal. However, even if the residuals are not normally distributed, it will not affect the accuracy of regression results. Lastly, the independent variables are non-stochastic (Chipman, 2011). 3.3.2 Model Specification According to our analysis, under the Gauss-Markov theorem, the classical linear regression model should have accurate variables and the form of function. 3.3.2.1 Akaike & Schwarz Information Criteria The Akaike information criterion (AIC) is defined as: AIC = 2K − 2 ln(L) Where K is the number of parameters, L is the function of maximum likelihood. AIC suggests that the best model is the one that fits data well without over fitting. Therefore, the regression model with the smallest AIC is the best fitting model (Bozdogan, 2000).
  • 14. Macroeconomic effects on the stock market Page 14 of 60 The Schwarz information criterion, which is also named Bayesian Information Criterion (BIC), is defined as: BIC = −2 ln(L) + ln(n)K Where K is the number of parameters, L is the function of maximum likelihood and n is the sample size. Similar to AIC, BIC is the method to find the model that can fit the data best, the smaller the BIC, the better the model (Liddle, 2007). 3.3.2.2 Durbin Watson D Test Durbin Watson test (DW) is a method to test the autocorrelation. Assuming that the error term of a regression model can be described as: Ut = ρUt−1 + ε If ρ equals 0, then the model does not have autocorrelations. We can use the d value to test the null hypothesis, which assumes that ρ equals 0. The d value of DW test is defined as: d = ∑(Ut − Ut−1)2 / ∑ Ut 2 ≈ 2(1 − ρ) The d values range from 0 to 4. If the value of d closes to 4 or 0, then the disturbance terms of the model have negative or positive correlation respectively (Femenias, 2005), which means that essential variables are omitted. 3.3.2.3 Ramsey Reset Test “The reset test proposed by Ramsey is a general misspecification test, which is designed to detect both omitted variables and inappropriate function form. The reset test is based on the Lagrange Multiplier principle and usually performed using the critical values of the F-distribution (Schukur and Mantalos, 2004). Specially, in a reset test, the null
  • 15. Macroeconomic effects on the stock market Page 15 of 60 hypothesis is that the regression model is a specification model. Considering the following function: y = ∂x + γ1ŷ2 + ⋯ + γk−1ŷk + ϵ By using the F-test, if the value of γn is significantly different from zero, which indicates that the non-linear regressors can affect the regressand, the model is a misspecification model (Ramsey, 1969). 3.3.2.4 Davidson & Mackinnon Test The Davidson and Mackinnon J test is an approach to choose the best model among non-nested competing models by building a new nested model, which includes all non- nested models. For example, yn is the value calculated by model A and zn is the value calculated by model B. Then use the yn and znas variables and add them into a new model C. Moreover, use F test to test the statistically significant of the coefficient of ynandzn. Assuming that the coefficient of yn and zn are β and α respectively, then the following conclusions can be draw: If β is significantly different from 0 and α is not significantly different from 0, then we choose model A; If β is not significantly different from 0 but α is significantly different from 0, then model B is better than model A; If both coefficients are significantly different from 0 (or not), then the J test cannot give a specific answer (Davidson and Mackinnon, 1981). Furthermore, the J test is not appropriate for small sample, under which the J test may reject the null hypothesis when it is true (Godfrey and Pesaran, 1983). 3.3.2.5 Jarque-Bera Test Jarque-Bera test is a method to test whether the sample is normally distributed. Specially, the skewness and kurtosis of a normal distribution are equal to 0 and 3 respectively. Therefore, the closer the skewness and kurtosis of sample distribution to 0 and 3respectively, the closer the sample distribution to the normal distribution. The JB test is defined as: JB = n 6 (s2 + 1 4 (k − 3)2 )
  • 16. Macroeconomic effects on the stock market Page 16 of 60 Where n is the sample size, K is the Kurtosis, S is the Skewness. The JB statistic is asymptotic to a chi-squared distribution if the sample is derived from a normally distributed population. The null hypothesis of JB test is that the sample is normally distributed. The rejection of the null hypothesis means that the distribution of sample is not normally distributed (Jarque and Bera, 1980). 3.3.3 Autocorrelation Autocorrelation is the disturbance terms of a regression model correlated to each other. Under the autocorrelation, the estimators of the model are still un-biased and consistent, but they may not be efficient any more (Brindley, 2008). 3.3.3.1 Durbin-Watson Test As shown in the model specification section, Durbin Watson test (DW) is a method to test the autocorrelation and the d values of the DW test range from 0 to 4. Moreover, there is an upper bound (du)and a lower bound (dl) in the test. If4 − dl < d < 4, or0 < d < dl, the model has serial correlation. Ifdu < d < 4 − du, the disturbance terms do not correlate with each other. Otherwise, the d test cannot provide an answer (Femenias, 2005). 3.3.3.2 Breusch-Godfrey Test The Breusch-Godfrey test is a more powerful test for examining serial correlation than the Durbin Watson test, since it can be used on autoregressive model and to test higher order autocorrelation. The null hypothesis of the B-G test is that there is no serial correlation, under which the distribution of (n − p)R2is asymptotic to a chi-squared distribution. The rejection of the null hypothesis indicates that there is serial correlation (Breusch, 1978 and Godfrey, 1978).
  • 17. Macroeconomic effects on the stock market Page 17 of 60 3.3.3.3 Remedies If the autocorrelation is caused by model misspecification, then we can specify the model and avoid the autocorrelation. If not, we can continue to use the OLS model or use some remedial models. This paper considers two remedial methods: The Cochrane- OrcuttAR(1) adjusted OLs regression and the heteroskedasticity and autocorrelation consistent standard errors, define as following: Cochrane–Orcutt Estimation If an OLS model has autocorrelation, then the model is not appropriate to be used. In this situation, the generalized least square (GLS) model can be used to substitute the OLS model and avoid the autocorrelation. Newey-West Estimator If the autocorrelation cannot be eliminated, then the heteroskedasticity and autocorrelation (HAC) consistent standard errors, which is introduced by Newey (1986), can be used to solve the problem of autocorrelation and heteroskedasticity. 3.3.4 Heteroskedasticity 3.3.4.1 Preliminary Examination of the Residuals We test the normality of residuals using the following 2 methods: Informal Method: Histogram and Q-Q Plot Histogram is a graphical representation of the distribution of data and is an estimate of the probability distribution of a continuous variable.
  • 18. Macroeconomic effects on the stock market Page 18 of 60 Q–Q plot is a graphical method for comparing two probability distributions by plotting their quintiles against each other. If the two distributions being compared are similar, the points in the Q–Q plot will approximately lie on the line y = x. Formal Method: Jarque-Bera Test The Jarque–Bera test is a goodness-of-fit test of whether sample data have the skewness and kurtosis matching a normal distribution: JB is defined as: Where n is the number of observations (or degrees of freedom in general); S is the sample skewness, and K is the sample kurtosis. In order to test whether they’re heteroskedasticity in the residuals, we use following three methods: 3.3.4.2 Goldfeld-Quandt Test Goldfeld–Quandt test is a method used to check for homoscedasticity in regression model (Thursby, 1982), and there are 4 steps: Step 1. Order the observations, Y, according to the value of X, beginning with the lowest of the X values. Step 2.Omit c central observations (c = (1/5)*n). Remaining two groups of (n-c)/2 observations. Step 3. Compute the residual sum of squares from the 1st and 2nd groups Step 4. Compute the ratio Lambda = [RSS2/df]/ [RSS1/df], where df = [(n-c)/2]-k, k is the number of parameters to be estimated in each regression including the intercept, n is the sample size.
  • 19. Macroeconomic effects on the stock market Page 19 of 60 Under the 5% significance level, if the p-value is larger than 0.05, we accept the null hypothesis that the residuals in the population regression function are homoscedastic. Otherwise, we accept the alternative hypothesis that the residuals in the population regression function are heteroskedastic. 3.3.4.3 White’s General Heteroscedasticity Test Is easier to implement and does not rely on the normality assumption, it also follows 4 steps (Koenker and Bassett, 1982): Step 1. Estimate the linear regression model. Step 2. Obtain the R2 from the auxiliary regression. Step 3. Under the null of homoskedasticity it can be shown that n. 𝑅2 ~𝑥 𝑑𝑓 2 Step 4. If one rejects the null hypothesis then there is heteroskedasticity at the selected confidence level. 3.3.4.4 Breusch Pagan Heteroscedasticity Test This test follows the simple three-step procedure: Step 1: Apply OLS in the model and compute the regression residuals. Step 2: Perform the auxiliary regression Step 3: The test statistic is the result of the coefficient of determination of the auxiliary regression in Step 2 and sample size with: The test statistic is asymptotically distributed as 𝜒2 (𝑝 − 1) under the null hypothesis of homoscedasticity (Lyon and Tsai, 1996).
  • 20. Macroeconomic effects on the stock market Page 20 of 60 3.3.5 Multicollinearity Because there are multiple predictors in our model, if these predictors are correlated and give redundant information, in other words, the model input variables are not independent of one another: 𝑥𝑖 ≈ ∑ 𝑥𝑖𝑗≠𝑖 𝛼𝑗. Perfect model: 𝜆1 𝑋1 + 𝜆2 𝑋2 + ⋯ + 𝜆𝐽 𝑋𝑗 = 0 Less than perfect: 𝜆1 𝑋1 + 𝜆2 𝑋2 + ⋯ + 𝜆𝐽 𝑋𝑗 + 𝜈𝑖 = 0 Multicollinearity has a strong effect on the size of the regression coefficients, and sometimes it can cause coefficients to have opposite signs. The reason for the event of multicollinearity problem could lead to the wrong usage of dummy variables for an equation or including a similar variable which is highly correlated (Gujariti & Porter, 2009). In this section, these methods are used: 1. Variance Inflation Factor (VIF). 2. Tolerance (TOL). 3. Condition Indices (CI) 3.3.5.1 Variance Inflation Factor (VIF) As we know, the variance of an OLS estimator is: Var(𝛽𝑖 ̂) = 𝜎2 ∑(𝑥𝑖 − 𝑥̅)2 ( 1 1 − 𝑅𝑖 2) Where𝛽𝑖 ̂is the partial regression coefficient of 𝑥𝑖 and 𝑅𝑖 2 is the R2 in the regression of 𝑥𝑖on the remaining (K-2) regressors. The variance inflation factor, or VIF, is a measure of the multicollinearity of a given predictor variable. For a variable i, the VIF is calculated by computing the R2 from a regression with i and all other predictor variables. The function is:
  • 21. Macroeconomic effects on the stock market Page 21 of 60 𝑉𝐼𝐹𝑖 = 1 1 − 𝑅𝑖 2 Larger values of VIF indicate more multicollinearity. In other words, the larger the VIF, the larger the standard error of the regression coefficient for variable i. The tolerance is another measure of the multicollinearity for a given variable i. 3.3.5.2 Tolerance (TOL) The inverse of the VIF is called tolerance (TOL). 𝑇𝑂𝐿𝑖 = 1 𝑉𝐼𝐹𝑖 The smaller the tolerance, the larger the standard error of the regression coefficient for variable i. In other words, smaller values of tolerance indicate more multicollinearity. 3.3.5.3 Condition Indices (CI) And the Condition indices are computed by finding the eigenvalues of the correlation matrix of the variables in the study. It gives an estimate of multicollinearity for each successive eigenvalue: 𝐶𝐼𝐼 = √ 𝜆 𝑚𝑎𝑥 𝜆𝑖 High variance decomposition proportions (>0.5) for two or more estimated regression coefficient variances corresponding to the same small singular value associated with each high condition index will identify the covariates involved in the corresponding dependency. 3.3.6 Exogeneity A variable is endogenous when there is a correlation between the parameter or variable and the error term. endogeneity can arise as a result of measurement error, autoregression with autocorrelated errors, simultaneity and omitted variables. Broadly,
  • 22. Macroeconomic effects on the stock market Page 22 of 60 a loop of causality between the independent and dependent variables of a model leads to endogeneity. 3.3.6.1 Hausman Test Here we use Hausman Test to test whether the factors are endogenous explanatory variables or not. And we have: H0: Factor is endogenous explanatory variables. H1: Factor is endogenous explanatory variables. A simple related test for endogeneity is the Hausman test. Under the null we consider the model: y = xβ + 𝜀 Under the alternative we consider the augmented model: y = xβ + 𝛾𝑥̂∗ + 𝜀∗ Where x̂∗ are k* the explanatories under suspicion causing endogeneity approximated by their estimates using the instruments.(k* is the number of explanatories which are under consideration wrt endogeneity) The idea is that under the null hypothesis of no endogeneity, x̂∗ represent irrelevant additional variable, so γ=0. Under the alternative the null model yields biased estimates. The test statistics is a common F-test with K*and (n-K0-k*) degrees of freedom, where the restricted model (under the null γ=0) is tested against the unrestricted (alternative) one. ( K0 is the number of explanatories which are not under consideration wrt endogeneity) (Hahn, Ham, and Moon, 2011). Important to note: The test depends essentially on the choice of appropriate instruments.
  • 23. Macroeconomic effects on the stock market Page 23 of 60 Chapter 4: DATA ANALYSIS In this section, we will be reviewing the descriptive statistic. Model specification test, ordinary least square results and the diagnostic test were conducted to check whether our model in-line with the OLS assumption and the Gauss–Markov theorem. 4.1 Descriptive Statistic Table 4.1 below shows the descriptive statistics of each variable we have collected. But the figures from different variables have a small divergence, as some of the variables are transformed into natural logarithm form. As we can see the p-value from Jarque- Bera test in the table, DEI and OP are normally distributed at the significant level of 5%. Table 4.1: Summary Stats of Variables Variable s Mean Media n Mode Range Std.Dev . Varianc e Skewnes s Kurtosi s JB.Stat . JB.P.Valu e SNP - 0.001 9 0.0143 - 0.314 9 0.489 1 0.0715 0.0051 -1.4524 8.3628 92.993 1.00E-03 MP - 5.91E- 04 0.0013 -0.043 0.058 5 0.0098 9.57E- 05 -1.8886 8.2779 105.31 1.00E-03 DEI 0.001 9 0.0019 0.001 8 1.16E- 04 3.43E- 05 1.17E- 09 -5.30E- 13 1.7993 3.604 0.0879 UI 0.009 1 0.0057 - 0.007 9 0.052 8 0.0132 1.74E- 04 1.0693 3.4334 11.904 0.0111 UPR 2.400 2 2.18 1.83 4.19 0.971 0.9428 1.6589 4.9923 37.442 1.00E-03 UTS 2.938 5 3.432 -0.245 4.737 1.459 2.1288 -0.9326 2.4853 9.3588 0.0178 OP 5.371 6 5.378 5.059 4 1.398 6 0.3075 0.0946 -0.6609 3.4221 4.8128 0.055 EXP 0.002 2 0.0034 - 0.013 3 0.026 1 0.0045 1.98E- 05 -1.5028 6.2741 49.383 1.00E-03 Figure 4.1 below shows the line graphs of each variable. As we can see some of the variables have a trend pattern, which is violating the standard statistical assumptions (e.g. CLRM assumptions). We need stationary data in the OLS model in order to obtain more reliable results. Transformation of data is being used to solve this problem, we tried first differencing on the data and realised minor trends could still be observed from the graph (Figure 4.2), so we used second differencing of data to obtain stationary data, as shown in Figure 4.3.
  • 24. Macroeconomic effects on the stock market Page 24 of 60 Figure 4.1: Line Graph of Variables Figure 4.2: Line Graph of First Differencing Variables
  • 25. Macroeconomic effects on the stock market Page 25 of 60 Figure 4.3: Line Graph of Second Differencing Variables 4.2 Model Construction After transforming the data to become stationary by using second differencing, we ran an OLS regression with the second differencing dependent variable (ddSNP) against all the other second differenced independent variables (Table 4.2). We found that ddDEI and ddURP are highly insignificant, especially ddDEI with abnormal coefficient. We decided to formulate a restricted model without these two independent variables, ddDEI and ddURP, as shown in Table 4.3. As we can see from the result of the restricted model, its adjusted R-square is higher than the unrestricted model.
  • 26. Macroeconomic effects on the stock market Page 26 of 60 Table 4.2: OLS Regression Result of Unrestricted Model Ordinary Least-squares Estimates R-squared = 0.3405 Rbar-squared = 0.2482 sigma^2 = 0.0254 Durbin-Watson = 3.3708 Nobs, Nvars = 58, 8 *************************************************************** Variable Coefficient t-statistic t-probability Cons -0.001362 -0.065003 0.948431 ddMP -2.961828 -2.120907 0.038911 ddDEI 2.27378E+13 1.025358 0.31013 ddUI -10.754665 -1.255579 0.215105 ddURP -0.020966 -0.319217 0.750892 ddUTS 0.096338 2.183662 0.033706 ddOP 0.267986 1.353807 0.181886 ddEXP 5.84429 2.02636 0.048079 Table 4.3: OLS Regression Result of Restricted Model Ordinary Least-squares Estimates R-squared = 0.3252 Rbar-squared = 0.2603 sigma^2 = 0.0250 Durbin-Watson = 3.3956 Nobs, Nvars = 58, 6 *************************************************************** Variable Coefficient t-statistic t-probability Cons -0.001386 -0.06669 0.947085 ddMP -2.539738 -2.211562 0.031416 ddUI -9.919002 -1.383805 0.17233 ddUTS 0.105221 2.63457 0.011073 ddOP 0.223601 1.177789 0.244243 ddEXP 4.290565 1.754197 0.085288 The adjusted R-square of the restricted model is higher, and we suspect that the unrestricted model has less explanation power for the data. But the result we get from the Wald F-test (Table 4.4) shows that we have no evidence to reject the restrictions as inconsistent with the data.
  • 27. Macroeconomic effects on the stock market Page 27 of 60 Table 4.4: Wald F-test on Restricted and Unrestricted Model Wald F-test f-statistic f-probability 0.5796 0.5639 4.3 Preliminary Examination of Regression Residuals By looking at the graph of residuals for the restricted and unrestricted model (Figure 4.4, and Figure 4.5), we can see that they are fluctuating around the mean of zero, we assume that they are stationary. Figure 4.4: Line Graph of the Residuals for Unrestricted Model
  • 28. Macroeconomic effects on the stock market Page 28 of 60 Figure 4.5: Line Graph of the Residuals for Restricted Model For the normality testing of residuals, we used the Jarque-Bera test on the residuals of the restricted and unrestricted model. By looking at the histograms of the residuals, we observe that it is not fully normal distributed. But the result from the Jarque-Bera test shows that we have no evidence to reject the null hypothesis, which is the residuals are normal distributed.
  • 29. Macroeconomic effects on the stock market Page 29 of 60 Figure 4.6: Normality Test of the Residuals for Unrestricted Model Jarque-Bera statistic = 4.1248 Jarque-Bera Probability = 0.0706 Figure 4.7: Normality Test of the Residuals for Restricted Model Jarque-Bera statistic = 2.3255 Jarque-Bera Probability = 0.1834
  • 30. Macroeconomic effects on the stock market Page 30 of 60 4.4 Model Specification 4.4.1 Information Criterions In this section, we are using Akaike Information Criterion (AIC) and Schwarz Information Criterion (SIC) to compare the restricted and unrestricted model. In Table 4.5, we can see that the AIC and the SIC value for the unrestricted Model is lower, which shows that the Unrestricted Model is a better fitting model. Table 4.5: Information Criterions Unrestricted Model Restricted Model AIC = -3.6208 SIC = -3.3764 AIC = -3.6645 SIC = -3.4900 4.4.2 Durbin Watson d Test We are using Durbin Watson d Test to test for an omitted variable. Firstly, we try to test the ddDEI variable, as it shows insignificant in our Unrestricted Model OLS result and its coefficient is abnormally high. In this section, we try to see whether ddDEI is captured by the residuals, when we removed it in our OLS regression. In Table 4.6, the results show that we could not reject the null hypothesis at 1% significant level, it means ddDEI do not get captured by the residuals, hence it is not an omitted variable, and we decided to drop this variable. Table 4.6: Test for ddDEI as Omitted Variable Durbin Watson d Value = 2.3617 𝑑𝑙 = 1.382 𝑑 𝑢 = 1.449 4 − 𝑑 𝑢 = 2.5510 4 − 𝑑𝑙 = 2.6180 Besides this, we performed the same test on ddURP, as it shows highly insignificant in the OLS regression as well. From Table 4.7, the result shows that we could not reject
  • 31. Macroeconomic effects on the stock market Page 31 of 60 the null hypothesis at the 1% significant level, which means ddURP is not an omitted variable, and we decided to drop this variable as well. Table 4.7: Test for ddURP as Omitted Variable Durbin Watson d Statistic = 2.0254 𝑑𝑙 = 1.382 𝑑 𝑢 = 1.449 4 − 𝑑 𝑢 = 2.5510 4 − 𝑑𝑙 = 2.6180 4.4.3 Ramsey RESET Test In this part, we are testing the adequate of functional form for our model, by testing linear against quadratic and cubic functional form. From the Table 4.8, we can see that 𝑦̂ 2 is not significant, which mean quadratic functional form is not significant in our model. And from the Table 4.9, we can see that the 𝑦̂ 3 is not significant as well, cubic functional form is not significant in our model. Table 4.8: Testing Against Quadratic Functional Form Ordinary Least-squares Estimates R-squared = 0.3374 Rbar-squared = 0.2595 sigma^2 = 0.0250 Durbin-Watson = 3.3789 Nobs, Nvars = 58, 7 *************************************************************** Variable Coefficient t-statistic t-probability Cons -0.010817 -0.471317 0.639424 ddMP -2.097688 -1.696905 0.09581 ddUI -9.860284 -1.374773 0.175212 ddUTS 0.111505 2.754326 0.008132 ddOP 0.236281 1.24093 0.22031 ddEXP 3.857029 1.550377 0.127235 𝑦̂ 2 0.883846 0.969647 0.336799
  • 32. Macroeconomic effects on the stock market Page 32 of 60 Table 4.9: Testing Against Cubic Functional Form Ordinary Least-squares Estimates R-squared = 0.3687 Rbar-squared = 0.2803 sigma^2 = 0.0243 Durbin-Watson = 3.3436 Nobs, Nvars = 58, 8 *************************************************************** Variable Coefficient t-statistic t-probability Cons -0.007205 -0.316823 0.752697 ddMP -1.035063 -0.742774 0.461094 ddUI -4.501316 -0.57347 0.568897 ddUTS 0.053503 0.984516 0.329602 ddOP 0.195311 1.030586 0.307695 ddEXP 3.366096 1.361456 0.179473 𝑦̂ 2 0.422823 0.447318 0.656578 𝑦̂ 3 6.324238 1.572559 0.122128 4.4.4 F-Test By performing F-Test, we can see that the F Statistic is lesser than the critical value of 2.88334, as shown in Table 4.10. We can conclude that there is no problem in functional form of our model. Table 4.10: Result of F-Test 𝐹 = ((𝑅 𝑛𝑒𝑤 2 − 𝑅 𝑜𝑙𝑑 2 )/𝑘)/( 1 − 𝑅 𝑛𝑒𝑤 2 𝑛 − 𝑝 ) F Statistic = 1.3377 ; Critical Value = 2.88334 Where, n = the sample size k = the number of new regressors p = the no. of parameters in the new model
  • 33. Macroeconomic effects on the stock market Page 33 of 60 4.5 Description of Empirical Model After we confirmed the model specification, we ended up with an empirical model as follows: ddSNP = 𝛼 + 𝛽(ddMP) + 𝛽(ddUI) + 𝛽(ddUTS) + 𝛽(ddOP) + 𝛽(ddEXP) + ε ddSNP = S&P index (second differenced) ddMP =Monthly Industrial Production (second differenced) ddUI = Unexpected Inflation (second differenced) ddUTS = Term Structure (second differenced) ddOP = Oil Price (second differenced) ddEXP = Consumption Expenditures (second differenced) Furthermore, Table 4.11 below shows the results of OLS regression of the Empirical model. We can see that ddMP, ddUI, and ddUTS is significant at 5% significant level; in contrast, ddOP and ddEXP is not significant at 5% significant level. The R-squared is 0.3253. This means that 32.52% of the variation of ddSNP can be explained by the model. Table 4.11: OLS Regression of Empirical Model Ordinary Least-squares Estimates R-squared = 0.3252 Rbar-squared = 0.2603 sigma^2 = 0.0250 Durbin-Watson = 3.3956 Nobs, Nvars = 58, 6 *************************************************************** Variable Coefficient t-statistic t-probability Cons -0.001386 -0.06669 0.947085 ddMP -2.539738 -2.211562 0.031416 ddUI -9.919002 -1.383805 0.17233 ddUTS 0.105221 2.63457 0.011073 ddOP 0.223601 1.177789 0.244243 ddEXP 4.290565 1.754197 0.085288
  • 34. Macroeconomic effects on the stock market Page 34 of 60 After we ran the OLS regression, we got the coefficients for each variable and we substituted it into the Empirical Model, as follows: ddSNP = −0.001386 + (−2.539738)(ddMP) + (−9.919002)(ddUI) + (0.105221)(ddUTS) + (0.223601)(ddOP) + (4.290565)(ddEXP) + ε We can interpret this result as: when there is one unit increase in ddMP, ddSNP will decrease by 2.54. While one unit decreases in ddUI, there will be increase of 10 units in ddSNP, vice versa. ddSNP will be increased by 0.1053 units when ddUTS increase by one unit. When ddOP increases by one unit, ddSNP increases by 0.2236 units. While if ddEXP increases by one unit, ddSNP will increase by 4.3 units. All interpretations here are assuming ceteris paribus. 4.6 Diagnostic Testing 4.6.1 Autocorrelation To determine whether there is serial correlation of error term in our model, we have used the Durbin-Watson test and Breusch-Godfrey Test. 4.6.1.1 Durbin-Watson Test We obtained the Durbin-Watson Value from the OLS regression, the result shown in Table 4.12. We have to reject the null hypothesis of the Durbin-Watson test. The result shows that we have a negative autocorrelation problem in our model. Table 4.12: Durbin-Watson Test Durbin-Watson Value = 3.3956 𝑑𝑙 = 1.248 𝑑 𝑢 = 1.598 4 − 𝑑 𝑢 = 2.4020 4 − 𝑑𝑙 = 2.7520
  • 35. Macroeconomic effects on the stock market Page 35 of 60 4.6.1.2 Breusch-Godfrey Test From the result of Table 4.13, we can see that theε 𝑡−1,ε 𝑡−2 and ε 𝑡−3 are significant at 1% level. We can conclude that there is serial autocorrelation in our model. Table 4.13: Breusch-Godfrey Test Ordinary Least-squares Estimates R-squared = 0.6675 Rbar-squared = 0.6132 sigma^2 = 0.0088 Durbin-Watson = 2.2930 Nobs, Nvars = 58, 9 *************************************************************** Variable Coefficient t-statistic t-probability Cons 0.002653 0.2147 0.830892 ddMP -0.780689 -1.13398 0.26232 ddUI 7.30608 1.614222 0.112901 ddUTS 0.019732 0.798857 0.428229 ddOP -0.099815 -0.869827 0.388636 ddEXP -2.269455 -1.525207 0.133637 ε 𝑡−1 -1.107859 -8.764289 0 ε 𝑡−2 -0.825458 -4.670847 0.000024 ε 𝑡−3 -0.560972 -4.19637 0.000114 4.6.1.3 Remedy Cochrane–Orcutt Estimation We solve the autocorrelation problem by transforming the model to Generalised least Squares, which is Cochrane-Orcutt AR(1) adjusted OLS regression as shown in Table 4.14. The result shows that the Durbin-Watson Statistic is closer to 2. Besides, the R- squared is obviously higher, and the ddEXP is significant at 5% significant level in this transformation model.
  • 36. Macroeconomic effects on the stock market Page 36 of 60 Table 4.14: Cochrane–Orcutt Estimation Cochrane-Orcutt serial correlation Estimates R-squared = 0.4636 Rbar-squared = 0.4110 sigma^2 = 0.0119 Durbin-Watson = 2.4772 Rho estimate = -0.7418 Rho t-statistic = -8.2781 Rho probability = 0.0000 Nobs, Nvars = 57, 6 *************************************************************** Iteration information rho value convergence iteration -0.700337 0.700337 1 -0.740943 0.040606 2 -0.741803 0.00086 3 -0.741819 0.000016 4 *************************************************************** Variable Coefficient t-statistic t-probability Cons -0.00092 -0.110928 0.912109 ddMP -3.872029 -3.714257 0.000506 ddUI -13.932701 -3.137159 0.002832 ddUTS 0.072536 2.324864 0.024097 ddOP 0.243548 1.585996 0.118922 ddEXP 5.776322 2.383445 0.020913 4.6.2 Heteroskedasticity 4.6.2.1 Preliminary Examination of the Residuals We test the normality of residuals using the following 2 methods: Informal Method: Histogram and Q-Q Plot Here we compare the residuals’ distribution of our regression model and residuals’ distribution of random normal. And find that residuals of both two regression models follow normal distribution as shown in Figure 4.8.
  • 37. Macroeconomic effects on the stock market Page 37 of 60 Figure 4.8: Graphs of the Residuals OLS Residuals OLS Residuals^2 Normal rand Normal rand^2 From the Figure 4.9, we can see from the figure that, both of two lines lie approximately on the line y=x. So, we conclude that residuals of both the regression models follow normal distribution. 5 10 15 20 25 30 35 40 45 50 55 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 OLSResiduals 5 10 15 20 25 30 35 40 45 50 55 0 0.05 0.1 0.15 0.2 0.25 OLSResiduals2 5 10 15 20 25 30 35 40 45 50 55 0 0.02 0.04 0.06 0.08 0.1 0.12 0.14 0.16 0.18 0.2 Normalrand2 5 10 15 20 25 30 35 40 45 50 55 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 Normalrand -0.5 0 0.5 0 1 2 3 4 5 6 7 8 OLS Residuals -0.5 0 0.5 0 1 2 3 4 5 6 7 Normal Random
  • 38. Macroeconomic effects on the stock market Page 38 of 60 Figure 4.9: Q-Q Plot of Residuals Formal method Jarque-Bera Test Next, we perform the Jarque-Bera test on the normality on residuals, as shown in Table 4.15. If h =0, we can accept the null hypothesis that residuals of regression model follow normal distribution. From the result, we can conclude that residuals follow normal distribution at 1% significance level, at 5% significance level and at 10% significance level respectively. Table 4.15: Results of Jarque-Bera test h jbstat p-value Jarque Bera Test at 1% significance 0 2.3255 0.1834 Jarque Bera Test at 5% significance 0 2.3255 0.1834 Jarque Bera Test at 10% significance 0 2.3255 0.1834 -4 -2 0 2 4 -0.5 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 Standard Normal Quantiles QuantilesofInputSample OLS Residuals -4 -2 0 2 4 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 0.5 Standard Normal Quantiles QuantilesofInputSample Normal Random
  • 39. Macroeconomic effects on the stock market Page 39 of 60 Goldfeld-Quandt Test After confirming the residuals are in normal distribution, we proceed to the Goldfeld- Quandt Test, as shown in Table 4.16. Since the p-value is larger than 0.05, we fail to reject the null hypothesis, so the residuals in the population regression function are homoscedastic. Table 4.16: Result of Goldfeld-Quandt Test Goldfeld-Quandt Test f-stat f-prob Result 1.2999 0.2826 Homoscedastic White’s General Heteroscedasticity Test From the Table 4.17, we can see that the P-value is larger than 0.05, so we get the same result: the residuals in the population regression function are homoscedastic. Table 4.17: Result of White’s General Heteroskedasticity Test White’s General Heteroskedasticity Test Chisqr prob Result 14.0082 0.5509 Homoscedastic Breusch Pagan Heteroscedasticity test The result we got from this test shows the same result (Table 4.18), there is no Heteroscedasticity in the residuals of the population regression function.
  • 40. Macroeconomic effects on the stock market Page 40 of 60 Table 4.18: Result of Breusch Pagan Heteroscedasticity test Breusch Pagan Heteroscedasticity test Breush-Pagan LM- statistic Chi-squared probability Degrees of freedom Result 3.38448744 0.6409 5 Homoscedastic 4.6.3 Mutlicollinearity 4.6.3.1 Preliminary Examination of Multicollinearity In the first step, we analyze the data briefly. As we can see from the OLS result of the Empirical Model, the R2 of our model is 0.3252, it is relatively low. That means the possibility of having multicollinearity in our model is very low. Because there is unlikely to be multicollinearity if we have high R2 but few significant t ratios. And from the Figure 4.10, we can have an overview impression of the relationship between 5 variables and ddSNP. There is no significant multicollinearity problem. Figure 4.10: Graph of Mutlicollinearity between Variables -0.08 -0.06 -0.04 -0.02 0 0.02 0.04 0.06 0.08 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 ddMP ddSNP -0.01 -0.005 0 0.005 0.01 0.015 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 ddUI ddSNP
  • 41. Macroeconomic effects on the stock market Page 41 of 60 Multicollinearity is to check the relationship or correlation between independent variables in the model. From Table 4.19, there is one pair of independent variables that are highly correlated (>0.5), and the condition number is 0.2314, less than 1. Table 4.19: Result of Correlation Test of Variables ddMP ddUI ddUTS ddOP ddEXP ddMP 1.0000 0.1418 0.0000 -0.0710 0.0409 ddUI 0.1418 1.0000 -0.2708 0.4988 0.2191 ddUTS 0.0000 -0.2708 1.0000 0.1064 0.0627 -2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 ddUTS ddSNP -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 ddOP ddSNP -0.04 -0.03 -0.02 -0.01 0 0.01 0.02 0.03 0.04 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 ddEXP ddSNP -0.01 -0.005 0 0.005 0.01 0.015 -0.4 -0.3 -0.2 -0.1 0 0.1 0.2 0.3 0.4 ddUI ddOP
  • 42. Macroeconomic effects on the stock market Page 42 of 60 ddOP -0.0710 0.4988 0.1064 1.0000 0.2478 ddEXP 0.0409 0.2191 0.0627 0.2478 1.0000 Condition Number: 0.4731 4.6.3.2 Variance Inflation Factor (VIF) and Tolerance (TOL) Therefore, as we can see in the Table 4.20, the estimation from VIF and TOL shows that it has no serious Multicollinearity problem between OP and UI. Table 4.20: Multivariate Variance Inflation Factors & Tolerance VIF_ddMP 1.0594 TOL_ddMP 0.9439 VIF_ddDEI 1.6597 TOL_ddDEI 0.6025 VIF_ddUI 1.1967 TOL_ddUI 0.8356 VIF_ddOP 1.5330 TOL_ddURP 0.6523 VIF_ddEXP 1.0887 TOL_ddUTS 0.9185 VIF_ddOP VS ddUI 1.0887 TOL_ddOP VS ddUI 0.9185 4.6.3.3 Condition Indices (CI) However, the estimation from CI is 18.5940 (Table 4.21), which shows that it has some multicollinearity problems with our model. Although multicollinearity will deteriorate statistical power; hypotheses testing may suffer from a type II error, we chose to do nothing. Because it is a data deficiency problem and cannot be easily circumvented.
  • 43. Macroeconomic effects on the stock market Page 43 of 60 Table 4.21: Belsley, Kuh, Welsch Variance-decomposition 4.6.4 Exogeneity 4.6.4.1 Hausman Test We can see from the result (Table 4.22) that: input ddUI, ddUTS, ddOP and ddEXP are endogenous variables. Table 4.22: Result from Hausman Test ddMP ddUI ddUTS ddOP ddEXP Hausman stat 1.5792 7.2194 -4.4881 -4.9302 -4.9868 p-value 0.8691 1.7647e-09 0.0026 4.5855e-04 3.6119e-04 We can use instrument variable of relative endogenous variable to replace this endogenous variable and get consistent but biased estimator. This instrument variable must be correlated with the endogenous explanatory variables but cannot be correlated with the error term in the explanatory equation. Besides, Two Stage Least Square (TSLS) is a commom method, which includes create an investment variable to eliminate endogeneity K(x) CONS ddMP ddDEI ddUI ddOP ddEXP 1 1.00 0.00 0.00 0.00 0.00 0.00 2 0.00 0.00 0.00 0.83 0.00 0.00 7 0.00 0.00 0.00 0.01 0.66 0.00 54 0.00 0.94 0.00 0.00 0.00 0.00 117 0.00 0.01 0.00 0.00 0.05 0.98 346 0.00 0.05 1.00 0.15 0.29 0.02 CI = 18.5940
  • 44. Macroeconomic effects on the stock market Page 44 of 60 CHAPTER 5: CONCLUSION 5.1 Discussions From the results we presented in Chapter 4 Data Analysis, we can conclude that our Empirical Model is not the best linear unbiased estimator. Since we performed the preliminary test, our data has transformed to become stationary and the residuals are normally distributed, we assume that our error term has zero population mean. In the model specification test, we found that our Empirical model is correctly specified, and have a correct functional form. Next, we found that we have a serial autocorrelation problem in our model as well, and we use GLS regression to solve this problem. Furthermore, we found that the error term of our model has constant variance, which is homoscedasticity. Moreover, we found that our independent variables are correlated, which leads to multicollinearity in our model, this will deteriorate the statistical power of our model and hypotheses testing may suffer from a type II error. The mutlicollinearity has little consequences to our Empirical Model’s result, so we chose to do nothing about this problem. In the last diagnostic test, the result shows that some of our independent variables are correlated with error terms, that means our model has endogenous variables, therefore our OLS regression will yield biased and inconsistent estimates as well as type II errors, because we have a mutlicollinearity problem. 5.2 Summary of Statistical Analyses We solve the autocorrelation problem by transforming the model to Generalized least Squares, which is Cochrane-Orcutt AR(1) adjusted OLS regression as shown in Table 5.1. Unfortunately we have mutlicollinearity and endogenous variables in our model. This affects the reliability of our model, we assume this Generalised least Squares method gave us the best results in this paper.
  • 45. Macroeconomic effects on the stock market Page 45 of 60 Table 5.1: Result Cochrane–Orcutt Estimation Cochrane-Orcutt serial correlation Estimates R-squared = 0.4636 Rbar-squared = 0.4110 sigma^2 = 0.0119 Durbin-Watson = 2.4772 Rho estimate = -0.7418 Rho t-statistic = -8.2781 Rho probability = 0.0000 Nobs, Nvars = 57, 6 *************************************************************** Iteration information rho value convergence iteration -0.700337 0.700337 1 -0.740943 0.040606 2 -0.741803 0.00086 3 -0.741819 0.000016 4 *************************************************************** Variable Coefficient t-statistic t-probability Cons -0.00092 -0.110928 0.912109 ddMP -3.872029 -3.714257 0.000506 ddUI -13.932701 -3.137159 0.002832 ddUTS 0.072536 2.324864 0.024097 ddOP 0.243548 1.585996 0.118922 ddEXP 5.776322 2.383445 0.020913 From the Table 5.1, we can conclude that 46% of the variation of the dependent variable (ddSNP) can be explained by the variation of the independent variables. There is only one insignificant variable in our model, which is ddOP. While ddMP and ddUI are significant at the 1% level, and they have a negative relationship with ddSNP. While ddOP and ddEXP are significant at the 5% level, and have a positive relationship to the ddSNP. When the variable increases by one unit, ddSNP will increase by 𝛽 value, shown in Table 5.2.
  • 46. Macroeconomic effects on the stock market Page 46 of 60 Table 5.2: Relationship between ddSNP with the independent variables Variable 𝛽 ddMP -3.872029 ddUI -13.932701 ddUTS 0.072536 ddOP 0.243548 ddEXP 5.776322 5.3 Conclusion The aim of this paper was to investigate the effect of macroeconomic determinants on the performance of the S&P 500. As can be seen from our results, There is only one insignificant variable in our model, which is Oil Prices (ddOP), Industrial production (ddMP) and Unexpected inflation (ddUI), are significant at the 1% level, and they have a negative relationship with the S&P500 Index (ddSNP), while Oil Price Changes (ddOP) and Consumption Expenditure (ddEXP) are significant at the 5% level, and have a positive relationship to the S&P500 Index. When the variable increases by one unit, the S&P500 will increase by 𝛽 value, shown in Table 5.2. This tells us that if there is a decrease in industrial production and unexpected inflation, there will be an increase in the S&P500 index and vice, versa. Our results are in line with that of Chen, Roll and Ross, 1986, especially regarding Industrial production. Our results were also in line with Shanken and Weinstein (2006) and Lamont (2000) regarding Industrial Production. However, our results were not consistent with Cutler, Poterba and Summers, 1989 who found that Industrial Production Growth is significantly positively correlated with real stock returns over the period 1926 – 1986.They also found that Inflation, did not affect stock returns which again, is not consistent with our results. We conclude that Chen, Roll and Ross’s 1986 model is still valid and the results conveyed by their research is not differ over time given the advances in technology and
  • 47. Macroeconomic effects on the stock market Page 47 of 60 ease of access of information now, compared with back then. This result would give investors in the market as well as governments more pertinent information regarding macroeconomic factors that affect stock prices. Our results might not be reliable, because it has some diagnostic problem and it is not following Gauss-Markov theorem. But, in contrast, they are in line with several previous literatures. Our suggestions for the future scholars are to solve the diagnostics problem we are facing in this paper. Reexamining the same model in varies of stock market could provide a more reliable and valid information to the participants in the market.
  • 48. Macroeconomic effects on the stock market Page 48 of 60 References Adebiyi, M.A., Adenuga, A.O., et al. (2009). Oil Price Shocks, Exchange Rate and Stock Market Behaviour: the Empirical Evidence from Nigeria. Black, F. 1972. “The capital market equilibrium with restricted borrowing”. Journal of Business, Vol. 45, No. 3, 444–454. Boyd, Jagannathan & Hu, (2001), “The stock market’s reaction to unemployment news; why bad news is usually good for stocks”. Working paper 8092, NBER Bozdogan, H. (2000). Akaike's information criterion and recent developments in information complexity. Journal of mathematical psychology, 44(1), 62-91. Breeden, D. (1979). “An intertemporal asset pricing model with stochastic consumption and investment opportunities”. Journal of Financial Economics, Vol. 7, No. 3, 265– 29 Breusch, T. S. (1978). Testing for autocorrelation in dynamic linear models*. Australian Economic Papers, 17(31), 334-355. Brindley, B. (2008). A dictionary of finance and banking. J. Law, & J. Smullen (Eds.). Oxford University Press. Chen, G. J. (2012). A simple way to deal with multicollinearity. Journal of Applied Statistics, 39(9), 1893-1909. Chen, N. F., Roll, R., & Ross, S. A. (1986). Economic forces and the stock market. Journal of business, 383-403. Chen, N., Roll, R., & Ross, S. (1986). “Economic forces and the stock market”. Chipman, J. S. (2011). Gauss-Markov Theorem. In International Encyclopedia of Statistical Science (pp. 577-582). Springer Berlin Heidelberg. Cox, J., Ingersoll, J., Ross, S. (1985). “An intertemporal general equilibrium model of asset prices”. Econometrica, Vol. 53, No. 2, 363–384. Cutler, David M., James M. Poterba and Lawrence Summers, (1989), What moves stock prices, Journal of Portfolio Management, 15: 4-11. Davidson, R., & MacKinnon, J. G. (1981).Several tests for model specification in the presence of alternative hypotheses. Econometric a: Journal of the Econometric Society, 781-793. Fama & MacBeth, 1973, Risk, Return and Equilibrium: Empirical Tests, The Journal of Political Economy, Volume 81, issue 3.
  • 49. Macroeconomic effects on the stock market Page 49 of 60 Fama, E.F., (1981), “Stock Returns, Real Activity, Inflation and Money”, American Economic Review 71, 545-565 Fama. E, 1990, “Stock Returns, Expected Returns and Real Activity” Journal of Finance 45, 1089 – 1108 Féménias, J. L. (2005). Fitting models to correlated data III: A comparison between residual analysis and other methods. Journal of Molecular Spectroscopy, 232(1), 80-101. Ferson and Harvey, 1993 “The risk and predictability of international equity returns”, Review of financial studies, 6- 527 – 566 Godfrey, L. G. (1978). Testing against general autoregressive and moving average error models when the regressors include lagged dependent variables. Econometric a: Journal of the Econometric Society, 1293-1301. Godfrey,L. G., & Pesaran, M. H. (1983). Tests of non-nested regression models: small sample adjustments and Monte Carlo evidence. Journal of Econometrics, 21(1), 133-154. Hahn, J., Ham, J. C., & Moon, H. R. (2011). The Hausman test and weak instruments. Journal of Econometrics, 160(2), 289-299 Hamilton and Susmelb, (1994) “Autoregressive conditional heteroskedasticity and changes in regime” Journal of Econometrics 64 (1994) 307-333 Jarque, C. M., & Bera, A. K. (1980).Efficient tests for normality, homoscedasticity and serial independence of regression residuals. Economics Letters, 6(3),255-259. Journal of Business, Vol. 59, No. 3, 383–403. Koenker, R., & Bassett Jr, G. (1982). Robust tests for heteroscedasticity based on regression quantiles. Econometrica: Journal of the Econometric Society, 43-61. Lamont, O. (2000). "Investment plans and stock returns". Journal of Finance, Vol.6, pp.2719-2743. Leng, L., Zhang, T., Kleinman, L., & Zhu, W. (2007, July). Ordinary least square regression, orthogonal regression, geometric mean regression and their applications in aerosol science. In Journal of Physics: Conference Series (Vol. 78, No. 1, p. 012084). IOP Publishing. Liddle, A. R. (2007). Information criteria for astrophysical model selection. Monthly Notices of the Royal Astronomical Society: Letters, 377(1),L74-L78.
  • 50. Macroeconomic effects on the stock market Page 50 of 60 Lintner, J., 1965, “The Valuation of Risk Assets and the Selection of Risky Investments in Stock Portfolios and Capital Budgets”, The Review of Economics and Statistics, Vol. 47, No. 1. (Feb., 1965), pp. 13-37. Long, J. 1974. “Stock prices, inflation, and the term structure of interest rates”. Journal of Financial Economics, Vol. 1, No. 2, 131–170. Lyon, J. D., & Tsai, C. L. (1996). A comparison of tests for heteroscedasticity. The Statistician, 337-349. Mcqueen, G and V Roley, 1993, “Stock Prices, News and Business conditions, Review of Financial Studies, 6, 683 – 707 Merton, R. C. 1973. “An intertemporal Capital Asset Pricing Model”. Econometrica, Vol. 41, No. 5, 867–88 Morton, T. G. (1977). Factor Analysis, Multicollinearity, and Regression Appraisal Models. Appraisal Journal, 45(4), 578. Newey, W. K., & West, K. D. (1986). A simple, positive semi-definite, heteroskedasticity and autocorrelation consistent covariance matrix. Ramsey,J. B. (1969). Tests for specification errors in classical linear least-squares regression analysis. Journal of the Royal Statistical Society. Series B (Methodological), 350-371. Ross, S. A. 1976 “The Arbitrage Pricing Theory of Capital Asset Pricing”. Journal of Economic Theory, Vol. 13, No. 2, 341–360. Rubinstein, M. 1976. “The valuation of uncertain income streams and the pricing of options”. Bell Journal of Economics, Vol. 7, No. 2, 407–425. Schwert, (1989), “Why does stock market volatility change over time?”, Journal of finance 44, 1115 – 1145 Shanken, J. & Mark, I. (2006). Weinstein Economic forces and the stock market revisited. Journal of Empirical Finance,13, 129–144. Sharpe,William F.,Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk, The Journal of Finance, Vol. 19, No. 3 (Sep., 1964), pp. 425- 442 Shukur, G., & Mantalos, P. (2004). Size and power of the RESET test as applied to systems of equations: A Boots trap approach. Journal of Modern Applied Statistical Methods, 3(2),10. Thursby, J. G. (1982). Misspecification, heteroscedasticity, and the Chow and Goldfeld-Quandt tests. The Review of Economics and Statistics, 314-321.
  • 51. Macroeconomic effects on the stock market Page 51 of 60 Appendices %% Preliminary examinations of the Data %% input variables % [Data,TXT,RAW]= xlsread('Data.xls',1,'A1:H60'); SNP = Data(:,1); MP = Data(:,2); DEI = Data(:,3); UI = Data(:,4); URP = Data(:,5); UTS = Data(:,6); OP = Data(:,7); EXP = Data(:,8); %% [1] Plot Data f = figure; subplot(4,2,1); plot(SNP); title('SNP'); subplot(4,2,2); plot(MP); title('MP'); subplot(4,2,3); plot(DEI); title('DEI'); subplot(4,2,4); plot(UI); title('UI'); subplot(4,2,5); plot(URP); title('URP'); subplot(4,2,6); plot(UTS); title('UTS'); subplot(4,2,7); plot(OP); title('OP'); subplot(4,2,8); plot(EXP); title('EXP'); % %% [1] Plot Data f = figure; subplot(4,2,1); plot(SNP); title('SNP'); subplot(4,2,2); plot(MP); title('MP'); subplot(4,2,3); plot(DEI); title('DEI'); subplot(4,2,4); plot(UI); title('UI'); subplot(4,2,5); plot(URP);
  • 52. Macroeconomic effects on the stock market Page 52 of 60 title('URP'); subplot(4,2,6); plot(UTS); title('UTS'); subplot(4,2,7); plot(OP); title('OP'); subplot(4,2,8); plot(EXP); title('EXP'); %1st different D1 = LagOp({1,-1},'Lags',[0,1]); dSNP = filter(D1,SNP); dMP = filter(D1,MP); dDEI = filter(D1,DEI); dUI = filter(D1,UI); dURP = filter(D1,URP); dUTS = filter(D1,UTS); dOP = filter(D1,OP); dEXP = filter(D1,EXP); % plot 1st different f = figure; subplot(4,2,1); plot(dSNP); title('dSNP'); subplot(4,2,2); plot(dMP); title('dMP'); subplot(4,2,3); plot(dDEI); title('dDEI'); subplot(4,2,4); plot(dUI); title('dUI'); subplot(4,2,5); plot(dURP); title('dURP'); subplot(4,2,6); plot(dUTS); title('dUTS'); subplot(4,2,7); plot(dOP); title('dOP'); subplot(4,2,8); plot(dEXP); title('dEXP'); %2nd different D2 = D1*D1; ddSNP = filter(D2,SNP); ddMP = filter(D2,MP); ddDEI = filter(D2,DEI); ddUI = filter(D2,UI); ddURP = filter(D2,URP); ddUTS = filter(D2,UTS); ddOP = filter(D2,OP); ddEXP = filter(D2,EXP); % plot 2nd different f = figure; subplot(4,2,1);
  • 53. Macroeconomic effects on the stock market Page 53 of 60 plot(ddSNP); title('ddSNP'); subplot(4,2,2); plot(ddMP); title('ddMP'); subplot(4,2,3); plot(ddDEI); title('ddDEI'); subplot(4,2,4); plot(ddUI); title('ddUI'); subplot(4,2,5); plot(ddURP); title('ddURP'); subplot(4,2,6); plot(ddUTS); title('ddUTS'); subplot(4,2,7); plot(ddOP); title('ddOP'); subplot(4,2,8); plot(ddEXP); title('ddEXP'); %% [2] Measures of Central Tendancy Mean = mean(Data); Median = median(Data); Mode = mode(Data); % [3] Measures of Range Range = max(Data)-min(Data); Standdev = std(Data); Variance = var(Data); % [4] Higher 3rd and 4th Moments S = skewness(Data); K = kurtosis(Data); % [5] Perform a normality test [h,p,jbstat] = jbtest(SNP,.05); [h1,p1,jbstat1] = jbtest(MP,.05); [h2,p2,jbstat2] = jbtest(DEI,.05); [h3,p3,jbstat3] = jbtest(UI,.05); [h4,p4,jbstat4] = jbtest(URP,.05); [h5,p5,jbstat5] = jbtest(UTS,.05); [h6,p6,jbstat6] = jbtest(OP,.05); [h7,p7,jbstat7] = jbtest(EXP,.05); % [6] Restricted model X=[ones(length(ddSNP(:,1)),1),ddMP,ddUI,ddUTS,ddOP,ddEXP]; resultr=ols(ddSNP,X); prt(resultr) % [7] Unrestricted model X1=[ones(length(ddSNP(:,1)),1),ddMP,ddDEI,ddUI,ddURP,ddUTS,ddOP,ddEXP ]; resultu=ols(ddSNP,X1); prt(resultu) % % % [8] Use an F-statistic to test the null that all the coefficients are % % simultaneously zero. [fstat fprob] = waldf(resultr,resultu); disp('Wald F-test results'); [fstat fprob] % [9] Preliminary examination of Regression Residuals
  • 54. Macroeconomic effects on the stock market Page 54 of 60 % plot(resultr.resid); ylabel('Residuals'); title('Restricted Model'); hist(resultr.resid); title('Restricted Model'); % plot(resultu.resid); ylabel('Residuals'); title('Unrestricted Model'); hist(resultu.resid); title('Unrestricted Model'); % % %% Normality of the residual % [h,p,jbstat] = jbtest(resultr.resid,.05) [h,p,jbstat] = jbtest(resultu.resid,.05) % % % constant = ones(length(ddSNP),1); Data_Ori = [constant,ddMP,ddDEI,ddUI,ddURP,ddUTS,ddOP,ddEXP]; Data = [constant,ddMP,ddUI,ddUTS,ddOP,ddEXP]; % model specification % result_Ori = ols(ddSNP,Data_Ori); result = ols(ddSNP,Data); % % SSR = sum(result_Ori.resid.^2); SSR1 = sum(result.resid.^2); T = length(SNP); % % Information Criteria % Akaike = log(SSR/T)+(2*7)/T Schwarz = log(SSR/T)+(7*log(T))/T Akaike1 = log(SSR1/T)+(2*5)/T Schwarz1 = log(SSR1/T)+(5*log(T))/T %% % Durbin Watson d Test: a test for an omitted variable % Data2 = [constant,ddMP,ddUI,ddUTS,ddOP,ddEXP,ddURP]; result2 = ols(ddSNP,Data2); Data3 = [ddDEI,result2.resid]; Data4 = sortrows(Data3,1); resid_sort = [Data4(:,2)]; % result3 = ols(resid_sort,constant); disp('Durbin Watson d Test: null of no autocorrelation (no omitted variable)') result3.dw
  • 55. Macroeconomic effects on the stock market Page 55 of 60 % %(n=60, k=1,1 percent significant) dl=1.382 du=1.449 4-du=2.5510 4-dl=2.6180 % % Data = [constant,ddMP,ddUI,ddUTS,ddOP,ddEXP]; result = ols(ddSNP,Data); Data5 = [ddURP,result.resid]; Data6 = sortrows(Data5,1); resid_sort = [Data6(:,2)]; % result4 = ols(resid_sort,constant); disp('Durbin Watson d Test: null of no autocorrelation (no omitted variable)') result4.dw % % Ramsey Reset Test: a test for adequate functional form % result = ols(ddSNP,Data); predictsq = result.yhat.^2; predictcube = result.yhat.^3; Data7 = [Data,predictsq]; Data8 = [Data,predictsq,predictcube]; result5 = ols(ddSNP,Data7); result5a = ols(ddSNP,Data8); disp('Ramsey Reset Test: linear against quadratic functional form') prt(result5) % disp('Ramsey Reset Test: linear against quadratic + cubic functional form') prt(result5a) %quadratic + cubic functional form are not significant Fstat = ((result5a.rsqr - result.rsqr)/2)/((1- result5a.rsqr)/length((SNP)-8)) % % Autocorrelation % Durbin-Watson Procedure % disp('Durbin-Watson Test: null of no autocorrelation') durbwat = result.dw (k=7) dl=1.179 du=1.682 4-du=2.3180 4-dl=2.8210 (k=5)
  • 56. Macroeconomic effects on the stock market Page 56 of 60 dl=1.248 du=1.598 4-du=2.4020 4-dl=2.7520 % % Breusch-Godfrey Test for serial correlation % plot(result.resid) hist(result.resid) resid = result.resid; reslag1 = lag(resid,1); reslag2 = lag(resid,2); reslag3 = lag(resid,3); Data1 = [Data,reslag1,reslag2,reslag3]; result1 = ols(resid,Data1); prt(result1) % % Cochrane Orcutt procedure for AR(1) errors % % disp('Cochrane-Orcutt AR(1) adjusted OLS regression') results = olsc(ddSNP,Data) prt(results) w% % heteroskedasticity %Test the residuals for normality x = result.resid; y = normrnd(mean(x), std(x), length(x), 1); % figure; plot(x, 'Color', 'k') xlim([1, length(x)]) ylabel('OLS Residuals') % figure; plot(x.^2, 'Color', 'k') xlim([1, length(x)]) ylabel('OLS Residuals^2') % figure; plot(y, 'Color', 'k') xlim([1, length(y)]) ylabel('Normal rand') % figure; plot(y.^2, 'Color', 'k') xlim([1, length(y)]) ylabel('Normal rand^2') % Histogram figure; subplot(1,2,1) hist(x, 30) %histogram(x, 20) title('OLS Residuals') subplot(1,2,2) hist(y, 30) title('Normal Random')
  • 57. Macroeconomic effects on the stock market Page 57 of 60 % Q-Q plot figure; subplot(1,2,1) qqplot(x) title('OLS Residuals') subplot(1,2,2) qqplot(y) title('Normal Random') % Jarque Bera test disp('Jarque Bera Test, null is normality of residuals') [H,P,JBSTAT] = jbtest(x, .05) disp('Jarque Bera Test, null is normality of residuals') [H,P,JBSTAT] = jbtest(x, .01) disp('Jarque Bera Test, null is normality of residuals') [H,P,JBSTAT] = jbtest(x, .10) %% % Goldfeld-Quandt B = sortrows(Data,2); % c = round(length(ddSNP)/5); n = round((length(ddSNP) - c)/2); B1 = B(1:n, :); B2 = B(n+c:end, :); % Data1 = [ones(size(B1,1),1),B1(:,2:4)]; Data2 = [ones(size(B2,1),1),B2(:,2:4)]; % results1 = ols(B1(:,1), Data1); results2 = ols(B2(:,1), Data2); RSS1 = results1.resid'*results1.resid; RSS2 = results2.resid'*results2.resid; df1 = size(Data1, 1) - size(Data1, 2); df2 = size(Data2, 1) - size(Data2, 2); disp('Goldfeld Quandt F statistic, null is homoscedasticity and normality of errors') fstat = (RSS2/df2)/(RSS1/df1) disp('Goldfeld Quandt F statistic, P value of F-statistic') fprob = fdis_prb(fstat, df1, df2) % 2. White heteroscedasticity test (does not assume normality of errors) Data3 = [ones(length(ddSNP),1),ddMP,ddUI,ddUTS,ddOP,ddEXP]; results3 = ols(ddSNP,Data3); ressq3 = results3.resid.^2; % auxilary regression ddMP_sq = ddMP.*ddMP; ddUI_sq = ddUI.*ddUI; ddUTS_sq = ddUTS.*ddUTS; ddOP_sq = ddOP.*ddOP; ddEXP_sq = ddEXP.*ddEXP; ddMP_UI = ddMP.*ddUI;ddMP_UTS = ddMP.*ddUTS;ddMP_OP = ddMP.*ddOP;ddMP_EXP = ddMP.*ddEXP; ddUI_UTS = ddUI.*ddUTS; ddUI_OP = ddUI.*ddOP;ddUI_EXP = ddUI.*ddEXP;% ddUTS_OP = ddUTS.*ddOP;ddUTS_EXP = ddUTS.*ddEXP; Data4 = [ones(length(ddSNP),1),ddMP,ddUI,ddURP,ddUTS,ddOP,ddMP_UI,ddMP_UTS,dd MP_OP,ddMP_EXP,ddUI_UTS,ddUI_OP,ddUI_EXP,ddUTS_OP,ddUTS_EXP]; results4 = ols(ressq3,Data4); % disp('White test, null is homoscedasticity') Chisqr = results4.rsqr*length(ressq3)
  • 58. Macroeconomic effects on the stock market Page 58 of 60 prob = chis_prb(Chisqr,14) %3. Breusch Pagan heteroscedasticity test disp('Breusch Pagan Godfrey heteroscedasticity test, null is homoscedasticity and normality of errors') bpagan(ddSNP,Data) % multicollinearity % Unconditional Covariance and Correlation of Data matrix disp('Covariance and Correlation Matrices for Data') cov([ddMP ddUI ddUTS ddOP ddEXP]) corrcoef([ddMP ddUI ddUTS ddOP ddEXP]) R = corrcoef([ddMP ddUI ddUTS ddOP ddEXP]) cond(R) e = eig(R) e(5)/e(1) [V,D] = eig(R) %%% figure; subplot(1,2,1) plot(ddMP, ddSNP, '.b', 'MarkerSize', 22) xlabel('ddMP'); ylabel('ddSNP'); grid on; axis square; subplot(1,2,2) plot(ddUI, ddSNP, '.r','MarkerSize', 22) xlabel('ddUI'); ylabel('ddSNP'); grid on; axis square; figure; subplot(1,2,1) plot(ddUTS, ddSNP, '.k', 'MarkerSize', 22) xlabel('ddUTS'); ylabel('ddSNP'); grid on; axis square; subplot(1,2,2) plot(ddOP, ddSNP, '.y', 'MarkerSize', 22) xlabel('ddOP'); ylabel('ddSNP'); grid on; axis square; figure; subplot(1,2,1) plot(ddEXP, ddSNP, '.c', 'MarkerSize', 22) xlabel('ddEXP'); ylabel('ddSNP'); grid on; axis square; subplot(1,2,2) plot(ddUI, ddOP, '.m', 'MarkerSize', 22) xlabel('ddUI'); ylabel('ddOP'); grid on; axis square; % Variance Inflation Factors results_1 = ols(ddMP,[ones(length(ddUI),1),ddUI,ddUTS,ddOP,ddEXP]); results_2 = ols(ddUI,[ones(length(ddUI),1),ddMP,ddUTS,ddOP,ddEXP]); results_3 = ols(ddUTS,[ones(length(ddUI),1),ddUI,ddMP,ddOP,ddEXP]); results_4 = ols(ddOP,[ones(length(ddUI),1),ddUTS,ddMP,ddUI,ddEXP]); results_5 = ols(ddEXP,[ones(length(ddUI),1),ddUTS,ddMP,ddUI,ddOP]); results_6 = ols(ddOP,[ones(length(ddUI),1),ddUI]); % disp('Multivariate Variance Inflation Factors') disp('Multivariate Variance Inflation Factors MP') VIF1 = (1/(1-(results_1.rsqr))) disp('Multivariate Variance Inflation Factors DEI') VIF2 = (1/(1-(results_2.rsqr))) disp('Multivariate Variance Inflation Factors UI') VIF3 = (1/(1-(results_3.rsqr))) disp('Multivariate Variance Inflation Factors ERP') VIF4 = (1/(1-(results_4.rsqr))) disp('Multivariate Variance Inflation Factors UTS') VIF5 = (1/(1-(results_5.rsqr)))
  • 59. Macroeconomic effects on the stock market Page 59 of 60 VIF6 = (1/(1-(results_5.rsqr))) %Tolerance Tol1 = 1./VIF1 Tol2 = 1./VIF2 Tol3 = 1./VIF3 Tol4 = 1./VIF4 Tol5 = 1./VIF5 Tol6 = 1./VIF6 % Condition Index disp('Condition Indices and associated statistics') bkw(Data) s = svd(Data); k = max(s)/min(s); ci = sqrt(k) % exogeneiy Data_exo1 = [ones(length(ddMP),1),lag(ddMP,1),lag(ddMP,2),lag(ddMP,3)]; Result1 = ols(ddMP,Data_exo1); ddMP_hat = Result1.yhat; % 2. Second stage regression Data_exo2 = [ddMP_hat,ddUI,ddUTS,ddOP,ddEXP]; DataIV = [ones(length(ddSNP),1),Data_exo2]; ResultIV = ols(ddSNP, DataIV); prt(ResultIV) %if UI is endogeneous then its parameter estimate is biased. Data_exo1 = [ones(length(ddUI),1),lag(ddUI,1),lag(ddUI,2),lag(ddUI,3)]; Result1 = ols(ddUI,Data_exo1); ddUI_hat = Result1.yhat; % 2. Second stage regression Data_exo2 = [ddUI_hat,ddUI,ddUTS,ddOP,ddEXP]; DataIV = [ones(length(ddSNP),1),Data_exo2]; ResultIV = ols(ddSNP, DataIV); prt(ResultIV) %if UTS is endogeneous then its parameter estimate is biased Data_exo1 = [ones(length(ddUTS),1),lag(ddUTS,1),lag(ddUTS,2),lag(ddUTS,3)]; Result1 = ols(ddUTS,Data_exo1); ddUTS_hat = Result1.yhat; % 2. Second stage regression Data_exo2 = [ddUTS_hat,ddUI,ddUTS,ddOP,ddEXP]; DataIV = [ones(length(ddSNP),1),Data_exo2]; ResultIV = ols(ddSNP, DataIV); prt(ResultIV) %if OP is endogeneous then its parameter estimate is biased. Data_exo1 = [ones(length(ddOP),1),lag(ddOP,1),lag(ddOP,2),lag(ddOP,3)]; Result1 = ols(ddOP,Data_exo1); ddOP_hat = Result1.yhat; % 2. Second stage regression Data_exo2 = [ddOP_hat,ddUI,ddUTS,ddOP,ddEXP]; DataIV = [ones(length(ddSNP),1),Data_exo2]; ResultIV = ols(ddSNP, DataIV); prt(ResultIV) %if EXP is endogeneous then its parameter estimate is biased. Data_exo1 = [ones(length(ddEXP),1),lag(ddEXP,1),lag(ddEXP,2),lag(ddEXP,3)]; Result1 = ols(ddEXP,Data_exo1); ddEXP_hat = Result1.yhat; % 2. Second stage regression
  • 60. Macroeconomic effects on the stock market Page 60 of 60 Data_exo2 = [ddEXP_hat,ddUI,ddUTS,ddOP,ddEXP]; DataIV = [ones(length(ddSNP),1),Data_exo2]; ResultIV = ols(ddSNP, DataIV); prt(ResultIV) % Hausman test beta_ols = ResultOLS.beta beta_iv = ResultIV.beta varbeta_ols = ResultOLS.sige*inv(DataOLS'*DataOLS); varbeta_iv = ResultIV.sige*inv(DataIV'*DataIV); df = rank(varbeta_iv-varbeta_ols); hausman = (beta_ols-beta_iv)'*inv(varbeta_iv-varbeta_ols)*(beta_ols- beta_iv) pval = 1 - chis_prb(hausman.^2,df)