| Volatility | R Documentation |
Method returning the in-sample conditional volatility.
Volatility(object, ...) ## S3 method for class 'MSGARCH_SPEC' Volatility(object, par, data, ...) ## S3 method for class 'MSGARCH_ML_FIT' Volatility(object, newdata = NULL, ...) ## S3 method for class 'MSGARCH_MCMC_FIT' Volatility(object, newdata = NULL, ...)
object |
Model specification of class |
... |
Not used. Other arguments to |
par |
Vector (of size d) or matrix (of size |
data |
Vector (of size T) of observations. |
newdata |
Vector (of size T*) of new observations. (Default |
If a matrix of MCMC posterior draws is given, the Bayesian predictive conditional volatility is calculated.
In-sample condititional volatility (vector of size T + T*) of class MSGARCH_CONDVOL.
The MSGARCH_CONDVOL class contains the plot method.
# create specification
spec <- CreateSpec()
# load data
data("SMI", package = "MSGARCH")
# in-sample volatility from specification
par <- c(0.1, 0.1, 0.8, 0.2, 0.1, 0.8, 0.99, 0.01)
vol <- Volatility(object = spec, par = par, data = SMI)
head(vol)
plot(vol)
# in-sample volatility from ML fit
fit <- FitML(spec = spec, data = SMI)
vol <- Volatility(object = fit)
head(vol)
plot(vol)
## Not run:
# in-sample volatility from MCMC fit
set.seed(1234)
fit <- FitMCMC(spec = spec, data = SMI)
vol <- Volatility(object = fit)
head(vol)
plot(vol)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.