Skip to content
All library documents

Multivariate GARCH-MIDAS with Mixed-Frequency Macro Variables

Article Quant Q&A · Author: anders

Summary

The document raises a software and modeling question about using GARCH-MIDAS to study how financial and macroeconomic variables relate to S&P 500 returns. Its motivation is mixed sampling frequency: daily market data are paired with monthly macroeconomic series. The author surveys several R packages, reports an error from a univariate-oriented package when dates repeat, and asks whether the issue is caused by overlapping observations from a panel of stocks or by the model setup.

No answer or validated implementation is included, so the text does not establish which package supports the desired multivariate specification or how the reported error should be resolved. It mainly highlights an important distinction between multiple explanatory variables in a volatility equation, multiple assets in a multivariate model, and repeated rows in panel data. Package capabilities and data aggregation requirements would need to be checked against the intended model and data structure; the reported error alone does not identify its cause.

Key ideas

  • The question concerns combining daily returns with lower-frequency macroeconomic variables in GARCH-MIDAS.
  • The author seeks support for multiple explanatory variables and possibly a panel of stocks.
  • Repeated dates in panel data may conflict with package assumptions about low-frequency observations.
  • The document provides no tested package recommendation or resolution to the reported error.

Tags

Full text
# Is there any way to estimate a multivariate GARCH-MIDAS model in R?


# Is there any way to estimate a multivariate GARCH-MIDAS model in R?












I'm writing my master thesis in economics, and would like to research the impact of both financial and macroeconomic variables on the S&P500 index. My plan was to use a GARCH model. I've stumbled across the GARCH-MIDAS model which seems perfect, since many macrovariables are only in a monthly format, while the stock return is daily.

I've searched the internet for a R package that can support the model, but all the packages I find are only univariate, while I have several explanatory variables I want to include.

I've looked at the packages `mfGARCH`, `GarchMidas`, `mcsGARCH`, `rumidas`, `rmgarch` and `midasr` (I have attached the packages below), but it seems that none of them both support multiple variables while still estimating GARCH models. Is there something that I have overlooked, or have I simply misunderstand how to use the packages?

- https://cran.r-project.org/web/packages/mfGARCH/mfGARCH.pdf

- https://github.com/JasonZhang2333/GarchMidas/blob/master/README.md

- https://www.unstarched.net/2013/03/20/high-frequency-garch-the-multiplicative-component-garch-mcsgarch-model/

- https://www.researchgate.net/publication/344341685_R_Package_%27rumidas%27_Univariate_GARCH-MIDAS_Double-Asymmetric_GARCH-MIDAS_and_MEM-MIDAS

- https://cran.r-project.org/web/packages/rmgarch/rmgarch.pdf

- https://cran.r-project.org/web/packages/midasr/index.html

I tried using the `mfGARCH` package, but received an error

```
#install.package("devtools") 
#install_github("onnokleen/mfGARCH") 
library(devtools) 
library(mfGARCH) 

fit_mfgarch(data = df, y = "PX_CLOSE_1D", x = "RETURN_ON_ASSET", low.freq = "date", K = 12, x.two = "ROC_WACC_RATIO", K.two = 12, low.freq.two = "date", x.three = "VIX_index", K.three = 365, low.freq.three = "date",x.four = "FDFD_index", K.four = 365, low.freq.four = "date", weighting.four = "beta.restricted")
```

When I did it with just two variables, I got the error

```
> "Error in fit_mfgarch(data = df, y = "PX_CLOSE_1D", x = "RETURN_ON_ASSET", : 
   There is more than one unique observation per low frequency entry."
```

However, I use data from 500 stocks, meaning that there have to be overlapping dates.

When testing with four variables as above, it just reported that there was an error (in my dataset I have 40 variables). Do you have suggestions to what I can do differently, or what other packages I can alternatively use?

Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.