Learn R Programming

MSGARCH (version 0.17.7)

fit.mle: ML estimation.

Description

Method that performs Maximum Likelihood estimation of a MSGARCH_SPEC object on a set of observations.

Usage

fit.mle(spec, y, ctr = list())

Arguments

spec
Model specification created with create.spec.
y
Vector (of size T) of observations.
ctr
List of control parameters. The control parameters have two components to it:
  • do.init : Boolean indicating if there is a pre-optimization with the R package DEoptim (Ardia et al., 2011). (Default: do.init = FALSE)
  • NP : Number of parameter vectors in the population in DEoptim optimization. (Default: NP = 200)
  • itermax : Maximum iteration (population generation) allowed in DEoptim optimization. (Default: maxit = 200)
  • theta0 : Starting value for the chain (if empty the specification default value are used).
  • do.enhance.theta0 : Boolean indicating if the default parameters value are enhance using y variance. (Default: do.enhance.theta0 = TRUE)

Value

A list of class MSGARCH_MLE_FIT containing five components:
  • theta : Optimal parameters (vector of size d).
  • log_kernel : log-kernel of y given the optimal parameters.
  • spec : Model specification of class MSGARCH_SPEC created with create.spec.
  • is.init : Indicating if estimation was made with do.init option.
  • y : Vector (of size T) of observations.
The MSGARCH_MLE_FIT contains these methods:
  • AIC : Compute Akaike information criterion (AIC).
  • BIC : Compute Bayesian information criterion (BIC).
  • 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.
  • simahead : Step ahead simulation method.
  • sim : Simulation method.
  • pdf : Probability density function.
  • cdf : Cumulative function.
  • Pstate : State probabilities filtering method.
  • summary : Summary of the fit.

Details

The Maximum likelihood estimation uses the R package nloptr (Johnson, 2014) for main optimizer while it uses the R package DEoptim when do.init = TRUE as an initialization for nloptr. The starting parameters are the specification default parameters. The argument do.enhance.theta0 uses the volatilities of rolling windows of y and adjust the starting parameters of the specification so that the unconditional volatility of each regime is set to different quantiles of the volatilities of the rolling windows of y.

References

Ardia, D. Boudt, K. Carl, P. Mullen, K. M. & Peterson, B. G. (2011). Differential Evolution with DEoptim. R Journal, 3, pp. 27-34

Ardia, D. Mullen, K. M. Peterson, B. G. & Ulrich, J. (2015). DEoptim: Differential Evolution in R. https://cran.r-project.org/package=DEoptim

Mullen, K. M. Ardia, D. Gil, D. L. Windover, D. Cline, J.(2011) DEoptim: An R Package for Global Optimization by Differential Evolution. Journal of Statistical Software, 40, pp. 1-26, DOI: http://dx.doi.org/10.18637/jss.v040.i06

Johnson, S. G. (2014). The NLopt Nonlinear-Optimization. https://cran.r-project.org/package=nloptr.

Examples

Run this code
# load data
data("sp500")
sp500 = sp500[1:1000]

# create model specification
spec = MSGARCH::create.spec() 

# fit the model on the data with ML estimation using DEoptim intialization
set.seed(123)
fit = MSGARCH::fit.mle(spec = spec, y = sp500)
summary(fit)

Run the code above in your browser using DataLab