Learn R Programming

tsgarch (version 1.0.3)

+.tsgarch.spec: Combine univariate GARCH specifications into a multi-specification object

Description

Combine univariate GARCH specifications into a multi-specification object

Usage

# S3 method for tsgarch.spec
+(x, y)

Value

an object of class “tsgarch.multispec”

Arguments

x

an object of class “tsgarch.spec”

y

an object of class “tsgarch.spec”

Details

A simple method for combining multiple specifications into an object which can then be estimated using parallel resources. Note that the returned object is effectively a validated list of specification objects with no names. Names can be assigned post-construction (see example).

Examples

Run this code
library(xts)
x <- xts(rnorm(1000), as.Date(1:1000, origin = "1970-01-01"))
y <- xts(rnorm(1000), as.Date(1:1000, origin = "1970-01-01"))
z <- xts(rnorm(1000), as.Date(1:1000, origin = "1970-01-01"))
mspec <- garch_modelspec(x, model = "egarch") +
garch_modelspec(y, model = "cgarch") +
garch_modelspec(z, model = "aparch")
names(mspec) <- c("x", "y", "z")
sapply(mspec, function(x) x$model$model)

Run the code above in your browser using DataLab