cgarchfilter-methods: function: Copula-GARCH Filter

Description Usage Arguments Value Author(s) Examples

Description

Method for creating a Copula-GARCH filter object.

Usage

1
2
3
cgarchfilter(spec, data, out.sample = 0, filter.control = list(n.old = NULL), 
spd.control = list(lower = 0.1, upper = 0.9, type = "pwm", kernel = "epanech"), 
parallel = FALSE, parallel.control = list(pkg = c("multicore", "snowfall"), cores = 2), VAR.fit = NULL, ...) 

Arguments

spec

A DCCspec object created by calling ‘dccspec’ with fixed parameters for the coeffficients.

data

A multivariate data object as ‘matrix’ or ‘data.frame’.

out.sample

A positive integer indicating the number of periods before the last to keep for out of sample forecasting.

filter.control

Control arguments passed to the filtering routine.

parallel

Whether to make use of parallel processing on multicore systems.

parallel.control

The parallel control options including the type of package for performing the parallel calculations (‘multicore’ for non-windows O/S and ‘snowfall’ for all O/S), and the number of cores to make use of.

VAR.fit

(optional) A previously estimated VAR list returned from calling the varxfilter function.

spd.control

If the spd transformation was chosen in the spec, the spd.control passes its arguments to the spd fit routine.

...

.

Value

A cGARCHfilter object containing details of the Copula-GARCH filter.

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
28
29
30
## Not run: 
data(dji30ret)
Dat = dji30ret[, 1:3, drop = FALSE]
# Copula-Student (non time varying - Max Likelihood Estimation of Rho)
uspec = ugarchspec(mean.model = list(armaOrder = c(1,0)), variance.model = list(model = "sGARCH"), 
distribution.model = "std")

spec = cgarchspec(uspec = multispec( replicate(3, uspec) ), VAR = TRUE, VAR.opt = list(lag = 1, lag.max = 4, 
lag.criterion = c("AIC", "HQ", "SC", "FPE"), external.regressors = NULL), 
dccOrder = c(1,1), distribution.model = list(copula = c("mvt"), method = c("ML"),
time.varying = FALSE, transformation = "parametric"), start.pars = list(), fixed.pars = list())	

fit1 = cgarchfit(spec, data = Dat, spd.control = list(lower = 0.1, upper = 0.9, type = "pwm", kernel = "epanech"), 
		fit.control = list(eval.se = TRUE, trace = TRUE), solver = "solnp")
spec2 = spec
for(i in 1:3){
	# This check for non-equal spec which return a list rather than a matrix
	if(spec@uspec@type == "equal"){
		spec2@uspec@spec[[i]]@optimization.model$fixed.pars = as.list(coef(fit1, "garchpars")[,i])
	} else{
		spec2@uspec@spec[[i]]@optimization.model$fixed.pars = as.list(coef(fit1, "garchpars")[[i]])
	}
}
# "st" is the second-stage parameters
spec2@mspec$optimization.model$fixed.pars = as.list(coef(fit1, "st"))
filt1 = cgarchfilter(spec2, data = Dat, VAR.fit = fit1@mfit$vrmodel)
head(fitted(fit1))
head(fitted(filt1))

## End(Not run)

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