Load data and extract useful information:

data("g2020")
k = ncol(g2020)
NAMES = colnames(g2020)

First, it is shown how the ‘optimal’ univariate GARCH model is selected for EUR. The model with the lowest value is chosen:

# Find the best univariate model for EUR
gs = GARCHselection(g2020$EUR,
  distributions=c("norm","std"),
  models=c("sGARCH", "eGARCH")
)
## A dynamic version of the optimal univariate GARCH selection procedure is implemented according to:
##  Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2021). The impact of Euro through time: Exchange rate dynamics under different regimes. International Journal of Finance & Economics, 26(1), 1375-1408.
## -sGARCH
## --norm
## --std
## -eGARCH
## --norm
## --std
kable(gs$GARCH_IC)
sGARCH eGARCH
norm 207205.4 307192.6
std 107120.6 207121.5

This model is chosen as most criteria are fulfilled. We see that the sign bias test, Portmanteau statistics, VaR, Conditional VaR and VaR duration are not statistically significant which means that the model specification is adequate.

kable(gs$best_table)
x
107120.6
SignBias WARCH(20) VaR CVaR VaR Dur.
statistics 0.6321013 549.5404 2.2520225 -906.7897 1.1142857
pvalues 0.5273552 0.0000 0.1334399 0.9090 0.2314699

Find the best univariate models for all time series. As the DCC-GARCH is often a 2-step estimation model where in the first step all univariate GARCH models are estimated and in a second step the DCC-GARCH parameters, optimizing the univariate GARCH models is a straightforward choice:

ds = DCCGARCHselection(
  g2020,
  distributions=c("std", "ged"),
  models=c("sGARCH", "eGARCH")
)

[1] “EUR”

## A dynamic version of the optimal univariate GARCH selection procedure is implemented according to:
##  Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2021). The impact of Euro through time: Exchange rate dynamics under different regimes. International Journal of Finance & Economics, 26(1), 1375-1408.
## -sGARCH
## --std
## --ged
## -eGARCH
## --std
## --ged

[1] “GBP”

## A dynamic version of the optimal univariate GARCH selection procedure is implemented according to:
##  Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2021). The impact of Euro through time: Exchange rate dynamics under different regimes. International Journal of Finance & Economics, 26(1), 1375-1408.
## -sGARCH
## --std
## --ged
## -eGARCH
## --std
## --ged

[1] “CHF”

## A dynamic version of the optimal univariate GARCH selection procedure is implemented according to:
##  Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2021). The impact of Euro through time: Exchange rate dynamics under different regimes. International Journal of Finance & Economics, 26(1), 1375-1408.
## -sGARCH
## --std
## --ged
## -eGARCH
## --std
## --ged

[1] “JPY”

## A dynamic version of the optimal univariate GARCH selection procedure is implemented according to:
##  Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2021). The impact of Euro through time: Exchange rate dynamics under different regimes. International Journal of Finance & Economics, 26(1), 1375-1408.
## -sGARCH
## --std
## --ged
## -eGARCH
## --std
## --ged
mspec = cgarchspec(multispec(ds), distribution.model=list(copula="mvt",
                   method="Kendall", time.varying=TRUE))
fit = cgarchfit(mspec, g2020)
H = rcov(fit)
R = rcor(fit)

First, we calculate the hedge ratios based upon the conditional variance-covariance matrix of the DCC-GARCH model:

hr = HedgeRatio(g2020, H)
## Hedge ratios are implemented according to:
##  Kroner, K. F., & Sultan, J. (1993). Time-varying distributions and dynamic hedging with foreign currency futures. Journal of Financial and Quantitative Analysis, 28(4), 535-551.
## 
##           Hedging effectiveness is calculated according to:
##  Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
## 
##           Statistics of the hedging effectiveness measure are implemented according to:
##  Antonakakis, N., Cunado, J., Filis, G., Gabauer, D., & de Gracia, F. P. (2020). Oil and asset classes implied volatilities: Investment strategies and hedging effectiveness. Energy Economics, 91, 104762.
kable(hr$TABLE)
Mean Std.Dev. 5% 95% HE p-value
EUR/GBP 0.69 0.20 0.36 1.02 0.44 0.00
EUR/CHF 0.79 0.17 0.48 1.00 0.56 0.00
EUR/JPY 0.35 0.27 -0.17 0.76 0.16 0.00
GBP/EUR 0.63 0.19 0.37 0.91 0.43 0.00
GBP/CHF 0.51 0.19 0.20 0.77 0.26 0.00
GBP/JPY 0.21 0.26 -0.20 0.62 0.09 0.00
CHF/EUR 0.93 0.21 0.55 1.20 0.60 0.00
CHF/GBP 0.66 0.27 0.27 1.11 0.27 0.00
CHF/JPY 0.49 0.25 -0.03 0.84 0.20 0.00
JPY/EUR 0.40 0.31 -0.16 0.83 0.16 0.00
JPY/GBP 0.28 0.31 -0.21 0.79 0.10 0.00
JPY/CHF 0.47 0.26 -0.02 0.83 0.17 0.00

