# GARCH Model Estimation

I am analysing a GARCH(1,1) model under the assumption of t-Student distribution. In particular, I set the problem in the following way. I have a series $${y_t}, t \in{1,2,...,T}$$ and I assume that:

1) $$y_t = \sigma_t \epsilon_t$$ where $$\epsilon_t\sim t_{\nu}$$ where $$t_{\nu}$$ is a t-Student distribution with $$\nu$$ degrees of freedom, to be estimated by the model

2) $$\sigma_t^2=\omega + \alpha y_{t-1} + \beta \sigma_{t-1}^2$$ is the equation of variance

My question is: when creating $$\sigma_t^2$$ I have to consider the real values of the series $$y_t$$ or I have to generate a random number $$\epsilon_t$$ distributed as a t-Student distribution, calculate $$y_t = \sigma_t \epsilon_t$$ and then evaluate $$\sigma_t^2=\omega + \alpha y_{t-1} + \beta \sigma_{t-1}^2$$?

Another question is, assuming that $$\epsilon_t\sim t_{\nu}$$ means that the degrees of freedom of the distribution have to estimated by the model or I have to set these degrees of freedom before the GARCH(1,1) estimation problem?

• The Garch is fine as long as the conditional mean of y is 0. If so, add the square on y. The t distribution is the shape of the pdf for the innovations. So it is useful when you compute the likelihood function. When doing so, you plug the real values of y, and you write the joint pdf with t student shape as a function of the parameters and given the sample of y (that are indeed known for the likelihood function). Then you find the Garch parameters and the degrees of freedom that maximize the likelihood. Otherwise you can estimate the Garch and use..
– Fr1
Commented Sep 11, 2019 at 20:51
• ... and use QMLE to find the parameter t that maximize the second-stage likelihood where y is replaced by the series of standardized residuals (y/garch) found at step1. But you will have a less efficient estimator (albeit still consistent), in exchange for a reduced computational complexity in the maximizer.
– Fr1
Commented Sep 11, 2019 at 20:53
• Thank you! Right now, I have used real $y_t$ to get the log likelihood (I have used squared y in equation of $\sigma$ , it was a mistake). But it seems that that my optimizer is not able to find the solution, since the value of the parameters are always near to the initial seeds.. I am using the Conjugate Gradient method of the QuantLib library Commented Sep 11, 2019 at 21:03
• Are they near? Or are they exactly equal to the seed?
– Fr1
Commented Sep 11, 2019 at 21:11
• Be sure you are setting the right constraints to force the variance to be positive for all periods.. both on w and a and B
– Fr1
Commented Sep 11, 2019 at 21:12

The answer provided in this post may be of help to you. The code is in MATLAB but that should be irrelevant, because the transformations are algebraic anyway, not code-specific. The main idea is that you build your model in such a way that you transform your original parameters $$\vec{\alpha}$$ (which have certain constraints on them) to a different set of parameters $$\vec{\theta}$$ which do not have constraints. You do the transformation using a specific, "1-to-1" function for each parameter, perform the unconstrained optimisation on $$\vec{\theta}$$, and then transform the resulting $$\vec{\hat{\theta}}$$ into the original $$\vec{\alpha}$$ by using the inverse of the "1-to-1" function used in the first place.

You should check the book "Quantitative Risk Management" by Embrechts, McNeil, Frey. Its section called "GARCH models for Changing Volatility" covers pretty much everything you are looking for, including the topic of QMLE.

• Thanks emil for your kind answer! I have analysed the problem and the implementation of the solver used by QuantLib and it seems that the problem is due to the fact that using the finite difference method is not so good, since the direction is not updated in the correct way. In any case, I will try your solution, that looks very good and interestng! Do you agree with me that the calculation of the correct analytical gradient is required for the maximization problem? Commented Sep 12, 2019 at 8:58
• The question regarding the gradient is beyond the scope of the original question you asked, at least strictly speaking. I am not familiar with the workings of QuantLib, but if you suspect it works poorly, you can try estimating with QuantLib the simplest possible model of your setting, i.e. an ARCH(1), and checking the results from there on. Of course, before you can blame it on the library, you need to make absolutely sure that your code is written the way it should be...
– Emil
Commented Sep 12, 2019 at 9:09
• If you are using the Python version of quantlib so that you are familiar with Python, my advice is to use scipy minimize and minimize the -log Likelihood. So that you will have all the info on the minimization process and a lot of flexibility in choosing the minimization algorithm.. the con is that you have to set up the likelihood function yourself, so check everything is fine when doing so. However it is not very difficult in my opinion
– Fr1
Commented Sep 12, 2019 at 9:26
• Notice that, for univariate GARCH, I have also seen people just using excel for this.. so it is not such a complex minimization process.
– Fr1
Commented Sep 12, 2019 at 9:28
• I totally agree with you, in fact the problem is not due to QuantLib, but it is due to the fact that I am using an approximation method (finite difference) for estimating the gradient. I think that using the real gradient will improve my solutions. Commented Sep 12, 2019 at 12:20

Ad 1) Yes, when creating $$\sigma_t^2$$ you use $$y_t$$ in the equation

$$\sigma_t^2 = \omega + \beta \sigma_{t-1}^2 + \alpha y_{t-1}^2$$

You have made the assumption $$E[y_t] = 0$$. You have an error in the GARCH equation - it should be $$y_{t-1}^2$$.

Ad 2) You decide. You can estimate the degree of freedom or simply assume a value. If the goal is to understand how fat tailed distribution you need, then I would estimate the degree of freedoms.

• Thank you for your answer! Commented Sep 16, 2019 at 7:02