SlideShare una empresa de Scribd logo
1 de 33
Descargar para leer sin conexión
An investigation into the relationship between
Market volatility and investor sentiment.
Nora Sheehan 12389296
Final Year Project 2015-2016
BSc Financial Mathematics and Economics
Supervisor: Dr Srinivasan Raghavendra
February 2016
I hereby certify that this material, which I now submit for assessment on the programme of
study leading to the award of (degree or masters) is entirely my own work and had not been
taken from the work of others save and to the extent that such work has been cited and
acknowledged within the text of my work.
Signed: ___________________ ID no: _____________ Date: __________
Acknowledgements
I would like to thank Dr. Srinivasan Raghavendra for his time and support throughout the
duration of my project. Without his guidance and encouragement I would not have been
able to complete this work.
Table of Contents:
Section 1 Introduction
1.1 Abstract
1.2 Introduction
1.3 Literary Review
Section 2 Data Preparation
2.1 Choosing indices for Volatility and Sentiment
2.2 Regression Analysis for choosing Prediction Indicators
Section 3 Time Series Analysis
3.1 Stationarity
3.2 Regression Analysis
3.3 Granger Causality Testing
Section 4 Conclusion
4.1 Results
4.2 Conclusion
References
Appendix
Section 1
1.1 Abstract:
Stock markets have in recent times been extremely volatile and it is this market volatility
which generates the state of investors’ returns – investors dislike volatility. Investor
sentiment is revealed through equity/asset price fluctuations. For example, a risk averse
arbitrageur may expect prices to diverge further before convergence and so they may invest
less and so this sentiment could predict the behaviour of asset prices.
There is an obvious link between investor sentiment and market volatility but it is unclear
whether or not this is a causal relationship and in which direction the causality lies.
Simplistically speaking, if investors see a bullish market sentiment they will choose to invest
which will reduce market volatility, and, conversely, if the market is currently volatile this
will cause a bearish period.
The S&P 500 is used as a leading indicator of US equities and is the most common
benchmark for doing so in the US. It is an index of 500 US stocks chosen for market size,
liquidity and industry grouping and is meant to reflect the risk/return characteristics of
the large capital world.
More and more research into stock markets is being conducted since the collapse of the
global markets in September 2008. The crash was most prevalent in the US since this is
where the crux of the collapse began with the failings of the Lehman Brothers.
1.2 Introduction
The broad aim of this project is to study the interrelation between investor sentiment and
stock market volatility.
To do this I have chosen to devise indices for both sentiment and volatility based on the
Standard and Poor’s 500 index (S&P 500). In doing this I examined different predictors for
each market indicator as well as previously devised indices and tested their effect on the
S&P 500 to see if they could be categorized as good indicators. I used only the best 2
indicators as the rest were seen to give larger error which would prove problematic in my
analysis.
The time period I used to conduct my analysis is 2006 to 2012. Within this time period the
US market went from boom to bust so it will be interesting to see how investor sentiment
and volatility reacted to the crash. It will also be a good indication of whether my indicators
follow the pattern one would expect in these periods of uncertainty (i.e. rise in volatility and
the bearish period should cause a fall in sentiment). It will also be interesting to see whether
investors became more optimistic about future prices as the economy began to return to
growth after the crash (i.e. did volatility fall and sentiment increase?).
Thus this project will study both the movement of individual sentiment and market volatility
through a period of boom and bust and examine the relationship the two indicators have
with each other.
There exists both institutional and individual sentiments, for the purpose of my research I
will be considering only individual sentiment which relates to noise traders and their
relationship with market volatility. The purpose for examining individual sentiment rather
than institutional is that in the context of the time period of my analysis I wanted to analyse
how uninformed individuals react to turbulent economic eras.
The period 06-08 should show bullish signs emulating the then ongoing credit bubble,
following this we would expect an extremely bearish market 07/08 when the credit crunch
hit and generated fear among consumers and bullish markets should resume after this when
signs of market recovery appear.
1.3 Literary Review of Sentiment and Volatility in the US
Measuring investor sentiment is at the heart of financial market research. For this reason
there are various sentiment indices found in existing literature. Most popularly, sentiment is
examined in the context of its relationship with returns but less commonly studied is that of
its relationship with volatility.
Classical finance theory suggests that the effects of sentiment on stock prices are negligible
when arbitrageurs act upon it. However, in modern economics, behavioural finance theories
have quashed this idea. In the early 1990s, studies indicated that investors trade more
heavily in some assets increasing their respective transaction costs which affect the asset
price, therefore clearly exhibiting the influence sentiment has on a market1.
Brown concluded that where levels of investor sentiment deviate from the mean, greater
volatility occurs2. Many more recent studies of the measurability of investor sentiment all
come to the underlying conclusion that sentiment can be seen to be strongly correlated
with returns, while most studies do use different approaches for the indicators of
sentiment. For the purpose of my analysis it is therefore feasible to use a single sentiment
indicator3.Economic conditions today are realistically too diverse to simplify sentiment into
a single index but just as we need aggregate statistics for GDP, we also need a broad index
to summarise sentiment trends.
Stock price movements investigate the efficiency of a stock market and so are widely
studied. Volatility measures the difference from the mean return of a stock and different
measures take into account different fundamentals in the calculation. Volatility movements
can be caused by either a rise in the number of traders or the arrival of new information
(Tauchen and Pitts 1983) – new information such as that of new sentiment releases.
Time series analysis plays a pivotal role in stock market analysis and comes in to play very
much so in studies of volatility, sentiment and returns. A time series consists of observations
usually made equally spaced in time. Because each observation isn’t independent, time series
analysis accounts for time order in contrast with other statistical analysis of random samples of
independent observations. The objective of the time series I will conduct is classified as
explanatory.4
The plot of the time series reveals features such as trend, seasonalities, discontinuities,
and outliers that may be present in the data.
1
Noise Trader Risk in Financial Markets: De Long, Shleifer, Summers, Waldmann
2
Brown 1999
3
Baker and Wurgler (2006)
4
Bowerman, B.L. and O’Connell R.T. (1987).
Section 2 Data Preparation
• Choose a single index for sentiment and a single index for volatility in the S&P 500
using Minitab.
2.1 Choosing indices for Volatility and Sentiment:
Sentiment can be measured in many ways, either through technical analysis of the market or by
gathering information from individuals and compiling an index based on their thoughts about the
market. Of course, rationality in these sentiment measures is important but, on the other hand, in
the time period being analysed it can be argued that the majority of investors were acting entirely
irrationally. Late 2008 is a prime example of what can happen when irrational thinking overcomes
rationality.
Volatility can be measured by calculating the standard deviations of price changes or by using
previously formulated indices. Many institutions, such as the CBOE for example, construct volatility
indices for the market using a combination of mathematical methods and stock market analysis.
Technical analysis of Sentiment:
Moving Averages:
This is a measure of the percentage of NYSE stocks trading above their 50-day moving average (MA).
Stocks above the 50-day MA are indicative of a rising market. As with the NYSE bullish percentage,
look for extreme readings as an indication that the market is ether overbought or oversold.
I compiled this graph on Yahoo Finance to show the 50 and 200 day moving average for the S&P 500
(ticker ^GSPC) over the 6-year period. When the 50-day MA is below the 200 day MA a bearish
period is predicted by traders, and we can see this occurs from October 2008 to May 2011. As the 50
day MA crossed above the 200 day MA in May 2011, a bullish period was predicted.
The moving average convergence/divergence or MACD shows the difference between two moving
averages of share price. A positive MACD indicates a bullish period is expected. And a negative
MACD indicates a bearish period is to be expected. The S&P has generally positive MACD throughout
the 6 years with a negative period seen from December 2007(perhaps a signal of the beginning of
market failure) until July of 2009(perhaps signalling the belief in a return to growth). Where the
negative MACD began in December 2007 we can see the bearish period of a sharp and steady
decline in trading volumes coinciding with this in the SMA graph.
P/C Ratios:
The Put/Call ratio is the difference in trading volume between put and call options. A P/C ratio
greater than one indicates more puts are being traded than calls, meaning traders are mostly
bearish.
The Put/Call ratio is a contrarian indicator, i.e. a reading far above one is actually a bullish indicator
and an extreme reading below one (i.e. more calls than puts traded) is a bearish indicator.
I simply collected the data for the volume of puts and calls and calculated the ratio for each day:
𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 𝑣𝑣𝑣𝑣 𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝
𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 𝑣𝑣𝑣𝑣 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
This seemed a useful indicator since I could compile it in index form so I stored the ratios alongside
my daily prices in excel until I finished finding indicators to begin the analysis of the best ones.
A pitfall here is that a P/C ratio in conjunction with open interest, accounts for whether the change
in volume is actually associated with new positions in the market. Of course it would be logical then
to include open interest calculations in my calculations but since the S&P isn’t a single stock, options
chain data were not available to download.
It is clear to see from the following graph that there are some notable differences between the two
which is why it is somewhat detrimental to my analysis I couldn’t source information for open
interest for my time period.
Legend of OECD graph: (link in appendix)
Blue - Open Interest (Right Axis)
Orange - P/C Ratio (Left Axis)
Surveys of individual investor sentiment:
Rather than analysing bullish and bearish periods using available market data, surveys are compiled
by institutions to gauge the market sentiment through individuals’ actual thoughts about the
market.
Index of Consumer Sentiment (ICS):
The most renowned index of consumer sentiment is compiled by Michigan University which is
sponsored by Thomas Reuters. It has been shown to be the most causal index of its type to market
activity. Trading is seen to increase dramatically following the monthly release of the index.
The Institute for Social Research (ISR) at The University of Michigan is one of the largest university-
based social science research institutions in the world and I found this survey to be most referenced
on sentiment in the US by market analysts across the web.
The results from the survey are converted to index form by the following steps:
1) Compute the relative scores ((% favourable replies - % unfavourable replies)+100) for each
of the questions.
2) Round each relative score to the nearest whole number.
3) Use the following formula to calculate the Index of Consumer Sentiment(ICS):
where the Xi represent the previously calculated relative score for each question and the 6.7558 is
the base year total* and the addition of 2 is a correction constant**.
* The base period total is taken from 1966.
** This constant has been the same since 1981.
While I am confident that the survey itself is comprehensive in its population sample the fact that
the correction constant hasn't changed since 1981 seems as though it could cause sample errors in
the index calculation. Another drawback here was that the data is only available in monthly
increments - daily data would give a much more indicative relationship when tested against another
variable.
Bearing in mind that as an economist I must be weary of surveys of sentiment since there is a
difference between how respondents answer and how they would actually behave. Rationality will
require that people’s expectations be on target over a number of years. It is clear that the survey is
rational since it has been ongoing for decades and proven to be an accurate indicator of the future
of the national economy.
Volatility Indices:
Standard Deviation:
The most obvious volatility measure is standard deviation of price changes in the market. Hull
outlines the method I followed in my calculation of an estimation of the volatility of the S&P 500:
1) Calculate the Daily Return (Ui) using the Log of the Relative Price (Si/Si-1) where;
Si = Price at end of period i.
n+1 = Number of observations
2) Estimate the Standard deviation using the following formula:
3) In my calculations I used daily data from the S&P 500 and calculated the standard deviation
in monthly intervals leaving me with 72 data points.
VIX:
This is a volatility index1
compiled by the Chicago Board Options Exchange (CBOE). This should be
similar to my results from the standard deviation analysis but since the CBOE have access to more
information and labour hours they will be more reflective.
The general formula they use to calculate volatility is:
where
σ is VIX/100 => VIX = 100 x σ
T Time to expiration
F Forward index level desired from index option prices
Ko First strike below the forward index level, F
Strike price of the ith out-of-the-money option; a call if Ki >Ko; and a put if Ki<Ko: both put and call if
Ko=Ki.
∆Ki Interval between strike prices is half the difference between the strike on either side of Ki:
R Risk-free interest rate to expiration
Q(Ki) The midpoint of the bid-ask spread for each option with strike Ki.
In words, the CBOE select the sample options, calculate the volatility of both the near and next term
options and calculate a 30 day weighted average based on these. The index is then simply the square
root of this multiplied by 100.
It was interesting to see the ingredients for market volatility and understand how puts, calls and
strike prices all play pivotal roles in the mechanics of economy.
2.2 Regression Analysis for choosing Prediction Indicators:
I wanted to work with the most accurate predictor of prices for both indices so I ran two regressions
in Minitab, one for the Volatility indices and the S&P index and one for the Sentiment indices and
the S&P index.
Sentiment Regression:
 P/C Ratio
