# [R-SIG-Finance] [R-sig-finance] Demystification of GARCH modeling with fGarch

DavidM.UK david.merritt at bris.ac.uk
Wed Jun 11 13:40:22 CEST 2008

The choice of distribution is relatively straight forward I'd say, in the
Econometric literature it tends to be either a standardized Student's-t
distribution [Bollerslev did a paper on it if I recall] or the standard
normal distribution. As a practical measure, I don't think you could do much
better than using qq.plot() from the "car" library for diagnostics, of
course you might just look at the histrogram plot of the returns to see if
their are heavy tails though (hist(x, br="FD") is my usual approach there).

For initial parameter estimates, I'm not sure it's a real issue, doesn't
fGarch take care of that for you. I think MATLAB's GARCH Toolbox and
RMetrics set \alpha_{i=1}^{p} = \frac{0.05}{p} and \beta_{j=1}^{q} =
\frac{0.85}{q} . I tend to use those setting with my own GARCH models and
they're generally "okay".

You might want to cover how to assess the fit of your estimated GARCH model,
paying attention to the kurtosis and skewness statistics (routines to
calculate both are in the e1071 package). As I'm sure you know, a strong
negative skew probably means you'll have more sucess with something like
GJR-GARCH. If the kurtosis is massively high (which you'll get if you
looking at intraday data) there's not that much you can do about it (well
it's what I work on) but I guess depending on your objective you might try
and remove some of the extremes/outliers before estimating your model, I
think fExtremes might have some useful stuff in that area.

Scaling the data is an interesting one, and a common cause of failure during
the opitmization stage in my view. I tend to scale raw logged returns by 10,
and intraday data by 100, but that's a rather random approach by me :) I'd
definitely suggest you get a range of data, and not just use the
EuStockMarkets series, for me I'd present GARCH modeling for intraday, daily
and indice data, and they are quite different.

Unfortunately the data I'm using can't be shared, but I'm sure there are
others out their that see fGarch fail with
>my.garch <- garchFit(data=x, forumla=~garch(1,1))
where x are logged returns and the garchFit seems to get stuck in a loop,
with the only solution to quit R (on Linux this is).

It might be worth giving a few examples of the different types of
optimization routines you can use, I don't tend to use RMetrics code - but
the way my code works is pretty much the same, and I generally get faster
convergence with nlminb() over optim(), and fGarch is generally quicker than
my code anyhow. Does it have some sort of SQP routine?

Cheers

David

Yohan Chalabi wrote:
>
> Dear all,
>
> I am working on a tutorial which would focus on the  common issues in
> GARCH/APARCH modeling. The idea is to give hints how to choose the
> optimization parameters,  the starting values, the distribution and how to
> properly scale the data.
>
> This tutorial is meant to be very practical and I would like to have some
> input from the r-sig-finance community. If you have examples where
> garchFit badly failed for you, it would be great if you could send me your
> dataset with the R code you used. If you have any other comments or
> questions about fGarch, feel free to write me.
>
>
>
>
> Thanks!
>
> Regards,
> Yohan
>
> --
> PhD student
> Swiss Federal Institute of Technology
> Zurich
>
> www.ethz.ch
> www.rmetrics.org
>
> NOTE:
> Rmetrics Workshop: http://www.rmetrics.org/meielisalp.htm
> June 29th - July 3rd Meielisalp, Lake Thune, Switzerland
>
> _______________________________________________
> R-SIG-Finance at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-finance
> -- Subscriber-posting only.
> -- If you want to post, subscribe first.
>
>

--
View this message in context: http://www.nabble.com/Demystification-of-GARCH-modeling-with-fGarch-tp17664671p17775532.html
Sent from the Rmetrics mailing list archive at Nabble.com.