Modelling Conditional Volatility of NIFTY 50

The present study demonstrates modelling of conditional volatility of NIFTY 50 using GARCH (1,1) model. The daily returns data of the Indian stock market index NIFTY 50 is used for the period ranging from April 2010- March 2020. The data is analysed using R software. The study estimates and interprets the results arrived in the summary output of the R environment and demonstrates how to forecast the volatility of the returns based on the estimated parameters. Extracting the time series of conditional volatilities is also demonstrated in the study.


Introduction
" No matter how calm you are, no matter how long term an investor you are, no matter what your horizons, when the market is jumping around, you feel uncertainty in your gut and it's hard to resist that. " -Peter Bernstein.
Stock market volatility has always been a topic of interest and concern amongst the investors and traders. This is because although volatility presents a major risk to investors and traders, if correctly measured and managed this volatility itself helps the investors to generate returns. In actual fact the investors who are able to make accurate forecasts of volatility can see opportunity when the markets swing, smack or surge. If the ECG chart of any human being is a straight line without any uctuations the person is declared dead, similarly the stock market without volatility cannot be considered to be alive. The estimation of volatility has ample applications in the world of nance and economics. The signi cance of volatility is further increased with the advent of sophisticated tools in risk management and the enhancement of option trading. For instance, volatility measures are used for estimating the Value at Risk (VAR) for banks and portfolio managers. Further for valuing the options using the most popular Black-Scholes model requires volatility estimates as one of the important inputs. Thus academicians, researchers and traders all around the world are working to devise a model to best predict the volatility. The review of existing literature has demonstrated that the Generalised Autoregressive Conditional Heteroskedasticity (GARCH) model and its extensions have been superior in forecasting the stock market volatility. This research paper aims to estimate time-varying volatility of the Index of the National Stock exchange of Indian -NIFTY by applying the GARCH model using R analytics tools. Visual con rmation of volatility is demonstrated by constructing plots in R. The periods of high volatility are identi ed by observing the spikes in the plot and the time-varying con dence intervals for the NIFTY daily returns are produced using the conditional volatilities (CV) attained from the GARCH model. Graphic plots in the R environment are used to construct these con dence intervals. While interpreting the statistical output and to measure the adequacy of the GARCH model the Goodness-of-t statistics is also used.

Review Of Literature
Ahmed Elsheikh M. Ahmed &Suliman Zakaria Suliman (2011) estimated the volatility in the daily returns of the stock index of Sudan using the GARCH model. The daily closing prices of Khartoum Stock Exchange (KSE) index for the period from 2nd January 2006 to 30th November 2010 was used for the study. The researchers have applied symmetric and asymmetric models to test the volatility clustering and leverage effect of the index. The positive correlation between the volatility and the expected stock returns is supported by the existence of risk premium for the returns. The results of the paper in general explain the high volatility of the index return in the Sudanese stock market during the sample period. Emil Collin (2019) forecasted volatility using ARCH (1), GARCH (1,1), EGARCH (1,1) and Implied Volatility measures. The volatility is estimated using a sample dataset of returns form ist jan 2010 to 31st Dec 2018 and the out -of -sample forecasts during 1st Jan 2019 to 31st March 2019. These forecasts are evaluated against daily implied volatility for this period. The study concludes that, in the evaluation against daily realized volatility, the EGARCH (1,1) generates the best forecasts, which is consistent with literature. The study indicates that the naïve ARCH (1) outperforms the GARCH(1,1). In the evaluation against implied volatilities, the ARCH (1) speci cation performed the best. The observed differences in the losses of the different ARCH-family models were very small. Francisco Joao & Matos Costa (2017) has done a comparative study of different volatility forecasting models to identify the best suitable model. This research was done on the US market using Nasdaq-100 quotations from 1986-2016. The performance of the GARCH model was assessed in a series of Mincer-Zarnowitz regressions and the best model was detected using the SPA test. The researcher found that the conditional volatility forecasted using all the GARCH models except iGARCH produced similar results. The research also concludes that the GJR model does not provide good estimates of volatility.Girish K. Jhab, Ranjit K. Paula and Bishal Gurunga (2015) have studied the application of GARCH, ARIMA and EGARCH models for modelling and forecasting price volatility of the Indices of domestic and international oil prices and the international cotton price index. The stationarity of the series was tested using Augmented Dickey-Fuller and Philops Peron test and the ARCH effect was detected using the Lagrange multiplier. Root mean square error and relative mean absolute prediction error was used to compare the results of the models. The study concluded that the EGARCH model was superior to ARIMA and GARCH models in forecasting the prices of commodities as it captures asymmetric volatility patterns. Tarno, Sudarto and Hasbi Yasin (2016) constructed a model for forecasting volatility of portfolio return using GARCH. The mean stock returns were constructed using Autoregressive Integrated Moving Average (AIRMA) and based on the squares of the residuals of the mean the variance was calculated using the GARCH model. This model was used for forecasting the volatility of returns of the stocks in the portfolio. The authors concluded that the GARCH model works well in forecasting the volatility of portfolio returns. Omid Sabbaghi (2019) used R analytics software for estimating volatility using the GARCH model. In this study the GARCH framework was applied in estimating conditional volatility for the daily closing level of S&P market index adjusted for dividends. Data ranging from January 1950 to December 2019 was used for the study. The rich graphical capabilities of R software are demonstrated in this study to forecast the volatility based on the estimated parameters. This study highlights the importance of GARCH in constructing dynamic con dence intervals and in assessing the adequacy of a tted GARCH model. R. D. Vasudevan & Dr. S. C. Vetrivel (2016) used the GARCH models to forecast the volatility of the BSE-Sensex returns for the period from 1st July 1997 to 31st December 2015. Symmetric GARCH models, asymmetric GARCH models, Exponential GARCH model and Threshold GARCH models were used to forecast the volatility. On the basis of sample forecast and a majority of evaluation measures the researchers conclude that asymmetric GARCH models perform better in forecasting conditional variance as compared to the symmetric GARCH models. This con rms the presence of leverage effect.Christopher N. Ekong & Kenneth U. Onye (2017) applied the GARCH models to estimate and predict the volatility of the daily stock returns of Nigeria. This study estimates the volatility of the stock returns using six sets of symmetric and asymmetric GARCH models with the purpose of selecting the model with best predictive power. The authors observed the presence of leverage effect and relying on root mean square error and Theils inequality Coe cient concluded that GARCH and EGARCH possess the best forecasting ability.

