View source: R/midas_functions.R
DAGM_cond_vol | R Documentation |
Obtains the conditional volatility for the DAGM, with an asymmetric term linked to past negative returns. For details, see \insertCiteamendola_candila_gallo:2019;textualrumidas.
DAGM_cond_vol(param, daily_ret, mv_m, K, lag_fun = "Beta")
param |
Vector of estimated values. It must be a eight- or nine- dimensional vector. See the examples below. |
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. |
lag_fun |
optional. Lag function to use. Valid choices are "Beta" (by default) and "Almon", for the Beta and Exponential Almon lag functions, respectively. |
The resulting vector is an "xts" object representing the conditional volatility.
mv_into_mat
.
# estimated volatility
est_val<-c(0.01,0.80,0.05,0,0.1,1.1,-0.3,1.1)
r_t<-sp500['2005/2010']
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly")
vol<-DAGM_cond_vol(est_val,r_t,mv_m,K=12)
head(vol)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.