Learn R Programming

rugarch (version 1.4-2)

uGARCHfit-class: class: Univariate GARCH Fit Class

Description

Class for the univariate GARCH fit.

Arguments

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

coef

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

cofint

signature(object = "uGARCHfit"): Similar to the stats S3 method confint, extracts coefficient confidence intervals taking additional optional arguments parm and level, as well as robust (default: FALSE) indicating whether to use the robust covariance matrix for the calculations.

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. Optional logical argument standardize (default is FALSE) allows to extract the standardized 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).

quantile

signature(x = "uGARCHfit"): Calculates and returns, given a vector of probabilities (additional argument “probs”), the conditional quantiles of the fitted object (x).

pit

signature(object = "uGARCHfit"): Calculates and returns the conditional probability integral transform given the data and estimated density.

reduce

signature(object = "uGARCHfit"): Zeros parameters (fixing to zero in rugarch is equivalent to eliminating them in estimation) with p-values (optional argument “pvalue”) greater than 0.1 (default), and re-estimates the model. Additional arguments are passed to ugarchfit.An additional option “use.robust” (default TRUE) asks whether to use the robust calculated p-values.

plot

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

show

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

See Also

Classes '>uGARCHforecast, '>uGARCHsim and '>uGARCHspec.

Examples

Run this code
# 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(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")
# }

Run the code above in your browser using DataLab