FORECASTING STOCK MARKET RETURNS VOLATILITY

It has been widely known that the stock market is always volatile and full of risk. How to better capture the volatility and decrease risk accordingly has become a main concern for both investors and researchers. In this thesis, the stochastic volatility model with offset mixture of normal distribution is fitted for financial dataset NASDAQ:LLTC daily stock market returns volatility and one-step-ahead prediction is made based on the AR(1) SV model. Bayesian analysis is fully applied for model fitting and parameter estimation. The Markov Chain Monte Carlo algorithm, using the Metropolis Hasting method, the Forward Filtering Backward Sampling and the Gibbs Sampler is well developed to fit the real data. A small improvement incorporated is the resampling of weights in the discrete normal mixture distribution which is used to approximate a non-normal distribution. Estimated parameters when having weights sampled are compared with the results when weights are fixed. The predictive distribution for one-step-ahead log volatility 1 T z  and log transformed stock return 1 T y  is given in the graphs. Mean and 95% posterior interval are also provided for both 1 T z  and 1 T y  . FFBS algorithm is first applied to a simulated dataset with normal mixture structure in Dynamic Linear Models. Visual plots with posterior mean and 95% posterior interval are given. Autoregressive model with application of Monte Carlo approximation is also included to model LLTC stock returns.


LIST OF TABLES
A company can be divided into a number of shares and each share of stock is entitled to a proportional share of profit or loss made by the company. It is a representative of the claim as part of the corporation's assets and earnings. There are many options for people who want to make investments. The buying and selling of stock is always the most popular option for public trading. When investors buy stocks, they become shareholders, which means that they own a part of the company. If the company's profits go up, they will share those increased profits with the company. Similarly, if the company's profits go down, the stock price goes down accordingly and the loss in profits will be shared with investors too. The logic to make money is that investors buy the stock, hold it for some time, and then sell it at a higher price than the purchasing price. Suppose they sold their stock at a price lower than the price they have paid for it, they would lose money.
It is widely known that stock price is very changeable, even on a daily basis.
The reason for that is because of supply and demand. In stock markets, a large volume of stocks are traded every day. If there are more people who buy a stock than the people who sell it, out of the expectation that the price will go up in the future, then the price will rise. Conversely if more people want to sell it than to buy it, the stock price will fall dramatically. However, investors' expectation for the market is in a 2 permanent state of fluctuation due to all kinds of information obtained over time that strongly affect their decision-making. That's also why the stock trading has been processed so often over a short period of time.
Most stocks are traded on stock exchanges, which are the places where buyers and sellers meet and make a deal on a price. Returns Volatility" based on the following introduction and overview.

Stock Market Returns
In a stock market, four stock prices will usually be provided in a day which include open price, close price, high price and low price. Open price is the price at which a specified stock first trades upon the opening of an exchange on a given trading day. Close price is the final price at which a stock is traded. Close price is important because it represents the most up-to-date valuation of a security before the next trading day. The closing price of one day can be compared to the previous close price in order to measure market sentiment.
In the thesis, stock daily return i1s calculated by taking the natural logarithm of the . Hence, loosely speaking, log return means the ratio of money gained or lost on a stock. Positive returns reflect a rising market (bull market) where people make money, while negative returns are usually referred as a "bear market" where people lose money.

4
Volatility is a statistical measure of the dispersion or variability of returns for a given security or market index. It refers to how uncertain one is about the size of change in a security's value over time. Volatility, which is always positive, can either be measured by variance or standard deviation (the square root of variance), between returns over a specified period of time. A high volatility means that the returns can potentially take values in a large range of values, so the uncertainty about the stock returns is also high which represents high risk. Hence high volatility implies that the returns can change dramatically in values over a short period of time, since large amounts of stocks are traded within any minute. Conversely, a low volatility means the returns don't fluctuate dramatically over a short time period. In general, the higher the volatility, the riskier the stock market is. And the more risk investors take, the greater the potential for higher gain or loss.