Research Framework
The stylized facts in the nance domain have established that the return on a stock or a portfolio can be modelled as the sum of the mean value of returns based on historical information and the product of the standard deviation of return and the error term for the present period. The mean and the variance of the returns are derived from the historical information. Before the introduction of ARCH models there were no methods to forecast the mean and variance based on the past information. The only tool used was the rolling standard deviation calculated using the xed number of the most recent information. The rst ARCH model assumed that the variance of tomorrows returns is the weighted average of the squared residuals from last twenty-two days, each day being assigned an equal weight. However, it is not fair to assume the equal weights seems to be irrational considering the fact that the recent are likely to have higher impact on the returns and hence should have higher weights. Engle (1982) proposed the ARCH model which allowed the data to estimate the best weights in forecasting the variance. Bollerslev (1986) generalised this model and by using the process of solving parametric equations to determine the weights. The weights derived in this process are based on the squared residuals and are declining but never become zero. According to this model the variance in the next period is the weighted average of the long-term average variance, the variance predicted for this period and the most recent squared variance which is a proxy for the new information. According to the GARCH (1,1) model the conditional variance for the next day 't' (ht) depends on the previous lags i.e., the conditional return variance is a serially correlated time-series process. ht (tomorrows variance) is the weighted average of today's variance i.e., h t-1 and todays squared returns r t-1 . The GARCH (1,1) model for predicting the volatility can hence be written as follows.
In this equation represents the long-run average variance and is given by 1− − , and thus + < 1 as well as > 0, > 0, and > 0 (Engle 2001). + < 1 ensures that the volatility is mean-reverting. The GARCH (1,1) model was originally constructed to forecast for just one period. Based on the one period forecast a two-period forecast can be made and by further repeating this step a long-term horizon forecast constructed. The maximum likelihood function is used to adjust the values of , & to give the best t. Econometricians have used programming software like SAS or Matlab to derive this value.
Lung Box test is generally used to detect the model failures. The variance so obtained is the unconditional variance.

