Learn R Programming

MSGARCH (version 0.17.7)

ht: Conditional variance in each regime.

Description

Method returning the conditional variance of each regime.

Usage

ht(object, theta, y)

Arguments

object
Model specification of class MSGARCH_SPEC created with create.spec or fit object of type MSGARCH_MLE_FIT created with fit.mle or MSGARCH_BAY_FIT created with fit.bayes.
theta
Vector (of size d) or matrix (of size M x d) of parameter estimates (not require when using a fit object).
y
Vector (of size T) of observations (not require when using a fit object).

Value

Condititional variance (array of size (T + 1) x M x K) in each regime.

Details

If a matrix of parameter estimates is given, each parameter estimates is evaluated individually.

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)

# Compute the conditional variance
ht = MSGARCH::ht(object = fit)

plot(ht)

Run the code above in your browser using DataLab