Why Stock Market Returns?
Stock price is the price of a single share of many saleable stocks for a company or other financial institution. It essentially, is a function of the amount of dividends that can be expected in the future. Therefore, the current price at a given time point t reflects the whole investment community's expectation and confidence towards a stock in the future. If the underlying expectation for the market stays the same, then stock price will not make any change. But nobody is really sure about the change of stock price. Different expectations for future stock price lead to frequent buying and selling of stocks, which in reverse, causes the constant change of price over time. As we can observe directly from the stock markets, even in a single day, four different prices are given to reflect the volatility of stock prices. Basically stock price depends 5 on demands and supply driven by buyers and sellers. The interest of the buyers and sellers for stocks depends on market sentiment. Market sentiment relies on the domestic and international economy and other factors, which are very complex and unpredictable. So it is extremely hard to predict stock prices directly, if not impossible. Obtaining stock returns, however, makes it more convenient to analyze changes in stock prices by making a transformation on them. Changes in stock returns can easily be used to make inference on stock prices. After a transformation, we don't have to deal with the high correlations among stock prices since low correlations exist among stock returns and volatility in returns is also lower than in stock prices.
For LLTC stock returns (see Figure 7), the means of the series seem constant over the long run and only the variances keep changing. Some big spikes show up every now and then. What I am aiming to do in this thesis is to fit a model that can best capture the volatility and make a short-term prediction on future volatility with the assumption that the possible values of the future stock returns is within the range of what we have observed in the data.

Time Series
A univariate time series is a chronological sequence of observations about a particular variable, which is usually denoted as t y ( t =…-2,-1,0,1,2…), e.g., exchange rate, inflation rate, product sales, unemployment etc. Usually time t is taken at equally spaced intervals, and the unit of time may be anything from seconds to years. Time series analysis can be useful to detect the change over time for a security or other time series variables. Five common features in economic and business time series include trends, seasonality, aberrant observation, conditional heteroskedasticity and non-linearity, see Franses' book "Time series models for business and economic forecasting" (2000) at Chapter Two for details. Besides that, a comparison can be made on multiple time series over the same period of time. As for financial time series, for example, co-integration was raised to specifically investigate the comovement/common trend between two or more financial time series. Financial time series analysis (FTSA), is concerned with the theory and practice of asset valuation over time. What makes financial time series analysis different is that it is highly volatile and empirical such as stock market indices, market shares. Furthermore, it relies more on statistical theory and methods for the development of robust models since there is no universal model that will fit every financial time series.
Stock returns series is a typical financial time series with high volatility. Due to the sensitivity of stock prices to economic events or interest rates, it is important to build a volatility model with high accuracy to better capture the change in stock returns over time. Bayesian analysis can be applied to accomplish the goal here.

Bayesian Analysis
In a precise mathematical sense, it has been shown that probabilities can numerically represent a set of rational beliefs, that is we claim that probabilities are a way to numerically express rational beliefs. Bayesian statistics is thus founded on the fundamental premise that all uncertainties about quantities should be represented and measured by probabilities. We use statistical induction to learn about the general characteristics of a population from a subset of the population.

Notations and Definitions
Stochastic Process: A stochastic process is a family of random variables defined on a given probability space, indexed by the time variable t , which is used to represent the evolution of some random values or system over time. It is also known as a random process. A time series process is a stochastic process.
Stationarity: A strict stationary process is a stochastic process whose joint where y  is the sample mean and T is the sample size. Existence of autocorrelation implies the return is predictable, indicating market inefficiency.
White Noise: White noise is a simple type of stochastic process whose terms are identically independently distributed (iid) with zero mean. A Gaussian white noise is a stochastic process with zero mean, finite variance and zero autocorrelation. 8