Analysis And Discussion
The GARCH model is used to describe the conditional volatility of the returns of a nancial asset over a time period. The review of literature demonstrate that GARCH (1,1) model is superior to and outperforms the other GARCH models. Also, this is the most commonly used model for practical applications.
The objective of this study is to adopt the GARCH (1,1) model to understand the time varying volatility of NIFTY 50 the Index of the National Stock Exchange (India). The paper uses R analytical software for computational purposes.
The objectives of the study can be enumerated as follows: i. To estimate the GARCH model for forecasting conditional volatility using R analytics.
ii. To identify the signi cant and persistent GARCH effects on returns throughout time.
iii. To extract the time-series of the conditional time-series volatilities or conditional standard deviations iv. Constructing plots for providing visual analytics of time-varying volatility.
v. To construct time-varying con dence intervals for the NIFTY 50 daily returns using the conditional volatilities obtained by the GARCH model.
The data required for this model is extracted from Yahoo Finance. The closing price (p) of the NIFTY 50 after adjusting for dividends and split is taken for the period from 1st April 2010 to 1st April 2020. The daily return for the NIFTY on day (t) is the continuously compounded return denoted by r t and is calculated as follows: The package (fGarch) available in the R environment is used for the analysis. The data of NIFTY 50 returns is linked to the R environment using "read.delim" command. Once the data was available, a timeseries plot of the daily squared returns from April 2010-March 2020 was constructed as shown in Fig. 1. Figure 1 presents evidence of clustering in return volatility over time. That is, large changes in the daily squared returns are followed by large changes, and small changes in the daily squared returns are followed by small changes. Further the sample autocorrelation function for NIFTY 50 daily squared returns was plotted for the same time period. The plot so obtained visually con rms the presence of autocorrelation.
From the above plot it is evident that the autocorrelation for the 0th lag lie much above the dotted line whereas for the 40th lag the autocorrelation lies within the dotted line. This shows that the statistically signi cant autocorrelations suggest that the Nifty 50 return volatility is serially correlated throughout time. According to Bollerslev and Woolridge (1992) the GARCH (1,1) results can be estimated by Gussian Maximum likelihood. Using garch t command in R we get the results.
ℎ = 2.986 − 07 + 0.6198 2 t−1 + 0.9223ℎ −1 Equation (3) In the above Equation (3) we can observe that the process is mean-reverting since the three coe cients is less than 1. According to Engle and Patton (2001) mean reversion in volatility conveys that the returns data has a normal level of volatility and the volatility process will resume to the same. The intercepts , , and , are determined and these coe cient estimates are used in the GARCH (1,1) model to construct volatility forecasts of tomorrows volatility √ℎ +1, using the Equation (4).
ℎ +1 = 2.986 − 07 + 0.6198 2 t + 0.9223ht Equation (4) From the R output we also get the standard errors under the Std. Error column, t-values under the t value column, and corresponding p-values under the Pr (>|t|) column. The t-values are the ratio of the estimated coe cients and standard errors, and convey the degree of statistical signi cance for the coe cient estimates. Based on the summary output, we nd that all of the coe cient estimates are highly signi cant at the one percent level.
The above model output also examines the standardized residuals for the serial corelation or autocorrelation. If autocorrelation or serial corelation exists between the standardized residuals then the GARCH model has failed to capture the dynamics of the volatility of the returns. The LjungBox Test is used for the squared standardized residuals. The Ljung-Box test of interest has a p-value near 0.97 when testing correlation up through the 20th lag. Hence, the estimated GARCH model captures volatility in the returns and there are no more GARCH effects in the residuals. The goodness of t metrics is also obtained from the summary output. The log-likelihood value of 10057.24 for our estimated GARCH (1,1) model. The higher log-likelihood are preferred in goodness-of-t metrics. The normalized log-likelihood value is 4.094 which is obtained by dividing the log likelihood by the number of observations.
The R summary output provides very small values of the Akaike information criterion (AIC -8.187492), the Bayesian information criterion (BIC -8.180399) the Schwarz information criterion (SIC-8.187495) and the Hannan-Quinn information criterion value (HQIC -8.184914). However, this Information criterion is more relevant for the higher order GARCH models like GARCH (2,2) and above. The following gure plots the time-series plot of the conditional volatility of NIFTY 50 while adopting the GARCH (1,1) model with normal innovations for the period of study.
Using the conditional volatilities in the above plot we construct the dynamic con dence interval for the daily returns of NIFTY 50. A 95% con dence interval for the returns is given by the following equation in the GARCH (1,1) model. r t ± 2√h Equation (5) The conditional mean dynamics in the GARCH (1,1) model as computed above is negligible. Hence the forecasted return for the day t is 0. So the 95% con dence interval for NIFTY 50 returns can be written as:

0± 2√h
Equation (6) The 95% con dence interval can be plotted by using the conditional volatilities over the period of time.
Hence by plotting the graph of the conditional volatilities superimposed on the daily realized returns as below: From the above gure it is evident that almost 95% of the return lie within the upper and lower limits of the con dence intervals

Concluding Remarks
This study demonstrates the process of using GARCH model for modelling volatility using the R Analytical software. The daily returns data of the Indian stock market index NIFTY 50 is used for the period ranging from April 2010-March 2020. The study estimates and interprets the results arrived in the summary output of the R environment and demonstrates how to forecast the volatility of the returns based on the estimated parameters. Extracting the time series of conditional volatilities is also demonstrated in the study.