Package 'rumidas'

Title: Univariate GARCH-MIDAS, Double-Asymmetric GARCH-MIDAS and MEM-MIDAS
Description: Adds the MIxing-Data Sampling (MIDAS, Ghysels et al. (2007) <doi:10.1080/07474930600972467>) components to a variety of GARCH and MEM (Engle (2002) <doi:10.1002/jae.683>, Engle and Gallo (2006) <doi:10.1016/j.jeconom.2005.01.018>, and Amendola et al. (2024) <doi:10.1016/j.seps.2023.101764>) models, with the aim of predicting the volatility with additional low-frequency (that is, MIDAS) terms. The estimation takes place through simple functions, which provide in-sample and (if present) and out-of-sample evaluations. 'rumidas' also offers a summary tool, which synthesizes the main information of the estimated model. There is also the possibility of generating one-step-ahead and multi-step-ahead forecasts.
Authors: Vincenzo Candila [aut, cre]
Maintainer: Vincenzo Candila <[email protected]>
License: GPL-3
Version: 0.1.2
Built: 2024-12-14 06:36:01 UTC
Source: CRAN

Help Index


Beta function

Description

Represents a tool able to accommodate various lag structures for the additional MIDAS variable observed each "low-frequency" period tt. It can have a monotonically increasing, decreasing weighting scheme or a hump-shaped weighting scheme. The Beta function is:

δk(ω)=(k/K)ω11(1k/K)ω21j=1K(j/K)ω11(1j/K)ω21.\delta_k(\omega)=\frac{(k/K)^{\omega_1-1} (1-k/K)^{\omega_2-1}}{\sum_{j=1}^K (j/K)^{\omega_1-1}(1-j/K)^{\omega_2-1}}.

For additional details, see Ghysels et al. (2007).

Usage

beta_function(k, K, w1, w2)

Arguments

k

Lag of interest.

K

Number of (lagged) realizations to consider.

w1, w2

Parameters governing the weights of each kk lag.

Value

The weights associated to each lag kk, with k=1,,Kk=1,\cdots,K.

References

Ghysels E, Sinko A, Valkanov R (2007). “MIDAS regressions: Further results and new directions.” Econometric Reviews, 26(1), 53–90. doi:10.1080/07474930600972467.

Examples

# suppose to have four lags: 
# K<-4 
# w1<-1	# by setting w1=1, only a monotonically decreasing weighting scheme is allowed
	#(more recent observations weigh more)
# w2<-5
beta_function(1:4,K=4,w1=1,w2=5)

Exponential Almon Lag

Description

Represents a tool able to accommodate various lag structures for the additional MIDAS variable observed each "low-frequency" period tt. It can have a monotonically increasing, decreasing weighting scheme or a hump-shaped weighting scheme. As in Ghysels et al. (2007), here the function form uses only two parameters:

δk(ω1,ω2)=exp(ω1k+ω2k2)k=1Kexp(ω1k+ω2k2).\delta_k(\omega_1, \omega_2) = \frac{exp(\omega_{1}k + \omega_2 k^2)}{\sum_{k=1}^K exp(\omega_1 k + \omega_2 k^2)}.

For additional details, see Almon (1965) and Ghysels et al. (2007).

Usage

exp_almon(k, K, w1, w2)

Arguments

k

Lag of interest.

K

Number of (lagged) realizations to consider.

w1, w2

Parameters governing the weights of each kk lag.

Value

The weights associated to each lag kk, with k=1,,Kk=1,\cdots,K.

References

Almon S (1965). “The distributed lag between capital appropriations and expenditures.” Econometrica: Journal of the Econometric Society, 178–196. doi:10.2307/1911894.

Ghysels E, Sinko A, Valkanov R (2007). “MIDAS regressions: Further results and new directions.” Econometric Reviews, 26(1), 53–90. doi:10.1080/07474930600972467.

Examples

# suppose to have four lags: 
# K<-4 # Note: the number of lags to consider
# w1<-1	
# w2<- -0.5 # by setting w2<0, the monotonically decreasing weighting scheme is used
exp_almon(1:4,K=4,w1=0.1,w2=-0.5)

Monthly U.S. Industrial Production

Description

Monthly data on the U.S. Industrial Production index (IP, index 2012=100, seasonally adjusted) collected from the Federal Reserve Economic Data (FRED) archive. The IP has been used as MIDAS term in different contributions (see, for instance, Engle et al. (2013), Conrad and Loch (2015), and Amendola et al. (2017)).

Usage

data(indpro)

Format

An object of class "xts".

Source

Archive of the Federal Reserve Economic Data (FRED)

References

