Learn R Programming

MSGARCH (version 0.17.7)

create.spec: Model specification

Description

Function for creating a model specification before fitting and using the R package MSGARCH functionalities.

Usage

create.spec(model = c("sGARCH", "sGARCH"), distribution = c("norm", "norm"), do.skew = c(FALSE, FALSE), do.mix = FALSE, do.shape.ind = FALSE)

Arguments

model
Vector (of size K) containing the variance model specifications. Valid models are "sGARCH", "eGARCH", "gjrGARCH", "tGARCH", and "GAS". (Default: model = c("sGARCH", "sGARCH"))
distribution
Vector (of size K) of conditional densities. Valid distribution are "norm", "std", and "ged". The vector must be of the same length as the models vector. (Default: distribution = c("norm", "norm"))
do.skew
Vector (of size K) of boolean indicating if the conditional density is skewed. The vector must be of the same length as the distributions vector. (Default: do.skew = c(FALSE, FALSE))
do.mix
Boolean indicating if the specification is a mixture type. If the argument is TRUE, a Mixture of GARCH is created, while if the argument is FALSE, a Markov-Switching GARCH is created (see details). (Default: do.mix = FALSE)
do.shape.ind
Boolean indicating if the distribution are Regime-Independent. If the argument is TRUE, all distributions are the same and the distribution parameters does not dependent on the regime in which the distribution is attributed to. If the argument is TRUE, all distributions in the distribution argument and all skew argument must be the same. (Default: do.shape.ind = FALSE)

Value

A list of class MSGARCH_SPEC containing variables related to the created specification. The list contains:
  • theta0 : Vector (of size d) of default parameters.
  • is.mix : Boolean indicating if the specification is a mixture.
  • is.shape.ind : Boolean indicating if the distribution parameters are regime-independent.
  • K : Number of regimes.
  • sigma0 : Default variance-covariance matrix (of size K x K) used for the Bayesian esimation.
  • lower : Vector (of size d) of lower parameters bound.
  • upper : Vector (of size d) of upper parameters bound.
  • ineqlb : Vector (of size d) of lower inequality bound.
  • inequb : Vector (of size d) of upper inequality bound.
  • n.params : Vector (of size K) of the total number of parameters by regime including distribution parameters.
  • n.params.vol : Vector (of size K) of the total number of parameters by regime excluding distribuion parameters.
  • do.init : Boolean indicating the default do.init argument.
  • label : Vector (of size d) of parameters label.
  • name : Vector (of size K) of model specification name.
  • func : List of R functions internaly used.
  • rcpp.func : List of Rcpp functions internaly used.
The MSGARCH_SPEC class possesses these methods:
  • sim : Simulation method.
  • simahead : Step ahead simulation method.
  • ht : Conditional volatility in each regime.
  • kernel : Kernel method.
  • unc.vol : Unconditional volatility in each regime.
  • pred : Predictive method.
  • pit : Probability Integral Transform.
  • risk : Value-at-Risk And Expected-Shortfall methods.
  • pdf : Probability density function.
  • cdf : Cumulative function.
  • Pstate : State probabilities filtering method.
  • fit.mle : Maximum Likelihood estimation.
  • fit.bayes : Bayesian estimation.
  • print and summary : Summary of the created specification.

Details

The Markov-Switching specification created is based on the Haas et al. (2004a) MSGARCH specification. It is a MSGARCH model that is separated in K single-regimes specifications which are updated in parallel. Under this specification, the conditional variance is a function of the past data and the current state. The Mixture of GARCH option is based on the Haas et al. (2004b). A Mixture of GARCH is a mixture of distribution where the variance process of each distribution is a single-regime process. Every single-regime specification is a one-lag process (e.g., GARCH(1,1)) since it has proved to be sufficient in financial econometrics and it reduces models complexity which can become a problem during the optimization procedure

References

Bollerslev, T. (1986). Generalized Autoregressive Conditional Heteroskedasticity. Journal of Econometrics, 31, pp. 307-327.

Creal, D. Koopman, S. J. & Lucas, A. (2013). Generalized Autoregressive Score Models with Applications. Journal of Applied Econometrics, 28, pp. 777-795.

Fernandez, C. & Steel, M. F. (1998). On Bayesian Modeling of Fat Tails and Skewness. Journal of the American Statistical Association, 93, pp. 359-371.

Glosten, L. R. Jagannathan, R. & Runkle, D. E. (1993). On the Relation Between the Expected Value and the Volatility of the Nominal Excess Return on Stocks. Journal of Finance, 48, pp. 1779-1801.

Haas, M. Mittnik, S. & Paolella, M. S. (2004a). A New Approach to Markov-Switching GARCH Models. Journal of Financial Econometrics, 2, pp. 493-530.

Haas, M. Mittnik, S. & Paolella, M. S. (2004b). Mixed Normal Conditional Heteroskedasticity. Journal of Financial Econometrics, 2, pp. 211-250.

Nelson, D. B. (1991). Conditional Heteroskedasticity in Asset Returns: A New Approach. Econometrica, 59, pp. 347-370.

Zakoian, J.-M. (1994). Threshold Heteroskedastic Models. Journal of Economic Dynamics and Control, 18, pp. 931-955.

Examples

Run this code
# create model specification
spec = MSGARCH::create.spec(model = c("sGARCH","gjrGARCH"), distribution = c("norm","std"),
                             do.skew = c(TRUE,FALSE), do.mix = FALSE, do.shape.ind = FALSE) 
print(spec)

Run the code above in your browser using DataLab