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 mv_into_mat function. NULL by default

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:

x_{i,t}= \mu_{i,t}\epsilon_{i,t} = \tau_{t} \xi_{i,t} \epsilon_{i,t},

where

The short–run component of the MEM-MIDAS-X is:

\xi_{i,t}=(1-\alpha-\gamma/2-\beta) + \left(\alpha + \gamma \cdot {I}_{\left(r_{i-1,t} < 0 \right)}\right) \frac{x_{i-1,t}}{\tau_t} + \beta \xi_{i-1,t} + \delta \left(Z_{i-1,t}-E(Z)\right),

where I_{(\cdot)} is an indicator function, r_{i,t} is the daily return of the day i of the period t and Z is an additional X term (for instance, the VIX). When the X part is absent, then the parameter \delta cancels. The long-run component of the MEM-MIDAS and MEM-MIDAS-X is:

\tau_{t} = \exp \left\{ m + \theta \sum_{k=1}^K \delta_{k}(\omega) X_{t-k}\right\},

where X_{t} is the MIDAS term. When the "skew" parameter is set to "NO", \gamma disappears. The MEM and MEM-X models do not have the long- and short-run components. Therefore, they directly evolve according to \mu_{i,t}. When the "skew" and X parameters are present, the MEM-X is:

\mu_{i,t}= \left(1-\alpha - \gamma / 2 - \beta \right)\mu + (\alpha + \gamma I_{\left(r_{i-1,t} < 0 \right)}) x_{i-1,t} + \beta \mu_{i-1,t}+\delta \left(Z_{i-1,t}-E(Z)\right),

where \mu=E(x_{i,t}). When the "skew" parameter is set to "NO", in the previous equation \gamma cancels. Finally, when the additional X part is not present, then we have the MEM model, where \delta 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:

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

mv_into_mat.

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


[Package rumidas version 0.1.2 Index]