GM_X_loglik {rumidas} | R Documentation |
GARCH-MIDAS-X log-likelihood (with skewness)
Description
Obtains the log-likelihood of the GARCH-MIDAS-X, with an asymmetric term linked to past negative returns, according to two errors' conditional distributions: Normal and Student-t. For details, see Engle et al. (2013) and Conrad and Loch (2015).
Usage
GM_X_loglik(param, daily_ret, X, mv_m, K, distribution, lag_fun = "Beta")
Arguments
param |
Vector of starting values. |
daily_ret |
Daily returns, which must be an "xts" object. |
X |
Additional "X" variable, which must be an "xts" object. Morever, "X" must be observed for the same days of daily_ret. |
mv_m |
MIDAS variable already transformed into a matrix, through |
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
Conrad C, Loch K (2015).
“Anticipating Long-Term Stock Market Volatility.”
Journal of Applied Econometrics, 30(7), 1090–1114.
doi:10.1002/jae.2404.
Engle RF, Ghysels E, Sohn B (2013).
“Stock market volatility and macroeconomic fundamentals.”
Review of Economics and Statistics, 95(3), 776–797.
doi:10.1162/REST_a_00300.
See Also
Examples
# conditional density of the innovations: normal
start_val<-c(alpha=0.01,beta=0.8,gamma=0.05,z=0.1,m=0,theta=0.1,w2=2)
r_t<-sp500['2005/2010']
X<-rv5['2005/2010']^0.5
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
sum(GM_X_loglik(start_val,r_t,X=X,mv_m,K=12,distribution="norm"))
# conditional density of the innovations: Student-t
start_val<-c(alpha=0.01,beta=0.8,gamma=0.05,z=0.1,m=0,theta=0.1,w2=2,shape=5)
r_t<-sp500['2005/2010']
X<-rv5['2005/2010']^0.5
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
sum(GM_X_loglik(start_val,r_t,X=X,mv_m,K=12,distribution="std"))