uGARCHfit-class: class: Univariate GARCH Fit Class

Description Objects from the Class Extends Methods Note Author(s) See Also Examples

Description

Class for the univariate GARCH fit.

Objects from the Class

A virtual Class: No objects may be created from it.

Extends

Class GARCHfit, directly. Class rGARCH, by class GARCHfit, distance 2.

Methods

as.data.frame

signature(x = "uGARCHfit"): extracts the position (dates), data, fitted values, residuals and conditional sigma.

coef

signature(object = "uGARCHfit"): extracts the coefficients.

infocriteria

signature(object = "uGARCHfit"): calculates and returns various information criteria.

nyblom

signature(object = "uGARCHfit"): calculates and returns the Hansen-Nyblom stability test (1990).

gof

signature(object = "uGARCHfit", groups = "numeric"): calculates and returns the adjusted goodness of fit statistic and p-values for the fitted distribution based on the Vlaar and Palm paper (1993). Groups is a numeric vector of bin sizes.

newsimpact

signature(object = "uGARCHfit"): calculates and returns the news impact curve.

signbias

signature(object = "uGARCHfit"): calculates and returns the sign bias test of Engle and Ng (1993).

likelihood

signature(object = "uGARCHfit"): extracts the likelihood.

sigma

signature(object = "uGARCHfit"): extracts the conditional sigma values.

fitted

signature(object = "uGARCHfit"): extracts the fitted values.

residuals

signature(object = "uGARCHfit"): extracts the residuals.

getspec

signature(object = "uGARCHfit"): extracts and returns the GARCH specification from a fit object.

uncvariance

signature(object = "uGARCHfit", pars = "missing", distribution="missing", model = "missing"): calculates and returns the long run unconditional variance of the garch fit given a uGARCHfit object.

uncvariance

signature(object = "missing", pars = "numeric", distribution = "character",model = "character"): calculates and returns the long run unconditional variance of the garch fit given a named parameter vector as returned by the fit, a distribution model name and a garch model name with a submodel included if the model is of the nested type such as fGARCH.

uncmean

signature(object = "uGARCHfit"): calculates and returns the unconditional mean of the conditional mean equation (constant, ARMAX, garchinmean).

persistence

signature(object = "uGARCHfit", pars = "missing", distribution = "missing", model = "missing"): calculates and returns the persistence of the garch fit model given a uGARCHfit object.

persistence

signature(object = "missing", pars = "numeric", distribution = "character", model = "character"): calculates and returns the persistence of the garch fit model given a named parameter vector as returned by the fit, a distribution model name and a garch model name with a submodel included if the model is of the nested type such as fGARCH.

halflife

signature(object = "uGARCHfit", pars = "missing", distribution = "missing", model = "missing"): calculates and returns the halflife of the garch fit variance given a uGARCHfit object.

halflife

signature(object = "missing", pars = "numeric", distribution = "character", model = "character"): calculates and returns the halflife of the garch fit variance given a named parameter vector as returned by the fit, a distribution model name and a garch model name with a submodel included if the model is of the nested type such as fGARCH.

plot

signature(x = "uGARCHfit", y = "missing"): fit plots.

show

signature(object = "uGARCHfit"): fit summary.

Note

Methods for coef, likelihood, fitted, sigma and residuals provide extractor functions for those values.
Method for show gives detailed summary of garch fit with various tests.
Method for plot provides for interactive choice of plots, option of choosing a particular plot (option “which” equal to a valid plot number) or a grand plot including all subplots on one page (option “which”=“all”).
The data.frame method returns a data frame with 4 columns, the original data, the fitted data, the residuals and the sigma values, indexed (rownames) by the same values as provided in the original data provided to the fit function (e.g. dates).
The infocriteria method calculates and returns the information criteria (AIC, BIC etc) of the garch fit.
The nyblom method calculates and returns the Hansen-Nyblom joint and individual coefficient stability test statistic and critical values.
The gof methods calculates and returns the adjusted goodness of fit statistic and p-values for the fitted distribution. The groups parameter is a numeric vector of grouped bin sizes for the test. See the references in the package introduction for the original paper by Vlaar and Palm explaining the test.
The signbias methods calculates and returns the sign bias test of Engle and Ng (see the references in the package introduction).
Methods for calculating and extracting persistence, unconditional variance and half-life of the garch shocks exist and take either the garch fit object as a single value otherwise you may provide a named parameter vector (see uGARCHspec section for parameter names of the various garch models), a distribution name and the garch model (with submodel argument for the fGARCH model).
Unconditional mean and variance of the model may be extracted by means of the uncmean and uncvariance methods. The uncvariance may take either a fit object or a named parameter list, distribution and garch model name. The uncmean will only take a fit object due to the complexity of the calculation requiring much more information than the uncoditional variance.
The news impact method returns a list with the calculated values (zx, zy) and the expression (xexpr, yexpr) which can be used to illustrate the plot.

Author(s)

Alexios Ghalanos

See Also

Classes uGARCHforecast, uGARCHsim and uGARCHspec.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Not run: 
# Basic GARCH(1,1) Spec
data(dmbp)
spec = ugarchspec()
fit = ugarchfit(data = dmbp[,1], spec = spec)
fit

# object fit:
slotNames(fit)
# sublist fit@fit
names(fit@fit)

coef(fit)
infocriteria(fit)
likelihood(fit)
nyblom(fit)
signbias(fit)
head(as.data.frame(fit))
head(sigma(fit))
head(residuals(fit))
head(fitted(fit))
gof(fit,c(20,30,40,50))
uncmean(fit)
uncvariance(fit)
#plot(fit,which="all")

# news impact example
spec = ugarchspec(variance.model=list(model="apARCH"))
fit = ugarchfit(data = dmbp[,1], spec = spec)
# note that newsimpact does not require the residuals (z) as it
# will discover the relevant range to plot against by using the min/max
# of the fitted residuals.
ni=newsimpact(z = NULL, fit)
#plot(ni$zx, ni$zy, ylab=ni$yexpr, xlab=ni$xexpr, type="l", main = "News Impact Curve")

## End(Not run)

rgarch documentation built on May 2, 2019, 5:22 p.m.