Amendola A, Candila V, Scognamillo A (2017). “On the influence of US monetary policy on crude oil price volatility.” Empirical Economics, 52(1), 155–178. doi:10.1007/s00181-016-1069-5.

Conrad C, Loch K (2015). “Anticipating Long-Term Stock Market Volatility.” Journal of Applied Econometrics, 30(7), 1090–1114. doi:10.1002/jae.2404.

Engle RF, Ghysels E, Sohn B (2013). “Stock market volatility and macroeconomic fundamentals.” Review of Economics and Statistics, 95(3), 776–797. doi:10.1162/REST_a_00300.

Examples

head(indpro)
summary(indpro)
plot(indpro)

Multi–step–ahead predictions of the GARCH–MIDAS–based models with and without the '–X' part.

Description

Calculates the multi–step–ahead predictions for the GARCH–MIDAS and DAGM models, according to the procedure suggested by Amendola et al. (2021).

Usage

multi_step_ahead_pred(est, h, X = NULL)

Arguments

est

The estimation object as resulting by the ugmfit function

h

The length of the multi-step-ahead predictions

X

optional. The '–X' variable. NULL by default. It hat to be equal to the 'X' used in the ugmfit function

Details

The multi–step–ahead procedure calculates the volatility predictions keeping fixed the information set at the last observation available and projecting forward the forecasts. The procedure calculates the volatility predictions conditionally to the parameters estimated in the in-sample period. Therefore, the estimation object (through the ugmfit function) has to be provided. For additional details, see Eq. (20) in Amendola et al. (2021).

Value

The multi-step-ahead predictions, for the following h days, starting from the last day of the chosen in-sample period adopted in the 'est' object.

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.

Examples

r_t<-sp500['2008']
X<-(rv5['2008'])^0.5
mv_m<-mv_into_mat(r_t,diff(indpro),K=12,"monthly") 
fit<-ugmfit(model="GMX",skew="YES",distribution="norm",r_t,mv_m,K=12,X=X)
### ten days predictions
multi_step_ahead_pred(fit,h=10,X)

MIDAS variable matrix transformation

Description

Implements the transformation of the MIDAS variable into a matrix, whose dimension is (K+1)×N(K+1) \times N, where KK is the number of lagged realizations to consider and NN is the length of the variable xx.

Usage

mv_into_mat(x, mv, K, type)

Arguments

x

Variable according to which the MIDAS term has to be aligned. It must be an 'xts' object.

mv

MIDAS variable, observed each period tt. It must be an 'xts' object.

K

Number of (lagged) realizations of the MIDAS variable to consider.

type

The frequency of the period of observations for the MIDAS variable. It can be 'weekly', 'monthly', 'quarterly' or 'yearly'.

Value

The resulting matrix has as many rows as the number of lagged realizations (plus one) of the MIDAS variable to consider, and as many columns as the length of xx.

Examples

# weekly frequency
# obtain weekly MIDAS variable after daily aggregation
RV_weekly_sum<-apply.weekly(rv5^0.5,sum) #realized volatility
# then allocate correctly the information
RV_weekly<-as.xts(coredata(RV_weekly_sum),seq(as.Date("2000-01-10"), 
by = "week", length.out = length(RV_weekly_sum)))
# use mv_into_mat 
mv_into_mat(sp500['2002/2003-12-26'],diff(RV_weekly['/2003-12']),K=4,type="weekly")

# monthly frequency
r_t<-sp500['2005/2010']
mv_into_mat(r_t,diff(indpro),K=12,type="monthly")

# quarterly frequency
RV_quarterly_sum<-apply.quarterly(rv5,sum)
RV_quarterly<-as.xts(coredata(RV_quarterly_sum),seq(as.Date("2000-04-01"), 
by = "quarter", length.out = length(RV_quarterly_sum)))
mv_into_mat(sp500['2004/2010'],diff(RV_quarterly),K=10,type="quarterly")

# yearly frequency
RV_yearly_sum<-apply.yearly(rv5,sum)
RV_yearly<-as.xts(coredata(RV_yearly_sum),seq(as.Date("2001-01-01"), 
by = "year", length.out = length(RV_yearly_sum)))
mv_into_mat(sp500['2006/2010'],diff(RV_yearly),K=2,type="yearly")

S&P 500 realized variance at 5-minutes

Description

Daily data on the realized variance of the S&P 500 collected from the realized library of the Oxford-Man Institute (Heber et al. 2009). The realized variance has been calculated using intradaily intervals of five minutes (Andersen and Bollerslev 1998).

Usage

data(rv5)

Format

An object of class "xts".

Source

Realized library of the Oxford-Man Institute

References

