ugmfit {rumidas} | R Documentation |
Methods for obtaining (and evaluating) a variety of GARCH-MIDAS-based models
Description
Estimates several GARCH-MIDAS-based models, according to two errors' conditional distributions: Normal and Student-t, and the presence of asymmetric terms in the short- and long-run components.
Usage
ugmfit(
model,
skew,
distribution,
daily_ret,
mv_m,
mv_m_2 = NULL,
K,
K_2 = NULL,
lag_fun = "Beta",
X = NULL,
out_of_sample = NULL,
vol_proxy = NULL,
R = 100
)
Arguments
model |
Model to estimate. Valid choices are: "GM" for GARCH-MIDAS, "GMX" for GARCH-MIDAS-X, "DAGM" for Double Asymmetric GARCH-MIDAS (DAGM), "DAGM2M" for DAGM with two MIDAS variables, and "DAGMX" for DAGM-X |
skew |
The skewness parameter to include in the short–run equation. Valid choices are: "YES" and "NO" |
distribution |
The conditional density to use for the innovations. At the moment, valid choices are "norm" and "std", for the Normal and Student-t distribution, respectively |
daily_ret |
Daily returns, which must be an "xts" objectparamter |
mv_m |
(first) MIDAS variable already transformed into a matrix, through |
mv_m_2 |
optional second MIDAS variable already transformed into a matrix, through |
K |
Number of (lagged) realizations of the (first) MIDAS variable to consider |
K_2 |
optional Number of (lagged) realizations of the (second) 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 |
X |
optional Additional "X" variable, which must be an "xts" object. Moreover, "X" must be observed for the same days of daily_ret |
out_of_sample |
optional A positive integer indicating the number of periods before the last to keep for out of sample forecasting |
vol_proxy |
optional If present, the 'vol_proxy' is the volatility proxy used for the in-sample and out-of-sample (again, if present) evaluation. It could be the realized variance. If it left unspecified, vol_proxy is replaced by the squared daily returns |
R |
optional. A positive integer indicating the number of replications used to find the best starting values. Equal to 100 by default |
Details
Function ugmfit
implements the estimation and evaluation of the GARCH–MIDAS–based models, with and without the asymmetric term
linked to negative lagged daily returns, according to two distributions for the error term. The general framework assumes that:
r_{i,t}= \sqrt{\tau_t \times g_{i,t} } \epsilon_{i,t},
where
-
r_{i,t}
is the daily return for thei
-th day (i = 1, \ldots, N_t
) of the periodt
(for example, a week, a month or a quarter;t = 1 , \ldots, T
); -
\tau_{t}
is the long-run component, varying each periodt
; -
g_{i,t}
is the short–run term, varying each dayi
of the periodt
; -
\epsilon_{i,t}
is aniid
error term which has a zero mean and unit variance.
The short–run component of the GARCH–MIDAS (parameter "model" set to "GM"), DAGM (parameter "model" set to "DAGM"), and DAGM with two MIDAS variables (parameter "model" set to "DAGM2M") models is as follows. When the parameter "skew" is present (set to "YES"):
g_{i,t} = \left(1-\alpha-\gamma/2-\beta\right) + \left(\alpha + \gamma \cdot I_{\left(r_{i-1,t} < 0 \right)}\right) \frac{\left(r_{i-1,t}\right)^2}{\tau_t} + \beta g_{i-1,t},
where I_{(\cdot)}
is an indicator function.
The short–run component of the GARCH–MIDAS–X (parameter "model" set to "GMX") and DAGM–X (parameter "model" set to "DAGMX"),
when the parameter "skew" is set to "YES", is:
g_{i,t} = \left(1-\alpha-\gamma/2-\beta\right) + \left(\alpha + \gamma \cdot I_{\left(r_{i-1,t} < 0 \right)}\right) \frac{\left(r_{i-1,t}\right)^2}{\tau_t} + \beta g_{i-1,t} + z \cdot \left(X_{i-1,t}- E(X_{i-1,t})\right).
When, for the models GARCH–MIDAS, GARCH–MIDAS–X, DAGM, and DAGM–X, the parameter "skew" is set to "NO", parameter \gamma
disappears.
For details on the GARCH–MIDAS–X and DAGM–X models, see Amendola et al. (2021).
The long-run component of the GARCH-MIDAS and GARCH–MIDAS–X models is:
\tau_{t} = \exp \left\{ m + \theta \sum_{j=1}^K \delta_{j}(\omega) X_{t-j}\right\},
where X_{t}
is the MIDAS term and \delta_{j}(\omega)
is the chosen weighting function,
which can be the Beta (beta_function
) or Exponential Almon lag (exp_almon
) functions.
The long-run component of the DAGM and DAGM–X models is:
\tau_t = \exp \left(m + \theta^{+} \sum_{k=1}^K \delta_k(\omega)^{+} X_{t-k} I_{\left( X_{t-k} \geq 0 \right)} + \theta^{-} \sum_{k=1}^K \delta_k(\omega)^{-} X_{t-k} I_{\left( X_{t-k} < 0 \right)} \right).
Value
ugmfit
returns an object of class 'rumidas'. The function summary.rumidas
can be used to print a summary of the results. Moreover, an object of class 'rumidas' is a list containing the following components:
model: The model used for the estimation.
rob_coef_mat: The matrix of estimated coefficients, with the QML standard errors. For details, see: Bollerslev and Wooldridge (1992).
obs: The number of daily observations used for the (in-sample) estimation.
period: The period of the in-sample estimation.
loglik: The value of the log-likelihood at the maximum.
inf_criteria: The AIC and BIC information criteria.
loss_in_s: The in-sample MSE and QLIKE averages, calculated considering the distance with respect to the volatility proxy (if provided) or the squared daily returns.
est_in_s: The one-step-ahead volatility, for the in-sample period, that is:
\sqrt{\hat{\tau}_t \times \hat{g}_{i,t} }
.est_lr_in_s: The one-step-ahead long-run volatility, for the in-sample period.
loss_oos: The out-of-sample MSE and QLIKE averages, calculated considering the distance with respect to the volatility proxy (if provided) or the squared daily returns.
est_oos: The one-step-ahead volatility, for the out-of-sample period, that is:
\sqrt{\hat{\tau}_t \times \hat{g}_{i,t} }
.est_lr_oos: The one-step-ahead long-run volatility, for the out-of-sample period.
References
Amendola A, Candila V, Gallo GM (2021).
“Choosing the frequency of volatility components within the Double Asymmetric GARCH–MIDAS–X model.”
Economic and Statistics.
doi:10.1016/j.ecosta.2020.11.001.
Bollerslev T, Wooldridge JM (1992).
“Quasi-maximum likelihood estimation and inference in dynamic models with time-varying covariances.”
Econometric Reviews, 11, 143–172.
doi:10.1080/07474939208800229.
See Also
Examples
# 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)