Bayes' Rule
Numerical description of population characteristics are typically expressed in terms of a set of parameters,  s, and a numerical description of the sample make up a data set y . Before a data set is obtained, the numerical values of , y  are uncertain.
After a dataset is obtained, the information it contains can be used to decrease our uncertainty about the population characteristics, which is the goal of Bayesian inference. Bayes' rule (1.1) provides us with a rational method to update the uncertainty as new information about y is collected.
For each numerical parameter   (  is the set of possible parameter values for  ), our prior distribution () p  describes our belief that  represents the true population characteristics. For each   and yY  , our sampling model () py describes our belief that y would be the outcome of our study if we know that  is true. Once we obtain the data set y , the last step is to update our belief about  .
For each  , our posterior distribution () py  describes our belief that  is the true value, after observing data set y . The posterior distribution is obtained from the prior distribution and the sampling model via Bayes' rule: It is important to note that Bayes' rule does not tell us what our beliefs should be, it tells us how they should change after observing new information. Even if a particular prior distribution does not exactly reflect our prior information, the corresponding posterior distribution can still be a useful means of providing stable 9 inference and estimation for both large and small sample sizes.

Metropolis-Hasting Algorithm
In a generic situation where we have a sampling model ~( ) Y p y  and the prior distribution ()  ( 1) s  by sampling from the full conditional distribution as follows: This algorithm generates a dependent sequence of vectors The iterations up to and including B are called the "burn-in" period, in which the Markov Chain created after burn in has higher posterior probability. Another reason for that is to weaken the influence of the initial values, especially when we don't have a good idea about the prior belief.

Application of Stochastic Volatility Models
Many models exist in literature and in practice for the uncertainty of unrealized When it comes to volatility forecasting, there are many practical applications.
Since volatility is the essential risk aspect of the market, a large part of financial risk management is to capture volatility in tractable statistical models and to measure and manage the potential future losses. Asset allocation is the way you allocate your investment in bills, stocks, bonds etc. To balance the risk and reward for individuals, volatility forecasting is also a problem that can't be ignored. Besides that, the most challenging application of volatility forecasting is to use it for developing a volatility trading strategy.
13 CHAPTER 2 REVIEW OF LITERATURE

Review of Models for Volatility
The rapid growth in the financial market and the continual development of more When p=q=1, the GARCH (1,1) model is expressed as 2 The variance in this case can be interpreted as a weighted average of all previous squared returns with the weights decreasing exponentially over time.
The stochastic volatility models (proposed by Taylor, 1986) where t h is the log-volatility following a stationary autoregressive process with order 1, the parameter  or exp( / 2)  is a constant factor and can be thought of as modal instantaneous volatility. This is not a linear model, and transformation is needed to proceed with the analysis.

ARCH/GARCH Models and SV Models Comparison
Modeling volatility plays a crucial role in risk management in banks or other financial institutions since volatility is considered to be a measure of risk. It is now widely agreed that financial asset returns volatilities are time-varying, with persistent dynamics. (Andersen et al 2007). A comparison of the popular GARCH models and less known SV(or ARSV) models, both of which is capable of modeling time varying volatility and capturing the volatility clustering, will be discussed in this section.
SV models is usually considered a successful alternative of ARCH models in modeling financial return series. The distinctive advantage of SV models is that they incorporate leverage effect (volatility tends to increase when prices go down) and also capture the main empirical properties often observed in daily return series in a more appropriate way. The reason that SV models are less popular in practice is mainly because of the complexity and difficulty of parameter estimation. SV models are nonlinear and non-Gaussian and the computations are more demanding than for GARCH models. For instance, there are two error/noise terms: observation error and state error in SV models due to the assumption of latent process, but there is only one error process in GARCH models. The problem of SV models is obvious from the likelihood function where we have to integrate over the latent factor a T dimensional integral.
This can not be solved analytically, so the numerical simulation is required.
However, GARCH-type models have a poor forecasting ability. Besides that, there are other problems with GARCH, such as inconsistent parameter estimate results for different time scales, inefficiency to capturing outliers and large moves and failure to distinguish the association between large moves and earnings announcements and other news. The theoretical examination of GARCH and SV comparison provided by Carnero et al. (2001) shows that SV models can better explain the excess kurtosis, low first order autocorrelation and high persistence of volatility. They also show that SV model is less dependent on the choice of returns distribution. In the paper by Mapa et al (2010), they conclude that SV models capture more aspect of volatility than GARCH model due to its sources of variability and produce lower forecast errors by comparing basic GARCH volatility forecasts with SV models which are computed through Kalman Filter or MCMC method. Hence, if we ignore the calculation difficulties for SV models, SV models are adequate substitute to GARCH models.

