Skip to content
All library documents

Approximating VECM-GARCH with Equation-Wise GARCH and Multivariate Models

Article Quant Q&A · Author: Nils

Summary

The discussion addresses the lack of a direct implementation for a VECM-GARCH model in R and outlines a possible approximation. First estimate an error-correction term, for example with the Johansen procedure, then specify separate conditional mean and GARCH variance models for each series. The conditional mean can include own and cross-series lags as well as the error-correction term. These component models can then be combined using a multivariate GARCH framework such as DCC, GO-GARCH, or copula GARCH.

This approach is a simplification rather than a full VECM-GARCH estimate. Fitting univariate components first neglects off-diagonal conditional variance terms at that stage, and the answer notes uncertainty about selecting autoregressive order while accounting for conditional variance. It offers a modeling route and names relevant R package functions, but does not provide complete fitting code or empirical validation. Suitability depends on whether the simplifications are acceptable for the analysis.

Key ideas

  • A direct VECM-GARCH implementation in R was not identified in the response.
  • A possible workaround estimates an error-correction term first and includes it in equation-wise conditional mean models.
  • Univariate GARCH components can be combined through multivariate structures such as DCC, GO-GARCH, or copula GARCH.
  • The staged approach neglects some cross-series conditional variance terms during component fitting.
  • Selecting autoregressive order while accounting for conditional variance remains a limitation.

Tags

Full text
# VEC GARCH (1,1) for 4 time series


# VEC GARCH (1,1) for 4 time series












I have to estimate a VEC GARCH(1,1) model in R. I already tried rmgarch, fGarch, ccgarch, mgarch, tsDyn. Has somebody estimated a model like that?

```
library(quantmod)
library(fBasics)
library(rmgarch)
library(fGarch)
library(parallel)
library(ccgarch)
library(mgarch) #from github vst/mgarch
library(tsDyn)
library(ggplot2)
#load data, time series closing prices, 10 year sample
#DAX 30
getSymbols('^GDAXI', src='yahoo', return.class='ts',from="2005-01-01",    to="2015-01-31")
GDAXI.DE=GDAXI[ , "GDAXI.Close"]
#S&P 500
getSymbols('^GSPC', src='yahoo', return.class='ts',from="2005-01-01", to="2015-01-31")
GSPC=GSPC[ , "GSPC.Close"]
#Credit Suisse Commodity Return Strat I
getSymbols('CRSOX', src='yahoo', return.class='ts',from="2005-01-01", to="2015-01-31")
CRSOX=CRSOX[ , "CRSOX.Close"]
#iShares MSCI Emerging Markets
getSymbols('EEM', src='yahoo', return.class='ts',from="2005-01-01", to="2015-01-31")
EEM=EEM[ , "EEM.Close"]
#calculating log returns of the time series
log_r1=diff(log(GDAXI.DE[39:2575]))
log_r2=diff(log(GSPC))
log_r3=diff(log(CRSOX))
log_r4=diff(log(EEM))
#return matrix
r_t=data.frame(log_r1, log_r2,log_r3, log_r4)
#GARCH estimation
#eGarch(1,1), not multivariate

#Vec Garch(1,1)
Est1=VECM(r_t,lag=1, estim="ML" )
print(Est1)
```

I think the VECM operator isn't useful for my purpose since I need a martrix of 4x4 for alpha and one 4x4 for beta plus 4x1 vector for omega. Can somebody help with a package or code?

## Answer by Richard Hardy (score 2)

https://quant.stackexchange.com/a/24535

VECM-GARCH models do not seem to be implemented in R as of now. However, if you are willing to accept some simplifications, you could perhaps be fine with the existing functionality.

Take, for example, the "rmgarch" package in R. It allows combining univariate conditional mean-conditional variance models with several multivariate GARCH models that take individual component models as inputs (DCC, GOGARCH, copula GARCH).

Consider a bivariate system $(x_{1,t},x_{2,t})$. You could use the functions `ugarchspec` and `ugarchfit` from the "rugarch" package to specify and fit individual models for $x_{1,t}$ and $x_{2,t}$ separately. These models would have

- a conditional mean part that would include own lags, lags of the other series and an error correction term via the argument `external.regressors` and

- a conditional variance part that would be the GARCH model of your choice.

You would have to estimate the error correction term in advance using, say, the Johansen procedure (function `ca.jo` in "vars" package).

So far you would in effect have specified and estimated a VEC model equation by equation, paying attention to the conditional heteroskedasticity via the univariate GARCH models (although the off-diagonal element of the conditional variance matrices would be neglected).

Given the specified component models, you would supply them to the relevant function in the "rmgarch" package to build the multivariate GARCH model of your choice (DCC, GOGARCH or copula GARCH).

One unpleasant aspect of this procedure is that it is not clear how you would select the autoregressive order incorporating the information from the conditional variance part. You could still select the autoregressive order by just neglecting the conditional variance part, though.

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.