umemfit {rumidas} | R Documentation |
Methods for obtaining (and evaluating) a variety of MEM(-MIDAS)-based models
Description
Estimates several MEM and MEM-MIDAS-based models. For details, see Amendola et al. (2024)
Usage
umemfit(
model,
skew,
x,
daily_ret = NULL,
mv_m = NULL,
K = NULL,
z = NULL,
out_of_sample = NULL,
R = 100
)
Arguments
model |
Model to estimate. Valid choices are: "MEMMIDAS" for MEM-MIDAS, "MEM" for base MEM, "MEMX" for the base MEM with an X term, "MEMMIDASX" for the MEM-MIDAS-X |
skew |
The skewness parameter linked to lagged daily returns. Valid choices are: "YES" and "NO" |
x |
Dependent variable to predict. Usually the realized volatility. It must be positive and "xts" object |
daily_ret |
optional. Daily returns, which must be an "xts" object. NULL by default |
mv_m |
optional. MIDAS variable already transformed into a matrix, through |
K |
optional. Number of (lagged) realizations of the MIDAS variable to consider. NULL by default for the Beta and Exponential Almon lag functions, respectively |
z |
optional. Additional daily variable, which must be an "xts" object, and with the same length of x. NULL by default |
out_of_sample |
optional. A positive integer indicating the number of periods before the last to keep for out of sample forecasting |
R |
optional. A positive integer indicating the number of replications used to find the best starting values. Equal to 100 by default |
Details
Function umemfit
implements the estimation and evaluation of the MEM, MEM-MIDAS MEM-X and MEM-MIDAS-X models,
with and without the asymmetric term linked to negative lagged daily returns. The general framework assumes that:
where
-
is a time series coming from a non-negative discrete time process for the
-th day (
) of the period
(for example, a week, a month or a quarter;
);
-
is the long-run component, determining the average level of the conditional mean, varying each period
;
-
is a factor centered around one, labelled as the short–run term, which plays the role of dumping or amplifying
;
-
is an
error term which, conditionally on the information set, has a unit mean, an unknown variance, and a probability density function defined over a non-negative support.
The short–run component of the MEM-MIDAS-X is:
where is an indicator function,
is the daily return of the day
of the period
and
is
an additional X term (for instance, the VIX). When the X part is absent, then the parameter
cancels.
The long-run component of the MEM-MIDAS and MEM-MIDAS-X is:
where is the MIDAS term. When the "skew" parameter is set to "NO",
disappears.
The MEM and MEM-X models do not have the long- and short-run components. Therefore, they directly evolve according to
.
When the "skew" and X parameters are present, the MEM-X is:
where . When the "skew" parameter is set to "NO", in the previous equation
cancels.
Finally, when the additional X part is not present, then we have the MEM model, where
disappears.
Value
umemfit
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.
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 dependent variable.
est_in_s: The in-sample predicted dependent variable.
est_lr_in_s: The in-sample predicted long-run component (if present) of the dependent variable.
loss_oos: The out-of-sample MSE and QLIKE averages, calculated considering the distance with respect to the dependent variable.
est_oos: The out-of-sample predicted dependent variable.
est_lr_oos: The out-of-sample predicted long-run component (if present) of the dependent variable.
References
Amendola A, Candila V, Cipollini F, Gallo GM (2024). “Doubly multiplicative error models with long-and short-run components.” Socio-Economic Planning Sciences, 91, 101764. doi:10.1016/j.seps.2023.101764.
See Also
Examples
# estimate the base MEM, without the asymmetric term linked to negative lagged returns
real<-(rv5['2003/2010'])^0.5 # realized volatility
fit<-umemfit(model="MEM",skew="NO",x=real)
fit
summary.rumidas(fit)
# to see the estimated coefficients with the QML standard errors:
fit$rob_coef_mat
# All the other elements of fit are:
names(fit)
# estimate the MEM-MIDAS, with the asymmetric term linked to negative lagged returns,
# leaving the last 200 observations for the out-of-sample analysis
r_t<-sp500['2003/2010']
real<-(rv5['2003/2010'])^0.5 # realized volatility
mv_m<-mv_into_mat(real,diff(indpro),K=12,"monthly")
fit_2<-umemfit(model="MEMMIDAS",skew="YES",x=real,daily_ret=r_t,mv_m=mv_m,K=12,out_of_sample=200)
fit_2
summary.rumidas(fit_2)
# to see the estimated coefficients with the QML standard errors:
fit_2$rob_coef_mat