SV Models Literature Summary
In the process of writing this thesis, I referred to many books and papers. Sampling Backward Filtering and Gibbs sampling will be applied for model fitting.
The mean posterior distribution of the state parameter t  and its 95% posterior bands will be displayed in Figure 1 and Figure 3.

Posterior simulation with MCMC algorithm
Assume the model defined by   , , , After calculating all the quantities about parameter t  ( 1: tT  ) with the above equations, we can start to simulate from its posterior distribution. That is, to sample t

Fitted AR(1) with Normal Mixture DLMs for Simulated Data
In Figure 1 and Figure 3, the points simulated from (0, ) Nv are shown with circles and the points simulated from 2 (0, ) N k v with solid circles to distinguish. In addition, the posterior mean and 95% posterior interval for the parameters are given in the 28 The parameter  defines the baseline log-volatility; the AR(1) parameter  defines persistence in deviations in volatility from the baseline, and the innovation variance  "drives" the levels of activity in the volatility process. Typically is close to one, and in any case the AR(1) process is assumed stationary, so that the marginal distribution for the missing initial value is Since Extending the analysis to include inference on the sequence of  is also called One-step-ahead prediction.
95% Posterior Interval: In Bayesian inference, the 95% posterior interval for a parameter, is estimated by the samples drawn from its conditional posterior distribution, which means that the probability that the posterior interval will contain the true value is 95%. This is a Bayesian analogue of confidence interval in frequentist statistics.

One-step-ahead Prediction Results
The one-step-ahead log transformed volatility for stock returns is defined and 95% posterior interval (purple lines).

48
The posterior mean of one-step-ahead prediction for log transformed stock market return 1 T y  is -3.4151(compared with the previous observation 3.451589 T y  ) and the 95% posterior interval is (-4.5613,-2.4645), as shown above in the plot.

Parameter Estimation Summary
MCMC analysis is fully applied to our data when building the SV model. Two specified models are given above with slight differences in parameter estimation and 49 the estimation tends to be more accurate when having weights sampled for the normal mixture approximation structure. The  For the real data, we first fit a simple autoregressive model with order eight. Using this AR model, we can make a prediction on the future stock returns given the returns for the past eight business days. In stochastic volatility models, stock returns are assumed to be normally distributed with mean zero and time-varying variance or volatility.
What we are aiming to do is to model this volatility and volatility is assumed to have a non-linear form. In this thesis, the log transformation with offset term is used to linearize the model and avoid meaningless definitions. Besides, normal mixture approximation to log chi-square distribution is fully applied with our data.
Model fitting and forecasting are realized with the application of a well developed Markov Chain Monte Carlo algorithm. In the MCMC context, Gibbs Sampling is applied to SV models to sample multiple unknown parameters from their posterior distribution and it also allows us to sample the log volatilities 0:T z all at once for each iteration i . The goal of the MCMC method is to sample quantities from their joint posterior distribution. To simplify this process, Bayes' theorem is fully applied 51 which makes the sequential conditional posterior sampling plausible and effective.
One step ahead prediction of log volatility and log transformed stock market returns are both talked about and displayed in the graphs. The mean and 95% posterior interval are also given as part of the prediction result. Two model fitting results are given in the context and the differences arise from whether the weights for the normal mixture structure are sampled or not. We make a prediction using the model estimated from MCMC procedure with sampled weights.