As it required membership to access P/C ratios prior to 2010 I decided to do the regression based on
the 2 and a half year period from July 2010- December 2012 and if the P/C ratio turned out to be the
better predictor I could deal with that later. Bearing in mind also that the open interest information
is only made available in visual representations so this was another limitation of the P/C sentiment
analysis.
 Michigan Index:
In line with the problem faced for the P/C ratio I just used the 2010-2012 data for this in the
regression also. And because this index is only available on a monthly basis, I created a rolling
average for the monthly data for the P/C Ratio using Excel.
Volatility Regression:
 VIX:
To do a robust regression I used monthly data for the VIX predictor and used the same time period
as I did in the Sentiment regression and regress this against S&P monthly prices.
 Standard Deviation:
I then used my monthly standard deviations (previously calculated from Hull’s recommended
volatility estimation).
Now I have 5 variables over a 30 month period on my minitab screen which I can now conduct some
statistical analysis on.
My only aim here is to choose my indicator for Sentiment and indicator for Volatility, the criteria I
want my chosen indicators to fulfil is to be the better predictors of market prices against their
competitor index.
To do this I will look run a Best Subsets Test and examine the p-values of the regression.
Results:
The results of the best subsets test indicated the Michigan Sentiment index and the VIX as the best
predictors. The p-values of each were also 0.000 whereas the p-values were above the 5% range for
the others so I can now begin the main analysis of my project by testing for causality between the
Michigan Sentiment Index and the VIX.
Section 3 Time Series Analysis
• Conduct time series analysis on both indicators using R.
• Test for causality between the 2 indices using R.
• Split the time frame into post and prior crash periods and use my results to record
any significance
The first step in the process was to create a time series plot of the data, which displayed the daily
average for each month, versus the months from January 2006 to December 2012. I created and
overlay plot of both VIX and ICS together. The most notable outliers in both occur in late 2008 and
late 2011. The most significant in late 08 can be explained by the collapse of the markets.
Figure 1:
This graph is a representation of the VIX and the Sentiment Index in an overlay plot that I created in
R, the coding for which can be seen in the appendix. It is a good start to see a visual representation
of the 2 indices together. While VIX is measured on a different scale, it is still useful to see how both
movements relate to one another.
Here it seems as though the two indices are almost mirrored - they move in opposite directions for
the most part with a major discrepancy seen from the end of 2008 to the middle of 2009. This is
representative of the crash in the US economy, obviously volatility would jump here and remain
higher than average for a period until signs of stability were introduced into the market, and likewise
sentiment would clearly fall in the period of uncertainty.
From the graph we note that the US economy was slipping fast much before the Lehman collapse,
volatility rising and sentiment falling prior to September 2008. This could be due to both
extortionate oil prices at the time and the numerous other financial woes within the US. As
expected, we see a sharp rise in volatility at the exact time of the collapse while sentiment itself
remains at a low volatile level. Following 2008 sentiment levels improve while at a much lower level
than that of the state of euphoria experienced in the 06/07 period. Volatility drops dramatically yet
remains at a higher level and pre crash times.
We can conclude that consumers are more wary of their financial positions following the collapse of
the economy and markets are more volatile than before since recovery stages of an economy exhibit
more volatility than that of the previous euphoric stages.
3.1 Stationarity:
Sentiment (TS1)
Looking at the Sentiment index we can see immediately that it doesn’t meet the assumptions
required for stationary data, the mean and variance are not constant. Stationarity is a necessary
condition for time series analysis which requires the data to be of constant variance and mean zero.
By taking the first difference of the index we observe a seemingly stationary series, to ensure
stationarity I implemented an Augmented Dickey Fuller test which verified the stationarity by
rejecting the null hypothesis of non stationarity.
The ADF null hypothesis is that the data is non stationary, since the p-value is less than 0.05 and the
critical value is -3.8528 we can reject this hypothesis and assume that our differenced data is
stationary.
Volatility (TS2)
Looking at the time series compared with the differenced time series we can see immediately that
the differenced data looks more stationary than the original series.
The critical value is sufficiently negative and the p-value is small enough that we can reject the null
hypothesis of the data being non stationary.
We now have a stationary series of both differenced sentiment and volatility so can conduct a
regression on these and conduct the granger test and hence tell if they can be used for forecasting
purposes using ARIMA, GARCH and VAR models.
3.2 Regression Analysis
The next step was the regression of each of the indices, Sentiment represented first as lm1 (linear
model) and Volatility as lm2.
That the residuals are spread apart shows that they are independently distributed and the
box plot here is also significant. When we look at the Histogram of the residuals, we can see
that it is relatively unimodal and symmetric, but not perfectly so, some departures from
normal exist to the right. From the Normal Probability Plot, which plots ordered residuals
against typical values from a normal distribution; we observe approximate linearity and we
can conclude that the error terms in this regression model are approximately normally
distributed. The assumption of normality is not unreasonable for the residuals in this model.
In other words, we conclude that the normality assumption for the error terms is satisfied.
That the residuals are spread apart shows that they are independent and the box plot here
is also significant. The histogram is quite normal and the QQ plot just tails off at the top and
bottom.
Box Ljung Test:
H0: The data are independently distributed (the 72 observations for each indicator are
uncorrelated).
Ha: The data are not independently distributed; they exhibit serial correlation.
A small p-value indicates dependence between the residuals, so we are hoping for a p-value
of greater than 0.05 to signal that my differenced datasets residuals are uncorrelated, ie that
we can accept the null hypothesis.
As we wanted, the Ljung box test confirms the independence of the residuals of both
sentiment(TS1) and volatility(TS2) indices since it accepts the null hypothesis of independent
distribution.
3.3 Granger Causality Testing
Testing causality using Granger method uses F-tests to test whether lagged information on a
variable Y provides any statistically significant information about a variable X in the presence of
lagged X. If not, then "Y does not Granger-cause X." In this case choosing X, Y to be VIX and
Sentiment.
Clive W.J. Granger’s personal account of the test in the early 1960's:
“I was considering a pair of related stochastic processes which were clearly inter-related and I
wanted to know if this relationship could be broken down into a pair of one way relationships. It was
suggested to me to look at a definition of causality proposed by a very famous mathematician,
Norbert Weiner, so I adapted this definition (Wiener 1956) into a practical form and discussed it.”
Each of my processes is a stochastic process as the future prices depends only on the present index
value. But the lags come in to play in since the crossover of information and time it takes for
investors to act on information causes delays in the process, for this reason I will be conducting the
Granger test with respect to lags.
The reason for my use of this test which isn’t an absolute determinant of causality but rather G-
Causality can be told in Granger’s own words” The definition has been widely cited and applied
because it is pragmatic, easy to understand, and to apply. It is generally agreed that it does not
capture all aspects of causality, but enough to be worth considering in an empirical test.”
In simple terms, Granger Causality between the indices exists if the variance of the prediction of one
index is less when you take into account the the past values of the other index, i.e.
if σ1
2
(yt:yt-i , xt-j) < σ2
2
(yt:yt-i) then causality exists.
Steps involved:
1) Make a time series of the data
2) Ensure Stationarity
3) Regression and Ljung Box Test
Having completed these steps I can now run the test which involves comparing the restricted
regression to the unrestricted regression. This is done through the grangertest function in R.
I initially tried the analysis in STATA and Eviews but ran into problems running the regression so
switched to R and the program ran much more smoothly. It was reassuring at least to see that
having input the data differently into 3 different program the first few steps yielded the same
results.
Having not used R before I referenced “The Book of R” for help with the coding. This book together
with Youtube tutorials are what I used for help in the regression analysis. The coding I used can be
seen in my appendix.
Section 4 Conclusion
4.1 Results
Full Period
Lag 1 month:
Causality in the direction of the Sentiment, ie VIX can be seen to cause Sentiment at a 99.9%
significance level.
Lag 2 months:
VIX causes Sentiment at a 99% significance.
Lag 3 months:
VIX causes Sentiment again with a 95% confidence level.
Pre and Post 08 Collapse
Now separating the data into pre and post collapse, ie January 2006 to September 2008 and
September 2008 to December 2011;
Lag 1 Period:
Bidirectional causality at 95% significance level pre crash. Unidirectional causality post crash where
VIX causes Sentiment at 95% confidence level.
Lag 2 Periods:
Straying from previous results, the causality lies in the opposite direction with Sentiment causing the
VIX pre crash at 95% confidence level. And agreeing with previous results VIX again causing
Sentiment at 95% confidence level post crash.
There was no significance found for any other lag periods.
Correlation:
In addition I calculated correlation between the variables at different lag periods. The most
significant of which was -0.71 correlation for a lag period of 1 month.
The results of the Granger Test together with the correlation coefficient signify that changes in VIX
negatively causes a change in Sentiment a month later, ie when market volatility is high, sentiment
will be low a month later and vice versa.
Further Analysis:
It is useful to know what models would be used if I were to conduct additional future research into
creating a forecast using the variables. To forecast a future level of sentiment various models can be
utilised, taking the VIX as an explanatory variable. For exemplary purpose I have prepared the
following ACFS and PACFS for each index so as to choose which model could be implemented. These
autocorrelation functions are a tool used to choose which ARIMA model is best suited for the
prediction.
TS1(Sentiment) on the following page implies an AR(1) model since it is geometrically decreasing for
the autocorrelation and sees significance at 1 lag for the PACF. When TS1 is differenced (diff(TS1))
we observe stationarity of the model is achieved. The ACF for TS2(Volatility) also implies an AR(1)
model. Since the data is clearly not stationary again, I differenced the VIX and saw that the ACF and
PACF also became stationary and the graphs were similar to that of sentiment meaning the same
model could be used.
The ARIMA model requires an input of the number of lags(p), the order of difference(d), and the
moving average(q). We get the lags from the ACF and the moving average from the PACF, so for each
index, the implied ARIMA model is hence ARIMA(1, 1, 1).
4.2 Conclusion:
The crux of my project was to decipher the relationship between Volatility and a Sentiment in a
financial market. To do this I carried out empirical analysis on the VIX index and Michigan Sentiment
index in the context of the Standard and Poor’s 500 index market and so my results are empirical
and biased but show evidence for further more robust research to be carried out on the relationship
between volatility and sentiment as wholes as opposed to the relationship between the
standardised index representation of each.
My results and analysis refer to the relationship between the VIX index and Michigan sentiment
index in the S&P500 market. I began by studying their predictive powers with the S&P 500 and found
them to be satisfactory predictors so both are very important tools in a financial market for fund
managers and investors. The next part, and a large proportion, of my project was to prepare the
indices for testing. When I was convinced they were set up according to the conditions required for
the testing I then carried out the Granger Causality test and calculated the correlation coefficients.
The results yielded that present VIX values cause a change in the Michigan sentiment index both one
and two months later. The one month lag is accounted for since the VIX is an implied volatility one
month ahead and the two month lag is the causality of interest. The intuition behind these results is
hence that Sentiment reacts to VIX one month later. For the pre and post September 2008 Granger
tests some puzzling results were obtained at lower significance levels than that of the full period. For
this reason I would refrain from believing these results hold merit. Errors come in to play in the
Granger Tests when sample sizes are small so I would attribute the error to the sample sizes.
Now that I have empirically shown that Volatility causes Sentiment, what does this mean for fund
managers? High volatility reduces sentiment, ie investors appetite to buy shares. Low volatility is
preferable since there is less variance of expected returns. Fund managers will know that in volatile
times, people will not be likely to buy, so it wouldn’t be a good time to sell as they won’t get the best
price. Experienced investors and fund managers can take advantage of the markets by herding
mentality/sentiment and spot when certain assets become over or under priced. So if a fund
manager were to know that the current high level of the VIX index will lead to a reduced sentiment
in the future, that fund manager could purchase long put options specifically on the S&P500 but this
would spread to other US stocks also. By buying a long put investors will be in the money when
prices fall below the strike price prior to the expiration date. As sentiment is correlated with S&P500,
if there is an expectation of sentiment to fall, the expectation holds true for prices too.
Sentiment is a reflection of how consumers feel about their economic conditions, both economy
wide and their own personal finances, it therefore affects their spending decisions and it is a vital
market indicator for governments, investors, and businesses. Again, if VIX is high, this predicts a
lower level of future sentiment, businesses should gauge this high level of VIX as a signal to reduce
production volumes and delay any investments in new projects. The US government could also use
this relationship to prepare for possible future losses to tax revenues. US banks could also take this
as a sign to prepare for reductions in loan applications and possible increased saving levels. The
implications for numerous parties are endless but clearly speculative and not certain since there will
never be perfect correlation between the 2 indices. Obviously, the opposite of each of these
responses to high VIX levels would be implied for a low level of VIX.
If I were to do further study on the relationship I could compile predictions of Sentiment levels using
ARIMA, GARCH and VAR models with VIX as an explanatory variable. I have outlined which ARIMA
model I would use and GARCH and VAR don’t require these preparatory steps I completed for
ARIMA.
References
[1] Survey of Consumers- Michigan University
http://www.sca.isr.umich.edu/
[2] University of Nebraska-Lincoln- Stochastic Processes and Advanced Mathematical Finance –
Implied Volatility
http://www.math.unl.edu/~sdunbar1/MathematicalFinance/Lessons/BlackScholes/ImpliedVolatility
/impliedvolatility.pdf
[3] Testing for Granger causality between stock prices and economic growth- Pasquale Foresti
https://mpra.ub.uni-muenchen.de/2962/1/MPRA_paper_2962.pdfTesting
[4] Quandl Put/Call Open Interest graph
https://www.quandl.com/data/CBOE/VIX_PC-CBOE-VIX-Option-Volume-and-Put-Call-Ratios
[5] The Relationships between Sentiment, Returns and Volatility – Yaw Huei Wang,
Aneel Keswani, Stephen J Taylor.
http://www.fin.ntu.edu.tw/~yhwang/YHWang_070801.files/IJF_revised.pdf
[6] Clive Granger Personal Account – Scholarpedia
http://www.scholarpedia.org/article/Granger_causality
[7] John C. Hull, Options, Futures, & Other Derivatives 9th edition (Global), Prentice Hall, 2014.
Appendix
1) Overlay plot (VIX vs Sentiment):
# Data from csv file is copied as a matrix but for plotting we need vectors
# As the file has 72 value rows and 4 columns so the matrix created is 4 by 72
matrixCSV <- read.csv("U:/My Documents/FYP/Overlay.csv")
# matrixCSV[ , 1] gets all the values in first column of the matrix
# as.vector() function converts these values into a vector
dateCSV <- as.vector(matrixCSV[ , 1])
# But these values are strings so we need to convert them to date before plotting
# as.Date(vector, dateFormat) converts every value inside vector to date
dateVector <- as.Date(dateCSV, "%d/%m/%Y")
# Similarly converting Sentiment(index) and VIX values to vector from the matrix
indexVector <- as.vector(matrixCSV[ , 2])
vixVector <- as.vector(matrixCSV[ , 3])
# min() function gets the minimum value in a vector
# max() function gets the maximum value in a vector
# c() function is used to create a vector
# minVector contains all the minimum values from index and vix vectors
# maxVector contains all the maximum values from index and vix vectors
minVector <- c(min(indexVector), min(vixVector))
maxVector <- c(max(indexVector), max(vixVector))
# yAxisMinValue is 5 less than the minimum value in the minVector
# yAxisMaxValue is 5 more than the maximum value in the maxVector
# I used this aesthetic command to make the graph easier to read
yAxisMinValue <- (min(minVector) - 5)
yAxisMaxValue <- (max(maxVector) + 5)
# plot() function plots the chart
# so using c() function to create a vector from yAxisMinValue and yAxisMaxValue
# this plot() function will create just one line(index) on the plot
plot(dateVector,
indexVector,
type="l",
col="red",
xlab="Months",
ylab="Index & VIX",
ylim=c(yAxisMinValue, yAxisMaxValue))
# lines() function will add a line chart to the existing plot
lines(dateVector,vixVector,col="blue")
# grid() fuction draws a background dotted grid on the plot
# This is another aesthetic command I included
grid(20,20)
# legend() function creates a legend over the plot
# inset = inset distance from the margins as a fraction of the plot region
# cex = character expansion factor relative to current par("cex")
# title = legend heading string
# c("Index","VIX") = lables for the lines (accepts vector)
# horiz = if TRUE, set the legend horizontally
# lty, lwd = the line types and widths for lines appearing in the legend
# col = color for the lines (accepts vector in same sequence as the labels)
# bg = background color for the legend box (using 90% grey)
legend("topright",
inset=.05,
cex = 1,
title="Legend",
c("Index","VIX"),
horiz=TRUE,
lty=c(1,1),
lwd=c(2,2),
col=c("red","blue"),
bg="grey90")
2) Time Series
library(tseries)
library(fGarch)
library(lmtest)
#Setup for Analysis
file = read.csv("TS.csv", header = T, sep = ",")
attach(file)
date = file[,c("Date")]
index = file[,c("Index")]
vix = file[,c("VIX")]
#Make Time Series
TS1 = as.ts(index)
par(mfrow=c(2,1))
acf = acf(TS1)
pacf = pacf(TS1)
plot(index)
plot(TS1, xlab="Time", ylab="Index")
TS2 = as.ts(vix)
par(mfrow=c(2,1))
acf = acf(TS2)
pacf = pacf(TS2)
plot(vix)
plot(TS1, xlab="Time", ylab="Vix")
#Regression Analysis
lm1 = lm(index ~ (1 + vix))
summary(lm1)
AIC(lm1)
BIC(lm1)
sqrt(mean(lm1$residuals^2))
par(mfrow=c(2,2))
plot(lm1$residuals)
boxplot(lm1$residuals)
hist(lm1$residuals)
qqnorm(lm1$residuals)
qqline(lm1$residuals)
plot(lm1)
lm2 = lm(vix ~ (1 + index))
summary(lm2)
AIC(lm2)
BIC(lm2)
sqrt(mean(lm2$residuals^2))
par(mfrow=c(2,2))
plot(lm2$residuals)
boxplot(lm2$residuals)
hist(lm2$residuals)
qqnorm(lm2$residuals)
qqline(lm2$residuals)
plot(lm2)
#Redo AIC, BIC for different lags
#Difference the data
TS1a = diff(TS1)
Acf1 = acf(TS1a)
Pacf1 = pacf(TS1a)
plot(diff(TS1), main="", ylab=expression(TS[t] - TS[t-1]))
#Do same for TS2
Box.test(diff(TS1), lag=20, type="Ljung-Box")
adf.test(diff(TS1), alternative = "stationary")
Box.test(diff(TS2), lag=20, type="Ljung-Box")
adf.test(diff(TS2), alternative = "stationary")
3) Granger Results for Full period:
Granger Results Pre and Post September 2008 for lag 1:
Granger Results Pre and Post September 2008 for lag 2:

