uGARCHfit-class {rugarch}R Documentation

class: Univariate GARCH Fit Class

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.

Slots

fit:

Object of class "vector" Holds data on the fitted model.

model:

Object of class "vector" The model specification common to all objects.

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.

vcov

signature(object = "uGARCHfit"): Extracts the covariance matrix of the parameters. Additional logical option of ‘robust’ indicates whether to extract the robust based covariance matrix.

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", vexdata = "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", submodel = "ANY", vexdata = "ANY"): 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 and any external regressor data.

uncmean

signature(object = "uGARCHfit"): Calculates and returns the unconditional mean of the conditional mean equation (constant, ARMAX, arch-in-mean).

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.

convergence

signature(object = "uGARCHfit"): Returns the solver convergence code for the fitted object (zero denotes convergence).

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

## 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)

[Package rugarch version 1.0-10 Index]