Learn R Programming

MSGARCH (version 1.3)

Volatility: Volatility filtering.

Description

Method returning the conditional volatility of the process.

Usage

Volatility(object, ...)

# S3 method for MSGARCH_SPEC Volatility(object, par, data, ...)

# S3 method for MSGARCH_ML_FIT Volatility(object, new.data = NULL, ...)

# S3 method for MSGARCH_MCMC_FIT Volatility(object, new.data = NULL, ...)

Arguments

object

Model specification of class MSGARCH_SPEC created with CreateSpec or fit object of type MSGARCH_ML_FIT created with FitML or MSGARCH_MCMC_FIT created with FitMCMC.

...

Not used. Other arguments to Volatility.

par

Vector (of size d) or matrix (of size n.mcmc x d) of parameter estimates where d must have the same length as the default parameters of the specification.

data

Vector (of size T) of observations.

new.data

Vector (of size T*) of new observations. (Default new.data = NULL)

Value

Condititional volatility (vector of size T + T*) of class MSGARCH_CONDVOL. The MSGARCH_CONDVOL class contains the plot method.

Details

If a matrix of MCMC posterior draws is given, the Bayesian predictive conditional volatility is calculated.

Examples

Run this code
# NOT RUN {
# load data
data("SMI", package = "MSGARCH")

# create model specification
# MS(2)-GARCH(1,1)-Normal (default)
spec <- CreateSpec()

# fit the model on the data by ML
fit <- FitML(spec = spec, data = SMI)

# compute the In-sample conditional volatility from the fitted model
cond.vol <- Volatility(object = fit)
plot(cond.vol)
# }

Run the code above in your browser using DataLab