Más contenido relacionado

La actualidad más candente

yieldCurve
yieldCurveyieldCurve
yieldCurve
JI WANG
 
2013-las-session-59
2013-las-session-592013-las-session-59
2013-las-session-59
Winter Liu
 
Popular economicsciences2013
Popular economicsciences2013Popular economicsciences2013
Popular economicsciences2013
Giancarlo Aguilar
 

La actualidad más candente (19)

Currency high lights 13.02.17
Currency high lights 13.02.17Currency high lights 13.02.17
Currency high lights 13.02.17
 
Efficient Market Hypothesis (EMH)
Efficient Market Hypothesis (EMH)Efficient Market Hypothesis (EMH)
Efficient Market Hypothesis (EMH)
 
yieldCurve
yieldCurveyieldCurve
yieldCurve
 
Prévisions des crises
Prévisions des crises Prévisions des crises
Prévisions des crises
 
Instaforex brociur
Instaforex brociurInstaforex brociur
Instaforex brociur
 
av
avav
av
 
Central Bank Mania Continues
Central Bank Mania ContinuesCentral Bank Mania Continues
Central Bank Mania Continues
 
2013-las-session-59
2013-las-session-592013-las-session-59
2013-las-session-59
 
11.impact of injection and withdrawal of money stock on economic growth in ni...
11.impact of injection and withdrawal of money stock on economic growth in ni...11.impact of injection and withdrawal of money stock on economic growth in ni...
11.impact of injection and withdrawal of money stock on economic growth in ni...
 
