Estimating GARCH Modeling Using Metropolis-Hastings Method in R

This paper mainly talks about a popular approach of volatility of a GARCH-type model in R, while the disturbances are independent and have identical Student-t distribution. It uses the Metropolis-Hastings method to perform the computations and gives the programs in details in R.


Introduction
The R-project is an open statistics programming software.Modelling and forecasting volatility or, in other word, the covariance structure of asset returns, is important.A central property of economic time series, being common to many financial time series, is that their volatility varies over time.Describing the volatility of an asset is a key issue in financial economics.Returns were modelled as independent and identically distributed over time.The most popular class of models for time-varying volatility is represented by GARCH type models [1].
GARCH models are commonly used for describing, estimating and predicting the dynamics of financial returns.Recent surveys of the existing GARCH models literature can be found in Davidson [2] and Rombouts et al. [3].In contrast to Engle's [4] ARCH model, a double autoregressive (DAR) model, which is a special case of the ARMA-ARCH models in Weiss [5] and an example of weak ARMA models in Francq and Zakoïan [6] [7], is also increasingly concerned about researchers.Under the assumption of the disturbance following a normal distribution, Ling [8] considered the structure and the maximum likelihood es- timation.In addition, stochastic volatility (SV) models have enjoyed great popularity in analyzing financial data in the last couple of decades [9].
In this paper, an R package named bayesGARCH [10] was mentioned to contrast with our procedure.This package makes use of the priors based on the work of Nakatsuma [11], consists of Metropolis-Hastings (MH) algorithm [12] a proper algorithm to sample the posterior distribution.
The remainder of this paper is organized as follows.In Section 2 we describe the GARCH (1, 1)-t process and introduce how to estimate the parameters by using the Metropolis-Hastings method.Through an example, we contrast our model with the bayesGARCH package in Section 3. Section 4 provides the R procedure to execute our model in details.An empirical example is reported in Section 5, and Section 6 concludes this paper.

Univariate GARCH-t Model
Let t Y denote a asset return.The general structure of an asset return series modeled by a GARCH-type models can be written as Audronė Virbickaitė et al.
In general  is a Normal variable.Without loss information, we set 0 t µ = .
To capture the fat tail so prominent a Student-t distribution is used for conditional density.The model is, GARCH-t, is ( ) where ψ is a Student-t distribution with mean 0 and ψ is the degree of freedom parameter.t h is the conditional variance given + < for the covariance stationarity.Then the posterior density func- tion could be: It is indicated that the  obey the Student-t distribution in (1).The following, we will show how we get (2), the density distribution of  is ( )

p y p h y h h h y h y h
Because, ( ) Given a dataset ( ) , , , , , , and the posterior density is [14], the priors are independent and identically distributed (IID) as N (0, 100) with the following restrictions 0 0 to impose identification and 2 ψ > .Since the variance is non-negative, the pos- itive constraints on coefficients are reasonable.The restriction on the degrees of freedom parameter ψ ensures the conditional variance to be finite and the re- strictions on the GARCH parameters 0 α , 1 α and β guarantee its positivity.
One of the most popular MCMC algorithm used in estimating GARCH model parameters, is the Metropolis-Hastings (MH) method.We emphasize the fact that only positivity constraints are implemented in the MH algorithm; no stationarity conditions are imposed in the simulation procedure.We employ a MH sampler.Given the current value Γ of the chain, the proposal ′ Γ is sampled from ( ) ( ) ( ) , with probability ,100 with probability 1 where V is the inverse Hessian matrix of ( ) ( ) . The accepted probability equal to , and 0.9 p = empirically.After the test sample collecting the new , the predictive density is ( )

The Priors and bayesGARCH Package
In this section, an R package named bayesGARCH was applied to deal with the GRACH model, then we'll describe the difference of the priors between our model and the package.The package bayesGARCH provides functions for the Bayesian estimation of the parsimonious and effective GARCH (1, 1) model with Student-t innovations.The priors in the bayesGARCH package distributions on 0 α is a bivariate truncated Normal distribution; 1 α is a univariate truncated Normal distribution; β is a translated Exponential distribution.The estima- tion procedure is fully automatic and thus avoids the tedious task of tuning an MCMC sampling algorithm.It is obviously there are some differences set of priors between our model and the package, so we couldn't cite the package directly.Next, we will show the estimation results to demonstration that the different priors could inference the estimation result.

Example
We set the initial value of Γ is (1, 0.2, 0.4, 5).800 simulation values are obtained by simulation in R.

, ) y i rt psi + = [ ] ( [ ]) [ ] y i sqrt h i y i + = * } +
Then we use bayesGARCH package to estimate Γ , we remain the number of MCMC chains and the length of each MCMC chain to be the default value.
( ) We receive the estimation of Γ is (1.2630, 0.2367, 0.4829, 11.3285).Obviously, there's a big difference estimation of ψ and the estimation of other parameters is equally unsatisfactory.

The Priors
The difference sets of the priors see Table 1.The GARCH (1, 1) model with Student-t innovations in package bayesGARCH is written in Geweke [15].

Conducting GARCH-t in R
The estimate results in our model In this section, we design and developed the R program.We will show the whole procedure of how we conduct GARCH-t in R. Our results is (1.0103, 0.1838, 0.4694, 9.2587) is closer to the true value, and we can see the procedure in Figure 1.

The R program
We set the all necessary initial values to be zero, the number of MCMC chain to be 10,000, meanwhile Γ is a 10,000 times 4 matrix.We leave out the R programs for these simple settings, giving only the necessary parts of the program. ( R oldhh j gamma i gamma i y j gamma i oldhh j The above procedure could give the estimate value of 0 α , and the estimation of the other rest of the parameters is very like it, we won't go back to that.

Empirical Application
This section will use Metropolis-Hastings method by the actual financial data to fit the model.The using data is the DAX(Ibis) index of German in European stock market, a total of 1860 data.In order to make the data smooth, we need to do some processing to the original data.Let t x denote the logarithm and t y denote the order difference of t x , i.e.

Conclusion
In this article, the R program to estimate GARCH-t model has been developed.[2016] XJ No. 09.

Figure 2 .
Figure 2. We can see the data in figures (a) and (b) shows a growing trend, while data in figure (c) is stable through the numeric transform.
The parameters' distribution has been modeled using Gaussian model with the most common setting.The results we achieved in each of our experiments with either simulation study or real data application, are quite encouraging.FoundationThis research was partially supported by the PhD research startup foundation of Guizhou Normal University (Grant No. GZNUD[2017]27) & Science and Technology Foundation of Guizhou Province (LKS[2013]5 & LKS[2012]11), China.& Teaching Project of Guizhou Normal University in 2016: Contract No.

Table 1 .
The difference sets of priors. .This table shows the priors set in our model are all independent each other and more typical. Note We apply the R program in the section 5 to estimate the DAX data, achieve the result of Γ is (0.0028, 0.0600, 0.0676, 7.7485).That is, the equation of va-Box test statistic for examining the null hypothesis of independence in ARCH model, we get the χ squared 0.0023 with p-value 0.9621.It obvious to show our GARCH (1, 1)-t model is sufficient.