Description Objects from the Class Slots Methods Author(s) Examples
Class for the GO-GARCH portfolio density
The class is returned by calling the function convolution
on objects of
class goGARCHfit
, goGARCHfilter
, goGARCHforecast
and goGARCHsim
.
dist
:A list with the portfolio density and other details.
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.
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.
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.
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).
Alexios Ghalanos
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.