Skip to content
All library documents

Hansen Skew-t GARCH Likelihood: Scale Term and Normalization

Article Quant Q&A · Author: Masher

Summary

The note examines a MATLAB implementation of the log-likelihood for a GARCH model whose standardized innovations follow Hansen’s skew-t distribution. It asks whether a normalization parameter should be square-rooted and why the likelihood includes a term involving the log of conditional variance. The accepted response identifies a likely coding issue: the parameter labeled b should be the square root of its defined expression, according to the cited distribution formulation.

The response also explains the variance term through density scaling. A standardized innovation density must be divided by the conditional standard deviation when expressed in terms of the observed return; taking the logarithm yields minus one half of the log conditional variance. This is a focused explanation tied to the cited paper and code. The response is not an independent verification of the full implementation, so the suggested correction should be checked against the model’s exact parameterization and source formulation.

Key ideas

  • The likelihood uses a standardized residual formed by scaling returns by conditional standard deviation.
  • Transforming the standardized density back to return units contributes minus one half of log conditional variance.
  • The answer flags that the skew-t normalization parameter b likely needs a square root.
  • The proposed code correction should be checked against the exact distribution parameterization.

Tags

Full text
# Log-likelihood of skew-t distribution


# Log-likelihood of skew-t distribution












I am trying to estimate GARCH models with the use of Hansen's (1994) skew-t distribution. I am using matlab's ARMAX-GARCH-K toolbox, where the log-likelihood is calculated as:

```
 lamda = parameters(end-1);
 nu = parameters(end);
 c = gamma((nu+1)/2)/(sqrt(pi*(nu-2))*gamma(nu/2));
 a = 4*lamda*c*((nu-2)/(nu-1));
 b = 1 + 3*lamda^2 - a^2;
 indicator1 = ((data(t)-mu(t))./sqrt(h(t))<-a./b);
 indicator2 = ((data(t)-mu(t))./sqrt(h(t))>=-a./b);
 likelihoods1 = log(b) + log(c) - ((nu+1)./2).*log(1+1./(nu-2).*((b.*indicator1.*((data(t)-mu(t))./sqrt(h(t)))+a)./(1-lamda)).^2);
 likelihoods2 = log(b) + log(c) - ((nu+1)./2).*log(1+1./(nu-2).*((b.*indicator2.*((data(t)-mu(t))./sqrt(h(t)))+a)./(1+lamda)).^2); 
 likelihoods = - 0.5*log(h(t)) + indicator1.*likelihoods1 + indicator2.*likelihoods2;
```

where `data(t)` stands for returns, `mu(t)` is the mean from the GARCH model, `h(t)` is the variance from the GARCH model and `parameters` are the parameters of the GARCH model. The whole function for calculating the log-likelihood can be found here (viewing without opening matlab): https://www.mathworks.com/matlabcentral/fileexchange/32882-armax-garch-k-toolbox--estimation--forecasting--simulation-and-value-at-risk-applications-/content/garchlik.m

And the distribution is defined as in the following paper on page 6: http://www.ssc.wisc.edu/~bhansen/papers/ier_94.pdf

I have two questions: 1. The square by the b parameter seems to be missing, so after defining b i should take values equal to sqrt(b). Is that right? 2.Where does the term `- 0.5*log(h(t))` in `likelihoods` come from? As it does not appear in the pdf function of the skew-t distribution.

I would be grateful for any help :)

## Answer by Malick (score 1, accepted)

https://quant.stackexchange.com/a/22383

1- It seems to me there is a problem in the original code the variable b should be defined as `b= sqrt(1 + 3*lamda^2 - a^2)`

2- The likelihood is defined just after equation 8. in the paper. You have to take into account the $ \frac{1}{\sigma}$ term (in $ \frac{1}{\sigma} \times g(..) $ , ie to scale the densitie) . So the `- 0.5*log(h(t))` refers to this part.

Explanation :

Likelihood:

$= \frac{1}{\sigma} \times g(..) $

Log-Likelihood :

$ = log(\frac{1}{\sigma})+log( g(..)) $

$ = log(1)-log(\sigma) +log( g(..)) $

$ = 0 - log( \sqrt{ \sigma^{2}}) +log( g(..))$

$ = - log\left( (\sigma^{2})^{0.5}\right) +log( g(..))$

$= -0.5 \times log(\sigma^{2}) +log( g(..))$

The first terms of the precedent equation refer to the `- 0.5*log(h(t))` part.

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.