6.[60 67]impact of injection and withdrawal of money stock on economic growth...
6.[60 67]impact of injection and withdrawal of money stock on economic growth...6.[60 67]impact of injection and withdrawal of money stock on economic growth...
6.[60 67]impact of injection and withdrawal of money stock on economic growth...
 
Bordo and haubrich Predictive power of term structure of interest rates
Bordo and haubrich Predictive power of term structure of interest ratesBordo and haubrich Predictive power of term structure of interest rates
Bordo and haubrich Predictive power of term structure of interest rates
 
Popular economicsciences2013
Popular economicsciences2013Popular economicsciences2013
Popular economicsciences2013
 
Module 1 - Technical Analysis and the Dow Theory
Module 1 - Technical Analysis  and the Dow TheoryModule 1 - Technical Analysis  and the Dow Theory
Module 1 - Technical Analysis and the Dow Theory
 
Currency high lights 20.02.17
Currency high lights 20.02.17Currency high lights 20.02.17
Currency high lights 20.02.17
 
Saxo Bank
Saxo BankSaxo Bank
Saxo Bank
 
The World This Week November 14 - November 18 2016
The World This Week November 14 - November 18 2016The World This Week November 14 - November 18 2016
The World This Week November 14 - November 18 2016
 
The World This Week October 31 - November 4 - 2016
The World This Week October 31 - November 4 - 2016The World This Week October 31 - November 4 - 2016
The World This Week October 31 - November 4 - 2016
 
01 October 2019 Mcx Daily Report
01 October 2019 Mcx Daily Report01 October 2019 Mcx Daily Report
01 October 2019 Mcx Daily Report
 
Random walk theory
Random walk theoryRandom walk theory
Random walk theory
 

Similar a Final Draft

Exchange rate volatility implied from option prices
Exchange rate volatility implied from option pricesExchange rate volatility implied from option prices
Exchange rate volatility implied from option prices
Srdjan Begovic
 
Empirical Methods In Accounting And Finance.docx
Empirical Methods In Accounting And Finance.docxEmpirical Methods In Accounting And Finance.docx
Empirical Methods In Accounting And Finance.docx
4934bk
 
