DAGM_loglik_no_skew {rumidas} | R Documentation |
DAGM log-likelihood (without skewness)
Description
Obtains the log-likelihood of the DAGM, without the asymmetric term linked to past negative returns, according to two errors' conditional distributions: Normal and Student-t. For details, see Amendola et al. (2019).
Usage
DAGM_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 |
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
Amendola A, Candila V, Gallo GM (2019). “On the asymmetric impact of macro–variables on volatility.” Economic Modelling, 76, 135–152. doi:10.1016/j.econmod.2018.07.025.
See Also
Examples
# conditional density of the innovations: normal
start_val<-c(alpha=0.01,beta=0.80,gamma_1=0.05,m=0,theta_pos=0,w2_pos=1.1,theta_neg=0,w2_neg=1.1)
r_t<-sp500['2005/2010']
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
sum(DAGM_loglik(start_val,r_t,mv_m,K=12,distribution="norm"))
# conditional density of the innovations: Student-t
start_val<-c(0.01,0.80,0.05,0,0,1.1,0,1.1,5)
r_t<-sp500['2005/2010']
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
sum(DAGM_loglik(start_val,r_t,mv_m,K=12,distribution="std"))