estimate function

Estimates an GARCH model given a specification object using maximum likelihood and autodiff

Estimates an GARCH model given a specification object using maximum likelihood and autodiff

## S3 method for class 'tsgarch.spec' estimate( object, solver = "nloptr", control = NULL, stationarity_constraint = 0.999, keep_tmb = FALSE, ... ) ## S3 method for class 'tsgarch.multispec' estimate( object, solver = "nloptr", control = NULL, stationarity_constraint = 0.999, keep_tmb = FALSE, ... )

Arguments

  • object: an object of class tsgarch.spec or tsgarch.multispec
  • solver: only nloptr is currently supported (see nloptr).
  • control: solver control parameters.
  • stationarity_constraint: the bound on the inequality constraint for ensuring the stationary of the GARCH process (see details).
  • keep_tmb: whether to save and return the TMB object. This is can be used for example when passing different parameters to the model to extract a new output set given the same dataset (used in tsmarch package for calculating partitioned standard errors). The downside is that it can increase the size of the returned object by a factor of 8.
  • ...: not currently used.

Returns

An object of class tsgarch.estimate or tsgarch.multi_estimate .

Details

The underlying code is written using the TMB framework which uses automatic differentiation and hence allows the generation of analytic derivatives.

Stationarity is usually based on the condition that the persistence of the model is less than 1. The argument stationarity_constraint allows to fine tune this. For example, setting it to a very high value will effectively render this constraint inactive. The default of 0.999 has been found to be a reasonable bound since values close to one may lead to problems.

Since the nloptr solver make use of analytic Jacobians for the inequality constraint, these are either provided in closed form or calculated as part of the automatic differentiation algorithms implemented in the package.

The estimation makes 2 passes to the solver. The first pass uses no parameter scaling, whilst in the second pass the parameters (as well as bounds) are scaled making use of the estimated hessian from the first pass in order to generate a hopefully more robust solution.

For the multiple specification estimation, parallel functionality is available through the future_lapply function. The user needs to setup a plan in order to make use of this.

Author(s)

Alexios Galanos

  • Maintainer: Alexios Galanos
  • License: GPL-2
  • Last published: 2024-10-12