GM_loglik_no_skew: GARCH-MIDAS log-likelihood (no skewness)

View source: R/midas_functions.R

GM_loglik_no_skewR Documentation

GARCH-MIDAS log-likelihood (no skewness)

Description

Obtains the log-likelihood of the GARCH-MIDAS, according to two errors' conditional distributions: Normal and Student-t. For details, see \insertCiteengle_ghysels_sohn_2013;textualrumidas and \insertCiteconrad_lock_2015;textualrumidas.

Usage

GM_loglik_no_skew(param, daily_ret, mv_m, K, distribution, lag_fun = "Beta")

Arguments

param

Vector of starting values.

daily_ret

Daily returns, which must be an "xts" object.

mv_m

MIDAS variable already transformed into a matrix, through mv_into_mat function.

K

Number of (lagged) realizations of the MIDAS variable to consider.

distribution

The conditional density to use for the innovations. At the moment, valid choices are "norm" and "std", for the Normal and Student-t distributions.

lag_fun

optional. Lag function to use. Valid choices are "Beta" (by default) and "Almon", for the Beta and Exponential Almon lag functions, respectively.

Value

The resulting vector is the log-likelihood value for each i,t.

References

\insertAllCited

See Also

mv_into_mat.

Examples


# conditional density of the innovations: normal
start_val<-c(alpha=0.01,beta=0.8,m=0,theta=0.1,w2=2)
r_t<-sp500['2005/2010']
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
sum(GM_loglik_no_skew(start_val,r_t,mv_m,K=12,distribution="norm"))

# conditional density of the innovations: Student-t
start_val<-c(alpha=0.01,beta=0.8,m=0,theta=0.1,w2=2,shape=5)
r_t<-sp500['2005/2010']
mv_m<-mv_into_mat(r_t,indpro,K=12,"monthly")
sum(GM_loglik_no_skew(start_val,r_t,mv_m,K=12,distribution="std"))


rumidas documentation built on April 4, 2025, 1:01 a.m.