Skip to main content


Calculates annualized volatility forecasts based on GARCH. GARCH (Generalized autoregressive conditional heteroskedasticity) is stochastic model for time series, which is for instance used to model volatility clusters, stock return and inflation. It is a generalisation of the ARCH models. GARCH(p,q)=(1αβ)σl+i=1qαuti2+i=1pβσti2\text{GARCH}(p, q) = (1 - \alpha - \beta) \sigma_l + \sum_{i=1}^q \alpha u_{t-i}^2 + \sum_{i=1}^p \beta \sigma_{t-i}^2 [1] The GARCH-model assumes that the variance estimate consists of 3 components: - σl\sigma_l ; the long term component, which is unrelated to the current market conditions - utu_t ; the innovation/discovery through current market price changes - σt\sigma_t ; the last estimate GARCH can be understood as a model, which allows to optimize these 3 variance components to the time series. This is done assigning weights to variance components: (1αβ)(1 - \alpha - \beta) for σl\sigma_l , α\alpha for utu_t and β\beta for σt\sigma_t . [2] The weights can be estimated by iterating over different values of (1αβ)σl(1 - \alpha - \beta) \sigma_l which we will call ω\omega , α\alpha and β\beta , while maximizing: iln(vi)(ui2)/vi\sum_{i} -ln(v_i) - (u_i ^ 2) / v_i . With the constraints: - α0\alpha 0 - β0\beta 0 - α+β1\alpha + \beta 1 Note that there is no restriction on ω\omega . Another method used for estimation is "variance targeting", where one first sets ω\omega equal to the variance of the time series. This method nearly as effective as the previously mentioned and is less computationally effective. One can measure the fit of the time series to the GARCH method by using the Ljung-Box statistic. [3] See the sources below for reference and for greater detail. Sources: [1] Generalized Autoregressive Conditional Heteroskedasticity, by Tim Bollerslev [2] Finance Compact Plus Band 1, by Yvonne Seler Zimmerman and Heinz Zimmerman; ISBN: 978-3-907291-31-1 [3] Options, Futures & other Derivates, by John C. Hull; ISBN: 0-13-022444-8


garch -v {} [-p P] [-o O] [-q Q] [-m {LS,AR,ARX,HAR,HARX,constant,zero}] [-l HORIZON] [-d]


column-v --valueThe column and name of the database you want to estimate volatility forNoneFalseNone
p-pThe lag order of the symmetric innovation1TrueNone
o-oThe lag order of the asymmetric innovation0TrueNone
q-qThe lag order of lagged volatility or equivalent1TrueNone
mean-m --meanChoose mean modelconstantTrueLS, AR, ARX, HAR, HARX, constant, zero
horizon-l --lengthThe length of the estimate100TrueNone
detailed-d --detailedDisplay the details about the parameter fit, for instance the confidence intervalFalseTrueNone

On this page