Analysis Of Market Indices & Component Stocks
Analysis Of Market Indices & Component StocksAnalysis Of Market Indices & Component Stocks
Analysis Of Market Indices & Component Stocks
abhipray
 
Investment Analysis
Investment Analysis Investment Analysis
Investment Analysis
Nina Haku
 
Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?
Rusman Mukhlis
 
RMG Design Build Protect
RMG Design Build ProtectRMG Design Build Protect
RMG Design Build Protect
Mercedes Keene
 
Fundamental analysis
Fundamental analysisFundamental analysis
Fundamental analysis
eshabhatia
 
Fundamental analysis
Fundamental analysisFundamental analysis
Fundamental analysis
eshabhatia
 

Similar a Final Draft (20)

Analyzing The Outperforming Sector In Volatile Market
Analyzing The Outperforming Sector In Volatile MarketAnalyzing The Outperforming Sector In Volatile Market
Analyzing The Outperforming Sector In Volatile Market
 
Exchange rate volatility implied from option prices
Exchange rate volatility implied from option pricesExchange rate volatility implied from option prices
Exchange rate volatility implied from option prices
 
Empirical Methods In Accounting And Finance.docx
Empirical Methods In Accounting And Finance.docxEmpirical Methods In Accounting And Finance.docx
Empirical Methods In Accounting And Finance.docx
 
IJSRED-V2I3P71
IJSRED-V2I3P71IJSRED-V2I3P71
IJSRED-V2I3P71
 
Monthly Perspectives - Volatility - June 2016
Monthly Perspectives - Volatility - June 2016Monthly Perspectives - Volatility - June 2016
Monthly Perspectives - Volatility - June 2016
 
Analysis Of Market Indices & Component Stocks
Analysis Of Market Indices & Component StocksAnalysis Of Market Indices & Component Stocks
Analysis Of Market Indices & Component Stocks
 
Mutual Fund Style Drift and Market Conditions
Mutual Fund Style Drift and Market ConditionsMutual Fund Style Drift and Market Conditions
Mutual Fund Style Drift and Market Conditions
 
Final Presentation on FMR.pptx
Final Presentation on FMR.pptxFinal Presentation on FMR.pptx
Final Presentation on FMR.pptx
 
Vision Capital M Economic Newsletter
Vision Capital M Economic NewsletterVision Capital M Economic Newsletter
Vision Capital M Economic Newsletter
 
Investment Analysis
Investment Analysis Investment Analysis
Investment Analysis
 
Impact of Macroeconomic Factors on Share Price Index in Vietnam’s Stock Market
Impact of Macroeconomic Factors on Share Price Index in Vietnam’s Stock MarketImpact of Macroeconomic Factors on Share Price Index in Vietnam’s Stock Market
Impact of Macroeconomic Factors on Share Price Index in Vietnam’s Stock Market
 
New Market Highs and Positive Expected Returns
New Market Highs and Positive Expected ReturnsNew Market Highs and Positive Expected Returns
New Market Highs and Positive Expected Returns
 
A Global Perspective of Varying Interest Rates in International Markets
A Global Perspective of Varying Interest Rates in International MarketsA Global Perspective of Varying Interest Rates in International Markets
A Global Perspective of Varying Interest Rates in International Markets
 
Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?Chapter 06_ Are Financial Markets Efficient?
Chapter 06_ Are Financial Markets Efficient?
 
ANALYSIS OF MARKET INDICES AND COMPONENT STOCKS - PART 2
ANALYSIS OF MARKET INDICES AND COMPONENT STOCKS - PART 2ANALYSIS OF MARKET INDICES AND COMPONENT STOCKS - PART 2
ANALYSIS OF MARKET INDICES AND COMPONENT STOCKS - PART 2
 
RMG Design Build Protect
RMG Design Build ProtectRMG Design Build Protect
RMG Design Build Protect
 
New market highs and positive expected returns
New market highs and positive expected returnsNew market highs and positive expected returns
New market highs and positive expected returns
 
Fundamental analysis
Fundamental analysisFundamental analysis
Fundamental analysis
 
Fundamental analysis
Fundamental analysisFundamental analysis
Fundamental analysis
 
Brian Glaze & Larry Ware, CRPC, CLTC – Proactive Advisor Magazine – Volume 5 ...
Brian Glaze & Larry Ware, CRPC, CLTC – Proactive Advisor Magazine – Volume 5 ...Brian Glaze & Larry Ware, CRPC, CLTC – Proactive Advisor Magazine – Volume 5 ...
Brian Glaze & Larry Ware, CRPC, CLTC – Proactive Advisor Magazine – Volume 5 ...
 

