UncVol {MSGARCH} | R Documentation |
Unconditional volatility.
Description
Method returning the unconditional volatility of the process.
Usage
UncVol(object, ...)
## S3 method for class 'MSGARCH_SPEC'
UncVol(object, par = NULL, ctr = list(), ...)
## S3 method for class 'MSGARCH_ML_FIT'
UncVol(object, ctr = list(), ...)
## S3 method for class 'MSGARCH_MCMC_FIT'
UncVol(object, ctr = list(), ...)
Arguments
object |
Model specification of class |
... |
Not used. Other arguments to |
par |
Vector (of size d) or matrix (of size |
ctr |
A list of control parameters:
|
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.
Value
A scalar
of unconditional volatility.
Examples
# create specification
spec <- CreateSpec()
## Not run:
# 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)
## End(Not run)