Learn R Programming

MSGARCH (version 2.51)

UncVol: Unconditional volatility.

Description

Method returning the unconditional volatility of the 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(), ...)

Value

A scalar of unconditional volatility.

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

par

Vector (of size d) or matrix (of size nmcmc 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:

  • nsim (integer >= 0) : Number of simulations used for the estimation of the unconditional volatility. (Default: nsim = 250L)

  • nahead (integer >= 0) : Number of step ahead performed to estimate the unconditional volatility .(Default: nahead = 5000L)

  • nburn (integer >= 0) : Number of discarded step to estimate the unconditional volatility. (Default: nburn = 1000L)

Details

If a matrix of MCMC posterior draws is given, the Bayesian unconditional volatility is calculated. The unconditional volatility is estimated by first simulating nsim paths up to nburn + nahead, calculating a forecast of the conditional volatility at each step ahead, discarding the first nburn step ahead conditional volatilities forecasts, and computing the mean of the remaining nahead - nburn 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 complex models.

Examples

Run this code
# create specification
spec <- CreateSpec()

if (FALSE) {
# unconditional volatility from specification
par <- c(0.1, 0.1, 0.8, 0.2, 0.1, 0.8, 0.99, 0.01)
UncVol(object = spec, par = par)

# load data
data("SMI", package = "MSGARCH")

# unconditional volatility from ML fit
fit <- FitML(spec = spec, data = SMI)
UncVol(object = fit)
var(SMI)

# unconditional volatility from MCMC fit
set.seed(1234)
fit <- FitMCMC(spec = spec, data = SMI)
UncVol(object = fit)
}

Run the code above in your browser using DataLab