# \donttest{
# estimate a GARH-MIDAS model, without the skewness parameter
r_t<-sp500['2008']
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
fit<-ugmfit(model="GM",skew="NO",distribution="norm",r_t,mv_m,K=12)
fit
summary.rumidas(fit)
names(fit)
# to see the estimated coefficients with the QML standard errors:
fit$rob_coef_mat
# estimate a DAGM model, with the skewness parameter,
# including the volatility proxy (realized variance), and
# leaving the last 100 observations for the out-of-sample evaluation
r_t<-sp500['2002/2020']
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
fit_2<-ugmfit(model="DAGM",skew="YES",distribution="norm",r_t,
mv_m,K=12,vol_proxy=rv5['2002/2020'],out_of_sample=100)
fit_2
summary.rumidas(fit_2)
# estimate a GM-X model, without the skewness parameter
r_t<-sp500['2010/2013']
X<-vix['2010/2013']
mv_m<-mv_into_mat(r_t,diff(indpro),K=36,"monthly")
fit_3<-ugmfit(model="GMX",skew="NO",distribution="norm",r_t,mv_m,K=36,X=X)
summary.rumidas(fit_3)
# }
Run the code above in your browser using DataLab