I would like to ask "how to do GARCH modelling on stata".

Basically I want to estimate stock market volatility using daily data. I have one variable as return series, $r_t=\ln(\frac{P_t}{P_{t-1}})$.

I need a step by step explanation.

  • $\begingroup$ Migrate to stats.SE? $\endgroup$ Commented Sep 2, 2011 at 11:24
  • 1
    $\begingroup$ @sheegaon -- Good point. But it's a RTFM answer (or a LMGTFY answer) that doesn't add much to either community. I will see if the QF community closes. $\endgroup$ Commented Sep 2, 2011 at 14:14
  • $\begingroup$ @richardh Agreed. Time to see if the community can police itself. $\endgroup$ Commented Sep 2, 2011 at 14:21
  • $\begingroup$ Is there a way for the community to request a migrate? I myself am marginal about the close, since I think it could be a valid question, I just think the OP will find better answers on the much more well-trafficked stats.SE, as the question itself does not require knowledge of finance to answer. $\endgroup$ Commented Sep 2, 2011 at 14:29
  • $\begingroup$ @sheegaon The close dialogue box should have an option under "Off Topic" that the question belongs on another SE site. At least that's what the moderators see; I'm not sure if that choice requires higher privileges. $\endgroup$ Commented Sep 2, 2011 at 14:39

2 Answers 2


I don't use Stata often, but the help() function is typically very good. Try help(garch). It looks like the command is

garch _depvar_ _indepvars_ _options_

Here's the help page on the web.


You need to find the values of the GARCH parameters which fit best your data.

To do so, you usually create a function simulating a GARCH simulation taking, as input the parameters, and you run it through an optimizer to that the sum of the squares of the differences of the simulations points and the sample points are minimal.

Note that it will not give you a number (the volatility, which is not very useful), it will give you a time series of the volatility for each data point.

Finally, beware that this is just a model, it is not the ultimate answer. Try looking at different GARCH versions on the wiki page if you need to.

Note: This is the manual way of doing it. You have packages available in R and MATLAB who handle all that for you, it might exist in Stata.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.