goGARCHfft-class: Class: GO-GARCH portfolio density

Description Objects from the Class Slots Methods Author(s) Examples

Description

Class for the GO-GARCH portfolio density

Objects from the Class

The class is returned by calling the function convolution on objects of class goGARCHfit, goGARCHfilter, goGARCHforecast and goGARCHsim.

Slots

dist:

A list with the portfolio density and other details.

Methods

dfft

signature(object = "goGARCHfft"): The takes additional argument “index” to indicate the particular time point, and returns an interpolated density function which may be called like any other “d” type density function.

pfft

signature(object = "goGARCHfft") The takes additional argument “index” to indicate the particular time point, and returns an interpolated distribution function which may be called like any other “p” type distribution function.

qfft

signature(object = "goGARCHfft") This takes additional argument “index” to indicate the particular time point, and returns an interpolated quantile function which may be called like any other “q” type quantile function. This may also be used to generate pseudo-random variables from the distribution by using random standard uniform numbers as inputs.

nportmoments

signature(object = "goGARCHfft"): Calculate and returns a matrix of the first 4 standardized moments by evaluation of the portfolio density using quadrature based method (i.e. calling R's “integrate” function on the portfolio density).

Author(s)

Alexios Ghalanos

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
## Not run: 
data(dji30ret)
spec = gogarchspec(mean.model = list(demean = "constant"), 
		variance.model = list(model = "sGARCH", garchOrder = c(1,1), 
		submodel = NULL), distribution.model = list(distribution = "manig"),
		ica = "fastica")

fit = gogarchfit(spec = spec, data  = dji30ret[,1:4, drop = FALSE],  out.sample = 50, gfun = "tanh")
forc = gogarchforecast(fit, n.ahead = 1, n.roll = 2)

portnig = convolution(forc, weights = rep(1/4, 4))

# find the forecasted 1% and 5% VaR at the 1-ahead forecast horizon
portq = qfft(portnig, index = 1)
portq(0.01)
portq(0.05)

# the moments:
nm = nportmoments(portnig)
print(nm, digits = 4)

# check against the geometric moments (adjustments to integrate accuracy and
# FFT parameters will lead to closer results).
gm = gportmoments(forc, weights = matrix(1/4, ncol = 4, nrow = 3))
print(gm, digits = 4)

## End(Not run)

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