GarchModel: Specify a GARCH model

Description Usage Arguments Details Value Examples

View source: R/garch.R

Description

Specify a GARCH model.

Usage

1
GarchModel(model = list(), ..., model.class = NULL)

Arguments

model

a GARCH model or a list.

...

named argument specifying the GARCH model.

model.class

a class for the result. By default GarchModel() decides the class of the result.

Details

Argument model can be the result of a previous call to GarchModel. Arguments in "..." overwrite current components of model.

GarchModel guarantees that code using it will continue to work transparently for the user even if the internal represedtation of GARCH models in this package is changed or additional functionality is added.

Value

an object from suitable GARCH-type class

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
## GARCH(1,1) with Gaussian innovations
mo1a <- GarchModel(omega = 1, alpha = 0.3, beta = 0.5)
mo1b <- GarchModel(omega = 1, alpha = 0.3, beta = 0.5, cond.dist = "norm")

## equivalently, the parameters can be given as a list
p1 <- list(omega = 1, alpha = 0.3, beta = 0.5)
mo1a_alt <- GarchModel(p1)
mo1b_alt <- GarchModel(p1, cond.dist = "norm")
stopifnot(identical(mo1a, mo1a_alt), identical(mo1b, mo1b_alt))

## additional arguments modify values already in 'model'
mo_alt <- GarchModel(p1, beta = 0.4)

## set also initial values
mo2 <- GarchModel(omega = 1, alpha = 0.3, beta = 0.5, esp0 = - 1.5, h0 = 4.96)

##  GARCH(1,1) with standardised-t_5
mot <- GarchModel(omega = 1, alpha = 0.3, beta = 0.5, cond.dist = list("std", nu = 5))

cvar documentation built on May 2, 2019, 2:09 p.m.