Learn R Programming

MSGARCH (version 1.3)

UncVol: Unconditional volatility.

Description

Method returning the unconditional volatility of the process in each state and for the overall process..

Usage

UncVol(object, ...)

# S3 method for MSGARCH_SPEC UncVol(object, par = NULL, ctr = list(), ...)

# S3 method for MSGARCH_ML_FIT UncVol(object, ctr = list(), ...)

# S3 method for MSGARCH_MCMC_FIT UncVol(object, ctr = list(), ...)

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 TransMat.

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.

ctr

A list of control parameters:

  • n.sim (integer >= 0) : Number indicating the number of simulation done for estimation of the unconditional volatility. (Default: n.sim = 250L)

  • n.ahead (integer >= 0) : Number indicating the number of step ahead performs to estimate the unconditional volatility .(Default: n.ahead = 5000L)

  • n.burn (integer >= 0) : Number indicating the number of discarded step ahead to estimate the unconditional volatility. (Default: n.burn = 1000L)

Value

A scalar corresponding to the process unconditional volatility.

Details

If a matrix of MCMC posterior draws is given, the Bayesian unconditional volatility are calculated. The unconditional volatility is estimated by first simulating n.sim paths up to n.burn + n.ahead, calculating a forecast of the conditional volatility at each step ahead, discarding the first n.burn step ahead conditional volatilities forecasts, and computing the mean of the remaining n.ahead - n.burn conditional volatilites forecasts. This method is based on the fact that the conditional volatility forecast will converge to the unconditional volatilty the further the forecast his from the starting point. We take the average as a way to remove the noise that comes with the simulation process. Overall, this method allows to compute the unconditional volatilty of arbitrarily complex models.

Examples

Run this code
# NOT RUN {
# create model specification
# MS(2)-GARCH(1,1)-Normal (default)
spec <- CreateSpec()

# compute the unconditional volatility of each regime and the overall process
# }
# NOT RUN {
  par <- c(0.1, 0.1, 0.8, 0.2, 0.1, 0.8, 0.99, 0.01)
  UncVol(object = spec, par = par)
# }

Run the code above in your browser using DataLab