Andersen TG, Bollerslev T (1998). “Answering the Skeptics: Yes, Standard Volatility Models do Provide Accurate Forecasts.” International Economic Review, 39, 885–905. doi:10.2307/2527343.

Heber G, Lunde A, Shephard N, Sheppard K (2009). “OMI's realised library, version 0.1.” Oxford–Man Institute, University of Oxford.

Examples

head(rv5)
summary(rv5)
plot(rv5)

S&P 500 daily log-returns

Description

Daily data on S&P 500 collected from the realized library of the Oxford-Man Institute (Heber et al. 2009).

Usage

data(sp500)

Format

An object of class "xts".

Source

Realized library of the Oxford-Man Institute

References

Heber G, Lunde A, Shephard N, Sheppard K (2009). “OMI's realised library, version 0.1.” Oxford–Man Institute, University of Oxford.

Examples

head(sp500)
summary(sp500)
plot(sp500)

Summary method for 'rumidas' class

Description

Summary method for 'rumidas' class

Usage

## S3 method for class 'rumidas'
summary(object, ...)

Arguments

object

An object of class 'rumidas', that is the result of a call to ugmfit or umemfit.

...

Additional arguments affecting the summary produced.

Examples

r_t<-sp500['2003/2010']
real<-(rv5['2003/2010'])^0.5		# realized volatility
fit<-umemfit(model="MEM",skew="NO",x=real)
summary.rumidas(fit)

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_into_mat function

mv_m_2

optional second MIDAS variable already transformed into a matrix, through mv_into_mat function

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:

ri,t=τt×gi,tϵi,t,r_{i,t}= \sqrt{\tau_t \times g_{i,t} } \epsilon_{i,t},

where

  • ri,tr_{i,t} is the daily return for the ii-th day (i=1,,Nti = 1, \ldots, N_t) of the period tt (for example, a week, a month or a quarter; t=1,,Tt = 1 , \ldots, T);

  • τt\tau_{t} is the long-run component, varying each period tt;

  • gi,tg_{i,t} is the short–run term, varying each day ii of the period tt;

  • ϵi,t\epsilon_{i,t} is an iidiid 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"):

gi,t=(1αγ/2β)+(α+γI(ri1,t<0))(ri1,t)2τt+βgi1,t,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()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:

gi,t=(1αγ/2β)+(α+γI(ri1,t<0))(ri1,t)2τt+βgi1,t+z(Xi1,tE(Xi1,t)).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:

τt=exp{m+θj=1Kδj(ω)Xtj},\tau_{t} = \exp \left\{ m + \theta \sum_{j=1}^K \delta_{j}(\omega) X_{t-j}\right\},

where XtX_{t} is the MIDAS term and δj(ω)\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:

τt=exp(m+θ+k=1Kδk(ω)+XtkI(Xtk0)+θk=1Kδk(ω)XtkI(Xtk<0)).\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: τ^t×g^i,t\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: τ^t×g^i,t\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

mv_into_mat.

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)

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:

xi,t=μi,tϵi,t=τtξi,tϵi,t,x_{i,t}= \mu_{i,t}\epsilon_{i,t} = \tau_{t} \xi_{i,t} \epsilon_{i,t},

where

  • xi,tx_{i,t} is a time series coming from a non-negative discrete time process for the ii-th day (i=1,,Nti = 1, \ldots, N_t) of the period tt (for example, a week, a month or a quarter; t=1,,Tt = 1 , \ldots, T);

  • τt\tau_{t} is the long-run component, determining the average level of the conditional mean, varying each period tt;

  • ξi,t\xi_{i,t} is a factor centered around one, labelled as the short–run term, which plays the role of dumping or amplifying τi,t\tau_{i,t};

  • ϵi,t\epsilon_{i,t} is an iidiid 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:

ξi,t=(1αγ/2β)+(α+γI(ri1,t<0))xi1,tτt+βξi1,t+δ(Zi1,tE(Z)),\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()I_{(\cdot)} is an indicator function, ri,tr_{i,t} is the daily return of the day ii of the period tt and ZZ 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:

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

where XtX_{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 μi,t\mu_{i,t}. When the "skew" and X parameters are present, the MEM-X is:

μi,t=(1αγ/2β)μ+(α+γI(ri1,t<0))xi1,t+βμi1,t+δ(Zi1,tE(Z)),\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 μ=E(xi,t)\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:

  • 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

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

VIX daily data

Description

Daily data on VIX collected from Yahoo Finance site. The VIX data have been de-annualized and multiplied by 1001100^{-1}.

Usage

data(vix)

Format

An object of class "xts".

Source

Yahoo Finance

Examples

head(vix)
summary(vix)
plot(vix)