Second, we compute the time-varying bivariate portfolio weights

bp = BivariatePortfolio(g2020, H)
## The optimal bivariate portfolios are computed according to:
##  Kroner, K. F., & Ng, V. K. (1998). Modeling asymmetric comovements of asset returns. The Review of Financial Studies, 11(4), 817-844.
## 
##           Hedging effectiveness is calculated according to:
##  Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
## 
##           Statistics of the hedging effectiveness measure are implemented according to:
##  Antonakakis, N., Cunado, J., Filis, G., Gabauer, D., & de Gracia, F. P. (2020). Oil and asset classes implied volatilities: Investment strategies and hedging effectiveness. Energy Economics, 91, 104762.
kable(bp$TABLE)
Mean Std.Dev. 5% 95% HE p-value
EUR/GBP 0.43 0.24 0.00 0.83 0.22 0.00
EUR/CHF 0.71 0.33 0.00 1.00 -0.04 0.00
EUR/JPY 0.55 0.20 0.19 0.86 0.34 0.00
GBP/EUR 0.57 0.24 0.17 1.00 0.22 0.00
GBP/CHF 0.67 0.24 0.25 1.00 0.23 0.00
GBP/JPY 0.58 0.15 0.34 0.85 0.42 0.00
CHF/EUR 0.29 0.33 0.00 1.00 0.20 0.22
CHF/GBP 0.33 0.24 0.00 0.75 0.41 0.00
CHF/JPY 0.49 0.21 0.12 0.83 0.34 0.00
JPY/EUR 0.45 0.20 0.14 0.81 0.40 0.00
JPY/GBP 0.42 0.15 0.15 0.66 0.48 0.00
JPY/CHF 0.51 0.21 0.17 0.88 0.22 0.00

Third, we calculate the time-varying minimum variance and minimum correlation portfolios, respectively.

mvp = MinimumConnectednessPortfolio(g2020, H)
## The minimum connectedness portfolio is implemented according to:
##  Broadstock, D. C., Chatziantoniou, I., & Gabauer, D. (2022). Minimum connectedness portfolios and the market for green bonds: Advocating socially responsible investment (SRI) activity. In Applications in Energy Finance (pp. 217-253). Palgrave Macmillan, Cham.
## 
##           Hedging effectiveness is calculated according to:
##  Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
## 
##           Statistics of the hedging effectiveness measure are implemented according to:
##  Antonakakis, N., Cunado, J., Filis, G., Gabauer, D., & de Gracia, F. P. (2020). Oil and asset classes implied volatilities: Investment strategies and hedging effectiveness. Energy Economics, 91, 104762.
kable(mvp$TABLE)
Mean Std.Dev. 5% 95% HE p-value
EUR 0.30 0.24 0.00 0.65 0.40 0.00
GBP 0.33 0.16 0.11 0.63 0.40 0.00
CHF 0.07 0.14 0.00 0.39 0.54 0.00
JPY 0.30 0.15 0.08 0.56 0.46 0.00
mcp = MinimumConnectednessPortfolio(g2020, R)
## The minimum connectedness portfolio is implemented according to:
##  Broadstock, D. C., Chatziantoniou, I., & Gabauer, D. (2022). Minimum connectedness portfolios and the market for green bonds: Advocating socially responsible investment (SRI) activity. In Applications in Energy Finance (pp. 217-253). Palgrave Macmillan, Cham.
## 
##           Hedging effectiveness is calculated according to:
##  Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
## 
##           Statistics of the hedging effectiveness measure are implemented according to:
##  Antonakakis, N., Cunado, J., Filis, G., Gabauer, D., & de Gracia, F. P. (2020). Oil and asset classes implied volatilities: Investment strategies and hedging effectiveness. Energy Economics, 91, 104762.
kable(mcp$TABLE)
Mean Std.Dev. 5% 95% HE p-value
EUR 0.19 0.14 0.00 0.42 0.39 0.00
GBP 0.32 0.08 0.18 0.44 0.39 0.00
CHF 0.09 0.12 0.00 0.34 0.53 0.00
JPY 0.40 0.06 0.29 0.47 0.45 0.00
date = index(g2020)
par(mfrow=c(1,1), oma=c(0,0,0,0)+0.5, mar=c(1,1,1,1)+0.5, mgp=c(1,0.4,0))
plot(date, mvp$cumulative_portfolio_return, type="l", las=1, xaxs="i" ,xlab="", ylab="", main="Cumulative portfoio returns", tck=-0.02)
grid(NA, NULL)
lines(date, mcp$cumulative_portfolio_return, col="steelblue")
legend("topleft", c("Minimum Variance Portfolio", "Minimum Correlation Portfolio"), fill=c("black","steelblue4"), bty="n", cex=0.75)
box()