Final Draft

  • 1. An investigation into the relationship between Market volatility and investor sentiment. Nora Sheehan 12389296 Final Year Project 2015-2016 BSc Financial Mathematics and Economics Supervisor: Dr Srinivasan Raghavendra February 2016
  • 2. I hereby certify that this material, which I now submit for assessment on the programme of study leading to the award of (degree or masters) is entirely my own work and had not been taken from the work of others save and to the extent that such work has been cited and acknowledged within the text of my work. Signed: ___________________ ID no: _____________ Date: __________
  • 3. Acknowledgements I would like to thank Dr. Srinivasan Raghavendra for his time and support throughout the duration of my project. Without his guidance and encouragement I would not have been able to complete this work.
  • 4. Table of Contents: Section 1 Introduction 1.1 Abstract 1.2 Introduction 1.3 Literary Review Section 2 Data Preparation 2.1 Choosing indices for Volatility and Sentiment 2.2 Regression Analysis for choosing Prediction Indicators Section 3 Time Series Analysis 3.1 Stationarity 3.2 Regression Analysis 3.3 Granger Causality Testing Section 4 Conclusion 4.1 Results 4.2 Conclusion References Appendix
  • 5. Section 1 1.1 Abstract: Stock markets have in recent times been extremely volatile and it is this market volatility which generates the state of investors’ returns – investors dislike volatility. Investor sentiment is revealed through equity/asset price fluctuations. For example, a risk averse arbitrageur may expect prices to diverge further before convergence and so they may invest less and so this sentiment could predict the behaviour of asset prices. There is an obvious link between investor sentiment and market volatility but it is unclear whether or not this is a causal relationship and in which direction the causality lies. Simplistically speaking, if investors see a bullish market sentiment they will choose to invest which will reduce market volatility, and, conversely, if the market is currently volatile this will cause a bearish period. The S&P 500 is used as a leading indicator of US equities and is the most common benchmark for doing so in the US. It is an index of 500 US stocks chosen for market size, liquidity and industry grouping and is meant to reflect the risk/return characteristics of the large capital world. More and more research into stock markets is being conducted since the collapse of the global markets in September 2008. The crash was most prevalent in the US since this is where the crux of the collapse began with the failings of the Lehman Brothers.
  • 6. 1.2 Introduction The broad aim of this project is to study the interrelation between investor sentiment and stock market volatility. To do this I have chosen to devise indices for both sentiment and volatility based on the Standard and Poor’s 500 index (S&P 500). In doing this I examined different predictors for each market indicator as well as previously devised indices and tested their effect on the S&P 500 to see if they could be categorized as good indicators. I used only the best 2 indicators as the rest were seen to give larger error which would prove problematic in my analysis. The time period I used to conduct my analysis is 2006 to 2012. Within this time period the US market went from boom to bust so it will be interesting to see how investor sentiment and volatility reacted to the crash. It will also be a good indication of whether my indicators follow the pattern one would expect in these periods of uncertainty (i.e. rise in volatility and the bearish period should cause a fall in sentiment). It will also be interesting to see whether investors became more optimistic about future prices as the economy began to return to growth after the crash (i.e. did volatility fall and sentiment increase?). Thus this project will study both the movement of individual sentiment and market volatility through a period of boom and bust and examine the relationship the two indicators have with each other. There exists both institutional and individual sentiments, for the purpose of my research I will be considering only individual sentiment which relates to noise traders and their relationship with market volatility. The purpose for examining individual sentiment rather than institutional is that in the context of the time period of my analysis I wanted to analyse how uninformed individuals react to turbulent economic eras. The period 06-08 should show bullish signs emulating the then ongoing credit bubble, following this we would expect an extremely bearish market 07/08 when the credit crunch hit and generated fear among consumers and bullish markets should resume after this when signs of market recovery appear.
  • 7. 1.3 Literary Review of Sentiment and Volatility in the US Measuring investor sentiment is at the heart of financial market research. For this reason there are various sentiment indices found in existing literature. Most popularly, sentiment is examined in the context of its relationship with returns but less commonly studied is that of its relationship with volatility. Classical finance theory suggests that the effects of sentiment on stock prices are negligible when arbitrageurs act upon it. However, in modern economics, behavioural finance theories have quashed this idea. In the early 1990s, studies indicated that investors trade more heavily in some assets increasing their respective transaction costs which affect the asset price, therefore clearly exhibiting the influence sentiment has on a market1. Brown concluded that where levels of investor sentiment deviate from the mean, greater volatility occurs2. Many more recent studies of the measurability of investor sentiment all come to the underlying conclusion that sentiment can be seen to be strongly correlated with returns, while most studies do use different approaches for the indicators of sentiment. For the purpose of my analysis it is therefore feasible to use a single sentiment indicator3.Economic conditions today are realistically too diverse to simplify sentiment into a single index but just as we need aggregate statistics for GDP, we also need a broad index to summarise sentiment trends. Stock price movements investigate the efficiency of a stock market and so are widely studied. Volatility measures the difference from the mean return of a stock and different measures take into account different fundamentals in the calculation. Volatility movements can be caused by either a rise in the number of traders or the arrival of new information (Tauchen and Pitts 1983) – new information such as that of new sentiment releases. Time series analysis plays a pivotal role in stock market analysis and comes in to play very much so in studies of volatility, sentiment and returns. A time series consists of observations usually made equally spaced in time. Because each observation isn’t independent, time series analysis accounts for time order in contrast with other statistical analysis of random samples of independent observations. The objective of the time series I will conduct is classified as explanatory.4 The plot of the time series reveals features such as trend, seasonalities, discontinuities, and outliers that may be present in the data. 1 Noise Trader Risk in Financial Markets: De Long, Shleifer, Summers, Waldmann 2 Brown 1999 3 Baker and Wurgler (2006) 4 Bowerman, B.L. and O’Connell R.T. (1987).
  • 8. Section 2 Data Preparation • Choose a single index for sentiment and a single index for volatility in the S&P 500 using Minitab. 2.1 Choosing indices for Volatility and Sentiment: Sentiment can be measured in many ways, either through technical analysis of the market or by gathering information from individuals and compiling an index based on their thoughts about the market. Of course, rationality in these sentiment measures is important but, on the other hand, in the time period being analysed it can be argued that the majority of investors were acting entirely irrationally. Late 2008 is a prime example of what can happen when irrational thinking overcomes rationality. Volatility can be measured by calculating the standard deviations of price changes or by using previously formulated indices. Many institutions, such as the CBOE for example, construct volatility indices for the market using a combination of mathematical methods and stock market analysis. Technical analysis of Sentiment: Moving Averages: This is a measure of the percentage of NYSE stocks trading above their 50-day moving average (MA). Stocks above the 50-day MA are indicative of a rising market. As with the NYSE bullish percentage, look for extreme readings as an indication that the market is ether overbought or oversold. I compiled this graph on Yahoo Finance to show the 50 and 200 day moving average for the S&P 500 (ticker ^GSPC) over the 6-year period. When the 50-day MA is below the 200 day MA a bearish period is predicted by traders, and we can see this occurs from October 2008 to May 2011. As the 50 day MA crossed above the 200 day MA in May 2011, a bullish period was predicted. The moving average convergence/divergence or MACD shows the difference between two moving averages of share price. A positive MACD indicates a bullish period is expected. And a negative MACD indicates a bearish period is to be expected. The S&P has generally positive MACD throughout the 6 years with a negative period seen from December 2007(perhaps a signal of the beginning of market failure) until July of 2009(perhaps signalling the belief in a return to growth). Where the negative MACD began in December 2007 we can see the bearish period of a sharp and steady decline in trading volumes coinciding with this in the SMA graph.
  • 9. P/C Ratios: The Put/Call ratio is the difference in trading volume between put and call options. A P/C ratio greater than one indicates more puts are being traded than calls, meaning traders are mostly bearish. The Put/Call ratio is a contrarian indicator, i.e. a reading far above one is actually a bullish indicator and an extreme reading below one (i.e. more calls than puts traded) is a bearish indicator. I simply collected the data for the volume of puts and calls and calculated the ratio for each day: 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 𝑣𝑣𝑣𝑣 𝑜𝑜𝑜𝑜 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 𝑣𝑣𝑣𝑣 𝑜𝑜𝑜𝑜 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 This seemed a useful indicator since I could compile it in index form so I stored the ratios alongside my daily prices in excel until I finished finding indicators to begin the analysis of the best ones. A pitfall here is that a P/C ratio in conjunction with open interest, accounts for whether the change in volume is actually associated with new positions in the market. Of course it would be logical then to include open interest calculations in my calculations but since the S&P isn’t a single stock, options chain data were not available to download. It is clear to see from the following graph that there are some notable differences between the two which is why it is somewhat detrimental to my analysis I couldn’t source information for open interest for my time period.
  • 10. Legend of OECD graph: (link in appendix) Blue - Open Interest (Right Axis) Orange - P/C Ratio (Left Axis) Surveys of individual investor sentiment: Rather than analysing bullish and bearish periods using available market data, surveys are compiled by institutions to gauge the market sentiment through individuals’ actual thoughts about the market. Index of Consumer Sentiment (ICS): The most renowned index of consumer sentiment is compiled by Michigan University which is sponsored by Thomas Reuters. It has been shown to be the most causal index of its type to market activity. Trading is seen to increase dramatically following the monthly release of the index. The Institute for Social Research (ISR) at The University of Michigan is one of the largest university- based social science research institutions in the world and I found this survey to be most referenced on sentiment in the US by market analysts across the web. The results from the survey are converted to index form by the following steps: 1) Compute the relative scores ((% favourable replies - % unfavourable replies)+100) for each of the questions. 2) Round each relative score to the nearest whole number. 3) Use the following formula to calculate the Index of Consumer Sentiment(ICS):
  • 11. where the Xi represent the previously calculated relative score for each question and the 6.7558 is the base year total* and the addition of 2 is a correction constant**. * The base period total is taken from 1966. ** This constant has been the same since 1981. While I am confident that the survey itself is comprehensive in its population sample the fact that the correction constant hasn't changed since 1981 seems as though it could cause sample errors in the index calculation. Another drawback here was that the data is only available in monthly increments - daily data would give a much more indicative relationship when tested against another variable. Bearing in mind that as an economist I must be weary of surveys of sentiment since there is a difference between how respondents answer and how they would actually behave. Rationality will require that people’s expectations be on target over a number of years. It is clear that the survey is rational since it has been ongoing for decades and proven to be an accurate indicator of the future of the national economy. Volatility Indices: Standard Deviation: The most obvious volatility measure is standard deviation of price changes in the market. Hull outlines the method I followed in my calculation of an estimation of the volatility of the S&P 500: 1) Calculate the Daily Return (Ui) using the Log of the Relative Price (Si/Si-1) where; Si = Price at end of period i. n+1 = Number of observations 2) Estimate the Standard deviation using the following formula: 3) In my calculations I used daily data from the S&P 500 and calculated the standard deviation in monthly intervals leaving me with 72 data points. VIX:
  • 12. This is a volatility index1 compiled by the Chicago Board Options Exchange (CBOE). This should be similar to my results from the standard deviation analysis but since the CBOE have access to more information and labour hours they will be more reflective. The general formula they use to calculate volatility is: where σ is VIX/100 => VIX = 100 x σ T Time to expiration F Forward index level desired from index option prices Ko First strike below the forward index level, F Strike price of the ith out-of-the-money option; a call if Ki >Ko; and a put if Ki<Ko: both put and call if Ko=Ki. ∆Ki Interval between strike prices is half the difference between the strike on either side of Ki: R Risk-free interest rate to expiration Q(Ki) The midpoint of the bid-ask spread for each option with strike Ki. In words, the CBOE select the sample options, calculate the volatility of both the near and next term options and calculate a 30 day weighted average based on these. The index is then simply the square root of this multiplied by 100. It was interesting to see the ingredients for market volatility and understand how puts, calls and strike prices all play pivotal roles in the mechanics of economy. 2.2 Regression Analysis for choosing Prediction Indicators: I wanted to work with the most accurate predictor of prices for both indices so I ran two regressions in Minitab, one for the Volatility indices and the S&P index and one for the Sentiment indices and the S&P index.
  • 13. Sentiment Regression:  P/C Ratio As it required membership to access P/C ratios prior to 2010 I decided to do the regression based on the 2 and a half year period from July 2010- December 2012 and if the P/C ratio turned out to be the better predictor I could deal with that later. Bearing in mind also that the open interest information is only made available in visual representations so this was another limitation of the P/C sentiment analysis.  Michigan Index: In line with the problem faced for the P/C ratio I just used the 2010-2012 data for this in the regression also. And because this index is only available on a monthly basis, I created a rolling average for the monthly data for the P/C Ratio using Excel. Volatility Regression:  VIX: To do a robust regression I used monthly data for the VIX predictor and used the same time period as I did in the Sentiment regression and regress this against S&P monthly prices.  Standard Deviation: I then used my monthly standard deviations (previously calculated from Hull’s recommended volatility estimation). Now I have 5 variables over a 30 month period on my minitab screen which I can now conduct some statistical analysis on. My only aim here is to choose my indicator for Sentiment and indicator for Volatility, the criteria I want my chosen indicators to fulfil is to be the better predictors of market prices against their competitor index. To do this I will look run a Best Subsets Test and examine the p-values of the regression. Results: The results of the best subsets test indicated the Michigan Sentiment index and the VIX as the best predictors. The p-values of each were also 0.000 whereas the p-values were above the 5% range for the others so I can now begin the main analysis of my project by testing for causality between the Michigan Sentiment Index and the VIX.
  • 14. Section 3 Time Series Analysis • Conduct time series analysis on both indicators using R. • Test for causality between the 2 indices using R. • Split the time frame into post and prior crash periods and use my results to record any significance The first step in the process was to create a time series plot of the data, which displayed the daily average for each month, versus the months from January 2006 to December 2012. I created and overlay plot of both VIX and ICS together. The most notable outliers in both occur in late 2008 and late 2011. The most significant in late 08 can be explained by the collapse of the markets. Figure 1: This graph is a representation of the VIX and the Sentiment Index in an overlay plot that I created in R, the coding for which can be seen in the appendix. It is a good start to see a visual representation of the 2 indices together. While VIX is measured on a different scale, it is still useful to see how both movements relate to one another.
  • 15. Here it seems as though the two indices are almost mirrored - they move in opposite directions for the most part with a major discrepancy seen from the end of 2008 to the middle of 2009. This is representative of the crash in the US economy, obviously volatility would jump here and remain higher than average for a period until signs of stability were introduced into the market, and likewise sentiment would clearly fall in the period of uncertainty. From the graph we note that the US economy was slipping fast much before the Lehman collapse, volatility rising and sentiment falling prior to September 2008. This could be due to both extortionate oil prices at the time and the numerous other financial woes within the US. As expected, we see a sharp rise in volatility at the exact time of the collapse while sentiment itself remains at a low volatile level. Following 2008 sentiment levels improve while at a much lower level than that of the state of euphoria experienced in the 06/07 period. Volatility drops dramatically yet remains at a higher level and pre crash times. We can conclude that consumers are more wary of their financial positions following the collapse of the economy and markets are more volatile than before since recovery stages of an economy exhibit more volatility than that of the previous euphoric stages. 3.1 Stationarity: Sentiment (TS1) Looking at the Sentiment index we can see immediately that it doesn’t meet the assumptions required for stationary data, the mean and variance are not constant. Stationarity is a necessary condition for time series analysis which requires the data to be of constant variance and mean zero. By taking the first difference of the index we observe a seemingly stationary series, to ensure stationarity I implemented an Augmented Dickey Fuller test which verified the stationarity by rejecting the null hypothesis of non stationarity.
  • 16. The ADF null hypothesis is that the data is non stationary, since the p-value is less than 0.05 and the critical value is -3.8528 we can reject this hypothesis and assume that our differenced data is stationary.
  • 17. Volatility (TS2) Looking at the time series compared with the differenced time series we can see immediately that the differenced data looks more stationary than the original series. The critical value is sufficiently negative and the p-value is small enough that we can reject the null hypothesis of the data being non stationary. We now have a stationary series of both differenced sentiment and volatility so can conduct a regression on these and conduct the granger test and hence tell if they can be used for forecasting purposes using ARIMA, GARCH and VAR models.
  • 18. 3.2 Regression Analysis The next step was the regression of each of the indices, Sentiment represented first as lm1 (linear model) and Volatility as lm2. That the residuals are spread apart shows that they are independently distributed and the box plot here is also significant. When we look at the Histogram of the residuals, we can see that it is relatively unimodal and symmetric, but not perfectly so, some departures from normal exist to the right. From the Normal Probability Plot, which plots ordered residuals against typical values from a normal distribution; we observe approximate linearity and we can conclude that the error terms in this regression model are approximately normally distributed. The assumption of normality is not unreasonable for the residuals in this model. In other words, we conclude that the normality assumption for the error terms is satisfied.
  • 19. That the residuals are spread apart shows that they are independent and the box plot here is also significant. The histogram is quite normal and the QQ plot just tails off at the top and bottom. Box Ljung Test: H0: The data are independently distributed (the 72 observations for each indicator are uncorrelated). Ha: The data are not independently distributed; they exhibit serial correlation. A small p-value indicates dependence between the residuals, so we are hoping for a p-value of greater than 0.05 to signal that my differenced datasets residuals are uncorrelated, ie that we can accept the null hypothesis.
  • 20. As we wanted, the Ljung box test confirms the independence of the residuals of both sentiment(TS1) and volatility(TS2) indices since it accepts the null hypothesis of independent distribution. 3.3 Granger Causality Testing Testing causality using Granger method uses F-tests to test whether lagged information on a variable Y provides any statistically significant information about a variable X in the presence of lagged X. If not, then "Y does not Granger-cause X." In this case choosing X, Y to be VIX and Sentiment. Clive W.J. Granger’s personal account of the test in the early 1960's: “I was considering a pair of related stochastic processes which were clearly inter-related and I wanted to know if this relationship could be broken down into a pair of one way relationships. It was suggested to me to look at a definition of causality proposed by a very famous mathematician, Norbert Weiner, so I adapted this definition (Wiener 1956) into a practical form and discussed it.” Each of my processes is a stochastic process as the future prices depends only on the present index value. But the lags come in to play in since the crossover of information and time it takes for investors to act on information causes delays in the process, for this reason I will be conducting the Granger test with respect to lags. The reason for my use of this test which isn’t an absolute determinant of causality but rather G- Causality can be told in Granger’s own words” The definition has been widely cited and applied because it is pragmatic, easy to understand, and to apply. It is generally agreed that it does not capture all aspects of causality, but enough to be worth considering in an empirical test.” In simple terms, Granger Causality between the indices exists if the variance of the prediction of one index is less when you take into account the the past values of the other index, i.e. if σ1 2 (yt:yt-i , xt-j) < σ2 2 (yt:yt-i) then causality exists.
  • 21. Steps involved: 1) Make a time series of the data 2) Ensure Stationarity 3) Regression and Ljung Box Test Having completed these steps I can now run the test which involves comparing the restricted regression to the unrestricted regression. This is done through the grangertest function in R. I initially tried the analysis in STATA and Eviews but ran into problems running the regression so switched to R and the program ran much more smoothly. It was reassuring at least to see that having input the data differently into 3 different program the first few steps yielded the same results. Having not used R before I referenced “The Book of R” for help with the coding. This book together with Youtube tutorials are what I used for help in the regression analysis. The coding I used can be seen in my appendix. Section 4 Conclusion 4.1 Results Full Period Lag 1 month: Causality in the direction of the Sentiment, ie VIX can be seen to cause Sentiment at a 99.9% significance level. Lag 2 months: VIX causes Sentiment at a 99% significance. Lag 3 months: VIX causes Sentiment again with a 95% confidence level.
  • 22. Pre and Post 08 Collapse Now separating the data into pre and post collapse, ie January 2006 to September 2008 and September 2008 to December 2011; Lag 1 Period: Bidirectional causality at 95% significance level pre crash. Unidirectional causality post crash where VIX causes Sentiment at 95% confidence level. Lag 2 Periods: Straying from previous results, the causality lies in the opposite direction with Sentiment causing the VIX pre crash at 95% confidence level. And agreeing with previous results VIX again causing Sentiment at 95% confidence level post crash. There was no significance found for any other lag periods. Correlation: In addition I calculated correlation between the variables at different lag periods. The most significant of which was -0.71 correlation for a lag period of 1 month. The results of the Granger Test together with the correlation coefficient signify that changes in VIX negatively causes a change in Sentiment a month later, ie when market volatility is high, sentiment will be low a month later and vice versa. Further Analysis: It is useful to know what models would be used if I were to conduct additional future research into creating a forecast using the variables. To forecast a future level of sentiment various models can be utilised, taking the VIX as an explanatory variable. For exemplary purpose I have prepared the following ACFS and PACFS for each index so as to choose which model could be implemented. These autocorrelation functions are a tool used to choose which ARIMA model is best suited for the prediction. TS1(Sentiment) on the following page implies an AR(1) model since it is geometrically decreasing for the autocorrelation and sees significance at 1 lag for the PACF. When TS1 is differenced (diff(TS1)) we observe stationarity of the model is achieved. The ACF for TS2(Volatility) also implies an AR(1) model. Since the data is clearly not stationary again, I differenced the VIX and saw that the ACF and PACF also became stationary and the graphs were similar to that of sentiment meaning the same model could be used.
  • 23. The ARIMA model requires an input of the number of lags(p), the order of difference(d), and the moving average(q). We get the lags from the ACF and the moving average from the PACF, so for each index, the implied ARIMA model is hence ARIMA(1, 1, 1).
  • 24. 4.2 Conclusion: The crux of my project was to decipher the relationship between Volatility and a Sentiment in a financial market. To do this I carried out empirical analysis on the VIX index and Michigan Sentiment index in the context of the Standard and Poor’s 500 index market and so my results are empirical and biased but show evidence for further more robust research to be carried out on the relationship between volatility and sentiment as wholes as opposed to the relationship between the standardised index representation of each. My results and analysis refer to the relationship between the VIX index and Michigan sentiment index in the S&P500 market. I began by studying their predictive powers with the S&P 500 and found them to be satisfactory predictors so both are very important tools in a financial market for fund managers and investors. The next part, and a large proportion, of my project was to prepare the indices for testing. When I was convinced they were set up according to the conditions required for the testing I then carried out the Granger Causality test and calculated the correlation coefficients. The results yielded that present VIX values cause a change in the Michigan sentiment index both one and two months later. The one month lag is accounted for since the VIX is an implied volatility one month ahead and the two month lag is the causality of interest. The intuition behind these results is hence that Sentiment reacts to VIX one month later. For the pre and post September 2008 Granger tests some puzzling results were obtained at lower significance levels than that of the full period. For this reason I would refrain from believing these results hold merit. Errors come in to play in the Granger Tests when sample sizes are small so I would attribute the error to the sample sizes.
  • 25. Now that I have empirically shown that Volatility causes Sentiment, what does this mean for fund managers? High volatility reduces sentiment, ie investors appetite to buy shares. Low volatility is preferable since there is less variance of expected returns. Fund managers will know that in volatile times, people will not be likely to buy, so it wouldn’t be a good time to sell as they won’t get the best price. Experienced investors and fund managers can take advantage of the markets by herding mentality/sentiment and spot when certain assets become over or under priced. So if a fund manager were to know that the current high level of the VIX index will lead to a reduced sentiment in the future, that fund manager could purchase long put options specifically on the S&P500 but this would spread to other US stocks also. By buying a long put investors will be in the money when prices fall below the strike price prior to the expiration date. As sentiment is correlated with S&P500, if there is an expectation of sentiment to fall, the expectation holds true for prices too. Sentiment is a reflection of how consumers feel about their economic conditions, both economy wide and their own personal finances, it therefore affects their spending decisions and it is a vital market indicator for governments, investors, and businesses. Again, if VIX is high, this predicts a lower level of future sentiment, businesses should gauge this high level of VIX as a signal to reduce production volumes and delay any investments in new projects. The US government could also use this relationship to prepare for possible future losses to tax revenues. US banks could also take this as a sign to prepare for reductions in loan applications and possible increased saving levels. The implications for numerous parties are endless but clearly speculative and not certain since there will never be perfect correlation between the 2 indices. Obviously, the opposite of each of these responses to high VIX levels would be implied for a low level of VIX. If I were to do further study on the relationship I could compile predictions of Sentiment levels using ARIMA, GARCH and VAR models with VIX as an explanatory variable. I have outlined which ARIMA model I would use and GARCH and VAR don’t require these preparatory steps I completed for ARIMA. References [1] Survey of Consumers- Michigan University http://www.sca.isr.umich.edu/ [2] University of Nebraska-Lincoln- Stochastic Processes and Advanced Mathematical Finance – Implied Volatility http://www.math.unl.edu/~sdunbar1/MathematicalFinance/Lessons/BlackScholes/ImpliedVolatility /impliedvolatility.pdf [3] Testing for Granger causality between stock prices and economic growth- Pasquale Foresti https://mpra.ub.uni-muenchen.de/2962/1/MPRA_paper_2962.pdfTesting [4] Quandl Put/Call Open Interest graph https://www.quandl.com/data/CBOE/VIX_PC-CBOE-VIX-Option-Volume-and-Put-Call-Ratios [5] The Relationships between Sentiment, Returns and Volatility – Yaw Huei Wang, Aneel Keswani, Stephen J Taylor. http://www.fin.ntu.edu.tw/~yhwang/YHWang_070801.files/IJF_revised.pdf
  • 26. [6] Clive Granger Personal Account – Scholarpedia http://www.scholarpedia.org/article/Granger_causality [7] John C. Hull, Options, Futures, & Other Derivatives 9th edition (Global), Prentice Hall, 2014. Appendix 1) Overlay plot (VIX vs Sentiment): # Data from csv file is copied as a matrix but for plotting we need vectors # As the file has 72 value rows and 4 columns so the matrix created is 4 by 72 matrixCSV <- read.csv("U:/My Documents/FYP/Overlay.csv") # matrixCSV[ , 1] gets all the values in first column of the matrix # as.vector() function converts these values into a vector dateCSV <- as.vector(matrixCSV[ , 1]) # But these values are strings so we need to convert them to date before plotting # as.Date(vector, dateFormat) converts every value inside vector to date dateVector <- as.Date(dateCSV, "%d/%m/%Y") # Similarly converting Sentiment(index) and VIX values to vector from the matrix indexVector <- as.vector(matrixCSV[ , 2]) vixVector <- as.vector(matrixCSV[ , 3]) # min() function gets the minimum value in a vector # max() function gets the maximum value in a vector # c() function is used to create a vector # minVector contains all the minimum values from index and vix vectors # maxVector contains all the maximum values from index and vix vectors minVector <- c(min(indexVector), min(vixVector)) maxVector <- c(max(indexVector), max(vixVector)) # yAxisMinValue is 5 less than the minimum value in the minVector # yAxisMaxValue is 5 more than the maximum value in the maxVector # I used this aesthetic command to make the graph easier to read yAxisMinValue <- (min(minVector) - 5) yAxisMaxValue <- (max(maxVector) + 5) # plot() function plots the chart # so using c() function to create a vector from yAxisMinValue and yAxisMaxValue # this plot() function will create just one line(index) on the plot plot(dateVector, indexVector, type="l", col="red", xlab="Months", ylab="Index & VIX",
  • 27. ylim=c(yAxisMinValue, yAxisMaxValue)) # lines() function will add a line chart to the existing plot lines(dateVector,vixVector,col="blue") # grid() fuction draws a background dotted grid on the plot # This is another aesthetic command I included grid(20,20) # legend() function creates a legend over the plot # inset = inset distance from the margins as a fraction of the plot region # cex = character expansion factor relative to current par("cex") # title = legend heading string # c("Index","VIX") = lables for the lines (accepts vector) # horiz = if TRUE, set the legend horizontally # lty, lwd = the line types and widths for lines appearing in the legend # col = color for the lines (accepts vector in same sequence as the labels) # bg = background color for the legend box (using 90% grey) legend("topright", inset=.05, cex = 1, title="Legend", c("Index","VIX"), horiz=TRUE, lty=c(1,1), lwd=c(2,2), col=c("red","blue"), bg="grey90") 2) Time Series library(tseries) library(fGarch) library(lmtest) #Setup for Analysis file = read.csv("TS.csv", header = T, sep = ",") attach(file) date = file[,c("Date")]
  • 28. index = file[,c("Index")] vix = file[,c("VIX")] #Make Time Series TS1 = as.ts(index) par(mfrow=c(2,1)) acf = acf(TS1) pacf = pacf(TS1) plot(index) plot(TS1, xlab="Time", ylab="Index") TS2 = as.ts(vix) par(mfrow=c(2,1)) acf = acf(TS2) pacf = pacf(TS2) plot(vix) plot(TS1, xlab="Time", ylab="Vix") #Regression Analysis lm1 = lm(index ~ (1 + vix)) summary(lm1) AIC(lm1) BIC(lm1) sqrt(mean(lm1$residuals^2)) par(mfrow=c(2,2)) plot(lm1$residuals) boxplot(lm1$residuals)
  • 29. hist(lm1$residuals) qqnorm(lm1$residuals) qqline(lm1$residuals) plot(lm1) lm2 = lm(vix ~ (1 + index)) summary(lm2) AIC(lm2) BIC(lm2) sqrt(mean(lm2$residuals^2)) par(mfrow=c(2,2)) plot(lm2$residuals) boxplot(lm2$residuals) hist(lm2$residuals) qqnorm(lm2$residuals) qqline(lm2$residuals) plot(lm2) #Redo AIC, BIC for different lags #Difference the data TS1a = diff(TS1) Acf1 = acf(TS1a) Pacf1 = pacf(TS1a) plot(diff(TS1), main="", ylab=expression(TS[t] - TS[t-1])) #Do same for TS2 Box.test(diff(TS1), lag=20, type="Ljung-Box") adf.test(diff(TS1), alternative = "stationary") Box.test(diff(TS2), lag=20, type="Ljung-Box") adf.test(diff(TS2), alternative = "stationary")
  • 30. 3) Granger Results for Full period:
  • 31. Granger Results Pre and Post September 2008 for lag 1:
  • 32.
  • 33. Granger Results Pre and Post September 2008 for lag 2: