dccfilter-methods: function: DCC-GARCH Filter

Description Usage Arguments Value Author(s) Examples

Description

Method for creating a DCC-GARCH filter object.

Usage

1
2
3
dccfilter(spec, data, out.sample = 0, filter.control = list(n.old = NULL), 
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.

...

.

Value

A DCCfilter object containing details of the DCC-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
31
32
33
## Not run: 
data(dji30ret)
Dat = dji30ret[, 1:4, drop = FALSE]
uspec1 = ugarchspec(mean.model = list(armaOrder = c(1,0)), variance.model = list(model = "apARCH"), 
			distribution.model = "norm")
uspec2 = ugarchspec(mean.model = list(armaOrder = c(2,0)), variance.model = list(model = "gjrGARCH"), 
			distribution.model = "norm")
uspec3 = ugarchspec(mean.model = list(armaOrder = c(0,0)), variance.model = list(model = "sGARCH"), 
			distribution.model = "norm")
uspec4 = ugarchspec(mean.model = list(armaOrder = c(1,0)), variance.model = list(model = "sGARCH",
					garchOrder = c(2, 1)), 
			distribution.model = "norm")
uspec = c( uspec1, uspec2, uspec3, uspec4 )
spec = dccspec(uspec = multispec( uspec ), dccOrder = c(1,1), distribution = "mvlaplace")
	
# fit the model
fit = dccfit(data = Dat, spec = spec, out.sample = 100, solver = "solnp", 
fit.control = list(scale = TRUE, eval.se = FALSE))
	
# check the filter
spec2 = spec
# fix the dcc parameters
spec2@mspec$optimization.model$fixed.pars = coef(fit, type = "dcc")
# fix the garchpars
for(i in 1:4) spec2@uspec@spec[[i]]@optimization.model$fixed.pars = coef(fit@ufit@fit[[i]])
filt = dccfilter(spec = spec2, data = Dat, out.sample = 100)

# do a small comparison:
cat("Fit and Filtered DCC models Conditional Correlation check:")
print( rcov(fit)[,,1] == rcov(filt)[,,1] )
print( rcov(fit)[,,100] == rcov(filt)[,,100] )

## End(Not run)

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