par(mfrow=c(ceiling(k/2),2), oma=c(0,0,0,0)+0.5, mar=c(1,1,1,1)+0.5, mgp=c(1,0.4,0))
for (i in 1:k) {
  plot(date, mvp$portfolio_weights[,i], type="l", las=1, xaxs="i", yaxs="i", xlab="", ylab="", main=NAMES[i], tck=-0.02, ylim=c(0,1))
  grid(NA, NULL)
  lines(date, mcp$portfolio_weights[,i], col="steelblue")
  box()
}

Plot bivariate portfolio weights

kk = k*(k-1)/2
rows = ceiling(sqrt(kk))
cols = ceiling(kk/rows)

par(mfcol=c(rows, cols), oma=c(0,0,0,0)+0.5, mar=c(1,1,1,1)+0.5, mgp=c(1,0.4,0))
for (j in 1:k) {
  for (i in 1:k) {
    if (j<i) {
      plot(date, bp$portfolio_weights[i,j,], type="l", las=1, xaxs="i", yaxs="i", xlab="", ylab="", main=paste0(NAMES[j],"-",NAMES[i]), tck=-0.02, col="steelblue4")
      grid(NA, NULL)
      box()
    }
  }
}

Plot hedge ratios

par(mfcol=c(rows, cols), oma=c(0,0,0,0)+0.5, mar=c(1,1,1,1)+0.5, mgp=c(1,0.4,0))
for (j in 1:k) {
  for (i in 1:k) {
    if (j<i) {
      plot(date, hr$hedge_ratio[i,j,], type="l", las=1, xaxs="i", yaxs="i", xlab="", ylab="", main=paste0(NAMES[j],"-",NAMES[i]), tck=-0.02)
      grid(NA, NULL)
      lines(date, hr$hedge_ratio[j,i,], col="steelblue")
      box()
    }
  }
}

Plot cumulative bivariate portfolio returns

par(mfcol=c(rows, cols), oma=c(0,0,0,0)+0.5, mar=c(1,1,1,1)+0.5, mgp=c(1,0.4,0))
for (j in 1:k) {
  for (i in 1:k) {
    if (j<i) {
      plot(date, bp$cumulative_portfolio_return[i,j,], type="l", las=1, xaxs="i", yaxs="i", xlab="", ylab="", main=paste0(NAMES[j],"-",NAMES[i]), tck=-0.02, col="steelblue4")
      grid(NA, NULL)
      box()
    }
  }
}

par(mfcol=c(rows, cols), oma=c(0,0,0,0)+0.5, mar=c(1,1,1,1)+0.5, mgp=c(1,0.4,0))
for (j in 1:k) {
  for (i in 1:k) {
    if (j<i) {
      plot(date, hr$cumulative_portfolio_return[i,j,], type="l", las=1, xaxs="i", yaxs="i", xlab="", ylab="", main=paste0(NAMES[j],"-",NAMES[i]), tck=-0.02, col="steelblue4")
      grid(NA, NULL)
      box()
    }
  }
}