Stabilizing Custom GARCH QMLE Fits by Bounding Conditional Variance
Summary
The document discusses numerical instability when optimizing a custom GARCH quasi-maximum-likelihood objective in R. Its proposed safeguard is to clamp each filtered conditional variance to a chosen lower and upper limit, preventing extreme parameter values from producing negative or explosive variance paths during optimization. A flag can record whenever the clamp is activated, so the researcher can identify parameter regions where the constraint affects the filter.
The suggested limits should reflect the asset and data context; the example uses annualized volatility bounds for stock indexes. This is a practical smoothing device, not a recommendation for an optimizer or a replacement for valid model constraints. If the bounds are reached often, the resulting likelihood may depend materially on the imposed limits, so flagged cases merit scrutiny. The note provides no comparative tests or evidence that this approach improves estimation accuracy.
Key ideas
- Bounding filtered conditional variance can prevent negative or explosive paths during optimization.
- Record whenever a bound is activated to identify parameter regions affected by the safeguard.
- Choose variance limits to fit the asset and data being modeled.
- Treat the bounds as a numerical aid and inspect estimates that rely on them.
Tags
Full text
# Suggestions for choosing an optimization algorithm for fitting custom GARCH models by QMLE in R? # Suggestions for choosing an optimization algorithm for fitting custom GARCH models by QMLE in R? I am trying to fit a custom GARCH model by QMLE in R. I have written out the log likelihood function and am now working on optimizing it. However, choosing an optimization algorithm has proven to be difficult. I have tried the optimizers in the `optim` package, but they seem unstable for this purpose. I have also tried to use the `Rsolnp` package, which is the default in `rugarch`, but since I would like to include an expression for the gradient in the function call, this is also unviable. Does anybody know which package I should look into? I need: - Ability to provide upper and lower bounds for the parameters. - Ability to provide a gradient function. I recently came across a question on here where the asker tried to use the function fmincon from the package `pracma`. Perhaps somebody knows if this could be advisable? ## Answer by Stéphane (score 1) https://quant.stackexchange.com/a/53468 One huge problem with GARCH models is that sometimes extremely changes in parameter values can lead to absurdities such as conditional variance paths exploding or plummeting below zero. One way to quickly solve that problem is to force the conditional variance process to be bound within an interval. When you filter out the conditional variance process, you can add one line of code: ``` h[t+1] = max( hmin, min(h[t+1], hmax) ) ``` This line will force your conditional variance to stay within that range at all times. You can then add a line of code to have some kind of flag that will warn you if this happened. If you are working with stock market indexes, for example, you could guess that annualized volatility will not fall below 1% and will not rise above 500%. It would be surprising to see a high likelihood associated with these extremes. Obviously, for other data, other values would be warranted, but having the option could help smooth a bit the optimization process.
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.