library("zoo")
## 
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
## 
##     as.Date, as.Date.numeric
library("knitr")
## Warning: package 'knitr' was built under R version 4.3.3
library("rmgarch")
## Loading required package: rugarch
## Loading required package: parallel
## 
## Attaching package: 'rugarch'
## The following object is masked from 'package:stats':
## 
##     sigma
library("devtools")
## Loading required package: usethis
library("openxlsx")
library("relaimpo")
## Loading required package: MASS
## Loading required package: boot
## Loading required package: survey
## Loading required package: grid
## Loading required package: Matrix
## Loading required package: survival
## 
## Attaching package: 'survival'
## The following object is masked from 'package:boot':
## 
##     aml
## 
## Attaching package: 'survey'
## The following object is masked from 'package:graphics':
## 
##     dotchart
## Loading required package: mitools
## This is the global version of package relaimpo.
## If you are a non-US user, a version with the interesting additional metric pmvd is available
## from Ulrike Groempings web site at prof.beuth-hochschule.de/groemping.
library("stargazer")
## 
## Please cite as:
##  Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
##  R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
library("RColorBrewer")
library("PerformanceAnalytics")
## Loading required package: xts
## Warning: package 'xts' was built under R version 4.3.3
## 
## Attaching package: 'xts'
## The following objects are masked from 'package:rmgarch':
## 
##     first, last
## 
## Attaching package: 'PerformanceAnalytics'
## The following object is masked from 'package:graphics':
## 
##     legend
colors = c("grey20","orange2","steelblue4","saddlebrown","springgreen4","firebrick","grey70")
palette(colors)

Please use the latest version

#install_github("GabauerDavid/ConnectednessApproach")
library("ConnectednessApproach")
## 
## Please cite as:
##  Gabauer, David (2022). ConnectednessApproach.
##  R package version 1.0.0. https://CRAN.R-project.org/package=ConnectednessApproach
data(cgp2024)
date = as.Date(cgp2024[,1])
Y = zoo(cgp2024[,-1], date)

NAMES = colnames(Y)
k = ncol(Y)
t = nrow(Y)

Figure 0: Percentage changes

par(mfcol = c(ceiling(k/2),2), oma = c(0, 1, 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,Y[,i],type='l',las=1,xaxs='i',yaxs='i',ylim=c(-11,11),xlab='',ylab='',main=paste(NAMES[i]),tck=-.02,col='steelblue4')
  grid(NA,NULL)
  lines(date,Y[,i],col='steelblue4')
  abline(h=0,lty=3)
  box()
}

Table 1: Summary statistics

kable(SummaryStatistics(Y, nlag=20))
## The following statistics are used:
## 
##           Skewness: D'Agostino, R.B. (1970). Transformation to Normality of the Null Distribution of G1. Biometrika, 57, 3, 679-681.
## 
##           Excess Kurtosis: Anscombe, F.J., Glynn, W.J. (1983) Distribution of kurtosis statistic for normal statistics. Biometrika, 70, 1, 227-234
## 
##           Normality test: Jarque, C. M., & Bera, A. K. (1980). Efficient tests for normality, homoscedasticity and serial independence of regression residuals. Economics Letters, 6(3), 255-259.
## 
##           ERS unit-root test: Elliott, G., Rothenberg, T. J., & Stock, J. H. (1996). Efficient Tests for an Autoregressive Unit Root. Econometrica, 64(4), 813-836.
## 
##           Weighted Portmanteau statistics: Fisher, T. J., & Gallagher, C. M. (2012). New weighted portmanteau statistics for time series goodness of fit testing. Journal of the American Statistical Association, 107(498), 777-787.
## 
## 
GRE SOL WIN GEO
Mean 0.039* 0.071* 0.053* 0.027
(0.055) (0.059) (0.082) (0.362)
Variance 1.311 4.39 2.934 2.852
Skewness -0.517*** -0.175*** -0.137*** 0.718***
(0.000) (0.000) (0.002) (0.000)
Ex.Kurtosis 9.089*** 4.599*** 3.734*** 14.437***
(0.000) (0.000) (0.000) (0.000)
JB 10990.261*** 2794.169*** 1840.851*** 27644.162***
(0.000) (0.000) (0.000) (0.000)
ERS -6.053 -9.569 -11.933 -11.570
(0.000) (0.000) (0.000) (0.000)
Q(20) 88.310*** 54.452*** 34.461*** 30.105***
(0.000) (0.000) (0.000) (0.000)
Q2(20) 2312.705*** 1585.716*** 247.003*** 324.849***
(0.000) (0.000) (0.000) (0.000)
kendall GRE SOL WIN GEO
GRE 1.000*** 0.483*** 0.360*** 0.309***
SOL 0.483*** 1.000*** 0.269*** 0.242***
WIN 0.360*** 0.269*** 1.000*** 0.185***
GEO 0.309*** 0.242*** 0.185*** 1.000***
spec = NULL
for (i in 1:k) {
  u = GARCHselection(Y[,i],
                     distributions=c("norm","std","sstd","ged","sged"),
                     models=c("sGARCH","gjrGARCH","eGARCH","iGARCH","AVGARCH","TGARCH"))
  spec = c(spec, u$best_ugarch)
}
## 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
## --sstd
## --ged
## --sged
## -gjrGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -eGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -iGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -AVGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -TGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## 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
## --sstd
## --ged
## --sged
## -gjrGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -eGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -iGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -AVGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -TGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## 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
## --sstd
## --ged
## --sged
## -gjrGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -eGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -iGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -AVGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -TGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## 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
## --sstd
## --ged
## --sged
## -gjrGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -eGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -iGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -AVGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
## -TGARCH
## --norm
## --std
## --sstd
## --ged
## --sged
fit = BivariateDCCGARCH(Y, spec)
H = fit$H_t
R = fit$R_t

uGARCH_table = NULL
for (i in 1:k) {
  fit = ugarchfit(spec[[i]], Y[,i])
  gt = GARCHtests(fit, lag=20)
  uGARCH_table = rbind(uGARCH_table, gt$TABLE)
}

Table 4: Evaluation of univariate GARCH performance

kable(uGARCH_table)
SignBias WARCH(20) VaR CVaR VaR Dur.
statistics 1.1110335 12.7748576 1.9553339 -678.0323 1.1146497
pvalues 0.2666388 0.2480858 0.1620132 0.9460 0.7695997
statistics 1.6177286 15.3280950 2.6728169 -686.6968 1.1337580
pvalues 0.1058213 0.1082819 0.1020752 0.9360 0.9334754
statistics 0.7533639 4.9271610 2.4216628 -683.8143 1.1273885
pvalues 0.4512876 0.9587172 0.1196678 0.8690 0.5395426
statistics 0.5100092 6.6085201 0.0010678 -627.9288 1.0063694
pvalues 0.6100808 0.8569645 0.9739319 0.6920 0.5833666

Figure 1: Dynamic conditional variance-covariances

par(mfcol = 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 (j in 1:k) {
  plot(date,H[j,j,],type='l',las=1,xaxs='i',yaxs='i',xlab='',ylab='',main=paste(NAMES[j]),tck=-.02,col=j,ylim=c(-0.2,14))
  grid(NA,NULL)
  for (i in 1:k) {
    lines(date,H[j,i,],col=i)
    abline(h=0,lty=3)
  }
  box()
  legend("topleft",NAMES,fill=1:k,bty="n",cex=0.75,ncol=1)
}

Figure 3: Dynamic conditional correlations

par(mfcol = c(ceiling(k/2),2), oma = c(0, 1, 0, 0) + 0.5, mar = c(1, 1, 1, 1) + 0.5, mgp = c(1, 0.4, 0))
for (j in 1:k) {
  plot(date,R[j,j,],type='l',las=1,xaxs='i',yaxs='i',xlab='',ylab='',main=paste(NAMES[j]),tck=-.02,col=j,ylim=c(-0.1,1))
  grid(NA,NULL)
  for (i in 1:k) {
    lines(date,R[j,i,],col=i)
    abline(h=0,lty=3)
    box()
  }
  legend("bottom",NAMES[-j],fill=c(1:k)[-j],bty="n",cex=0.75,ncol=k)
}

Table 5: Averaged connectedness measures

dca = R2Correlations(R)
kable(dca$TABLE)
GRE SOL WIN GEO FROM
GRE 100.00 29.53 15.47 9.93 54.93
SOL 31.42 100.00 8.71 6.30 46.42
WIN 17.38 8.95 100.00 3.58 29.92
GEO 11.25 6.58 3.62 100.00 21.45
TO 60.05 45.06 27.79 19.81 152.72
Inc.Own 160.05 145.06 127.79 119.81 cTCI/TCI
NET 5.12 -1.36 -2.13 -1.63 50.91/38.18
NPT 3.00 2.00 1.00 0.00

Figure 4: Dynamic conditional R2 decomposed measures

r2c = apply(dca$CT,c(1,3),sum)-1
par(mfcol = c(ceiling(k/2),2), oma = c(0, 1, 0, 0) + 0.5, mar = c(1, 1, 1, 1) + 0.5, mgp = c(1, 0.4, 0))
for (j in 1:k) {
  r2dd = matrix(0,ncol=k,nrow=t)
  for (i in 1:t) {
    ded = rep(0,k)
    ded[j] = 1
    r2dd[i,] = cumsum(dca$CT[j,,i]-ded)
  }
  plot(date,100*r2c[j,]*NA,type="l",las=1,xlab="",ylab="",ylim=c(0,100),xaxs="i",tck=-0.01,yaxs="i",main=NAMES[j])
  grid(NA,NULL)
  for (i in k:1) {
    polygon(c(date, rev(date)), c(c(rep(0, t)), rev(100*r2dd[,i])), col=i, border=i)
  }
  box()
  legend("topleft",NAMES[-j],fill=c(1:k)[-j],bty="n",cex=0.75,ncol=1)
}

Figure 5: Dynamic total connectedness

par(mfcol = c(1,1), oma = c(0, 1, 0, 0) + 0.5, mar = c(1, 1, 1, 1) + 0.5, mgp = c(1, 0.4, 0))
plot(date,dca$TCI*NA,type='l',las=1,xaxs='i',yaxs='i',xlab='',ylab='',main='',tck=-.01, ylim=c(0,80))#c(max(c(0,min(TCI)-10)),max(TCI)+10))
grid(NA,NULL)
polygon(c(date, rev(date)), c(c(rep(0, t)), rev(dca$TCI)), col=1, border=1)
box()

Figure 6: Net total directional connectedness

par(mfcol = 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,dca$NET[,i]*NA,type='l',las=1,xaxs='i',yaxs='i',ylim=c(-20,20),xlab='',ylab='',main=paste("NET",NAMES[i]),tck=-.025)
  grid(NA,NULL)
  polygon(c(date, rev(date)), c(c(rep(0, t)), rev(dca$NET[,i])), col=1, border=1)
  abline(h=0,lty=3)
  box()
}

Table 7: Hedge ratios

method = "cumsum"
statistics = "Fisher"
metric = "StdDev"
hr = HedgeRatio(Y/100, H, statistics=statistics, method=method, metric=metric, digit=3)
## 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 Return Std.Dev SR
GRE/SOL 0.336 0.146 0.144 0.612 0.536 0.000 0.057 0.124 0.460
GRE/WIN 0.308 0.114 0.165 0.533 0.345 0.004 0.058 0.147 0.391
GRE/GEO 0.290 0.149 0.108 0.593 0.278 0.000 0.083 0.154 0.537
SOL/GRE 1.400 0.440 0.734 2.194 0.468 0.000 -0.015 0.243 -0.064
SOL/WIN 0.472 0.174 0.224 0.824 0.195 0.004 0.063 0.298 0.210
SOL/GEO 0.459 0.212 0.170 0.841 0.169 0.000 0.117 0.303 0.386
WIN/GRE 0.950 0.338 0.477 1.614 0.280 0.000 0.010 0.231 0.044
WIN/SOL 0.352 0.163 0.127 0.644 0.205 0.000 0.070 0.242 0.290
WIN/GEO 0.325 0.149 0.150 0.624 0.098 0.000 0.089 0.258 0.344
GEO/GRE 0.696 0.300 0.274 1.207 0.227 0.000 -0.045 0.236 -0.190
GEO/SOL 0.264 0.124 0.087 0.497 0.176 0.000 -0.021 0.243 -0.087
GEO/WIN 0.255 0.105 0.126 0.457 0.098 0.004 -0.002 0.255 -0.007

Table 8: Multivariate hedging portfolios

mhp = MultivariateHedgingPortfolio(Y/100, H, statistics=statistics, method=method, digit=3)
kable(mhp$TABLE)
Mean Std.Dev. 5% 95% HE p-value Return Risk SR
GRE/SOL 0.251 0.123 0.086 0.490 0.605 0.000 0.042 0.114 0.364
GRE/WIN 0.158 0.054 0.086 0.264 0.605 0.000 0.042 0.114 0.364
GRE/GEO 0.122 0.074 0.021 0.257 0.605 0.000 0.042 0.114 0.364
SOL/GRE 1.234 0.492 0.571 2.154 0.474 0.000 -0.013 0.241 -0.055
SOL/WIN 0.090 0.170 -0.173 0.353 0.474 0.000 -0.013 0.241 -0.055
SOL/GEO 0.088 0.136 -0.126 0.317 0.474 0.000 -0.013 0.241 -0.055
WIN/GRE 0.804 0.351 0.304 1.383 0.291 0.000 0.025 0.229 0.107
WIN/SOL 0.094 0.168 -0.168 0.397 0.291 0.000 0.025 0.229 0.107
WIN/GEO 0.064 0.076 -0.049 0.208 0.291 0.000 0.025 0.229 0.107
GEO/GRE 0.521 0.288 0.119 1.003 0.228 0.000 -0.050 0.236 -0.214
GEO/SOL 0.083 0.119 -0.101 0.289 0.228 0.000 -0.050 0.236 -0.214
GEO/WIN 0.059 0.074 -0.046 0.184 0.228 0.000 -0.050 0.236 -0.214

Figure 3: Dynamic conditional betas

par(mfcol = c(ceiling(k/2),2), oma = c(0, 1, 0, 0) + 0.5, mar = c(1, 1, 1, 1) + 0.5, mgp = c(1, 0.4, 0))
for (j in 1:k) {
  plot(date,mhp$Beta[j,j,]*NA,type='l',las=1,xaxs='i',yaxs='i',xlab='',ylab='',
       main=paste(NAMES[j]),tck=-.02,col=j,ylim=c(-0.5,3))
  grid(NA,NULL)
  coefs = lm(Y[,j]~Y[,-j])$coefficients[-1]
  for (i in 1:k) {
    if (i!=j) {
      lines(date,mhp$Beta[j,i,],col=i)
      abline(h=0,lty=3)
      box()
    }
  }
  col = 1:k
  col = col[-j]
  abline(h=coefs,lty=3,col=col)
  legend("bottom",NAMES[-j],fill=c(1:k)[-j],bty="n",cex=0.6,ncol=k)
}

Table 9: Optimal bivariate portfolio weights

bpw = BivariatePortfolio(Y/100, H, statistics=statistics, method=method, metric=metric, digit=3)
## 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(bpw$TABLE)
Mean Std.Dev. 5% 95% HE p-value SR
GRE/SOL 0.971 0.096 0.791 1.000 -0.015 0.669 0.481
GRE/WIN 0.885 0.159 0.527 1.000 0.061 0.075 0.424
GRE/GEO 0.787 0.204 0.346 1.000 0.072 0.035 0.423
SOL/GRE 0.029 0.096 0.000 0.209 0.697 0.000 0.481
SOL/WIN 0.378 0.180 0.121 0.707 0.447 0.000 0.393
SOL/GEO 0.307 0.159 0.067 0.608 0.467 0.000 0.308
WIN/GRE 0.115 0.159 0.000 0.473 0.581 0.000 0.424
WIN/SOL 0.622 0.180 0.293 0.879 0.173 0.000 0.393
WIN/GEO 0.426 0.188 0.134 0.773 0.406 0.000 0.348
GEO/GRE 0.213 0.204 0.000 0.654 0.573 0.000 0.423
GEO/SOL 0.693 0.159 0.392 0.933 0.180 0.000 0.308
GEO/WIN 0.574 0.188 0.227 0.866 0.389 0.000 0.348

Table 10: Multivariate portfolio analysis

PCIc = dca$PCI
PCIg = dca$CT
for (l in 1:dim(dca$CT)[3]) {
  for (i in 1:k) {
    for (j in 1:k) {
      PCIg[i,j,l] = (2*R[i,j,l]^2)/(1+R[i,j,l]^2)
    }
  }
}
mvp = MinimumConnectednessPortfolio(Y/100, H, statistics=statistics, method=method, metric=metric, digit=3)
## 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.
mcp = MinimumConnectednessPortfolio(Y/100, R, statistics=statistics, method=method, metric=metric, digit=3)
## 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.
mpc = MinimumConnectednessPortfolio(Y/100, PCIc, statistics=statistics, method=method, metric=metric, digit=3)
## 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.
mpg = MinimumConnectednessPortfolio(Y/100, PCIg, statistics=statistics, method=method, metric=metric, digit=3)
## 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.
mrp = MinimumConnectednessPortfolio(Y/100, dca$CT, statistics=statistics, method=method, metric=metric, digit=3)
## 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.
MVA = rbind(mvp$TABLE, mcp$TABLE, mpc$TABLE, mpg$TABLE, mrp$TABLE)
kable(MVA)
Mean Std.Dev. 5% 95% HE p-value SR
GRE 0.726 0.247 0.208 0.998 0.132 0.000 0.404
SOL 0.017 0.061 0.000 0.131 0.741 0.000 0.404
WIN 0.077 0.112 0.000 0.307 0.612 0.000 0.404
GEO 0.181 0.165 0.000 0.542 0.601 0.000 0.404
GRE 0.081 0.069 0.000 0.209 -0.345 0.000 0.508
SOL 0.262 0.065 0.129 0.345 0.598 0.000 0.508
WIN 0.311 0.050 0.221 0.381 0.399 0.000 0.508
GEO 0.346 0.032 0.286 0.391 0.382 0.000 0.508
GRE 0.136 0.053 0.042 0.220 -0.301 0.000 0.515
SOL 0.251 0.036 0.183 0.305 0.611 0.000 0.515
WIN 0.294 0.031 0.240 0.341 0.419 0.000 0.515
GEO 0.319 0.019 0.282 0.342 0.402 0.000 0.515
GRE 0.085 0.069 0.000 0.211 -0.343 0.000 0.527
SOL 0.259 0.066 0.128 0.342 0.599 0.000 0.527
WIN 0.311 0.047 0.235 0.380 0.400 0.000 0.527
GEO 0.344 0.032 0.287 0.397 0.383 0.000 0.527
GRE 0.200 0.017 0.173 0.231 -0.250 0.000 0.509
SOL 0.236 0.016 0.210 0.262 0.627 0.000 0.509
WIN 0.273 0.018 0.241 0.301 0.442 0.000 0.509
GEO 0.292 0.014 0.266 0.310 0.425 0.000 0.509

Table 11: Portfolio performance

port.mat = data.frame(
                     MVP=mvp$portfolio_return,
                     MCP=mcp$portfolio_return,
                     MPC=mpc$portfolio_return,
                     MPG=mpg$portfolio_return,
                     MRP=mrp$portfolio_return
                     )
port.xts = xts(port.mat, order.by=date)
ir = matrix(NA, nrow=1, ncol=ncol(port.xts))
colnames(ir) = colnames(port.xts)
rownames(ir) = "GRE"
for (i in 1:ncol(port.xts)) {
  ir[,i] = InformationRatio(Ra=port.xts[,i], Rb=Y[,1]/100)
}
k = ncol(port.xts)
table = matrix(NA, ncol=k, nrow=5)
for (i in 1:k) {
  table[,i] = c(Return.annualized(port.xts[,i]),
                StdDev.annualized(port.xts[,i]),
                SharpeRatio(port.xts[,i], FUN=("StdDev"), annualize=TRUE),
                SharpeRatio(port.xts[,i], FUN=("VaR"), annualize=TRUE),
                SharpeRatio(port.xts[,i], FUN=("ES"), annualize=TRUE)
  )
}
colnames(table) = colnames(port.xts)
rownames(table) = c("Return","StdDev","Sharpe Ratio (StdDev)","Sharpe Ratio (VaR)","Sharpe Ratio (CVaR)")
kable(rbind(table, ir))
MVP MCP MPC MPG MRP
Return 0.0683487 0.1069877 0.1067273 0.1109746 0.1034479
StdDev 0.1693822 0.2107915 0.2073481 0.2106491 0.2032111
Sharpe Ratio (StdDev) 0.4035175 0.5075520 0.5147252 0.5268221 0.5090662
Sharpe Ratio (VaR) 4.4168586 5.4315296 5.5054374 5.6325941 5.3891530
Sharpe Ratio (CVaR) 2.9206022 3.4088806 3.4575336 3.5031973 3.2737700
GRE -0.2231015 0.1570721 0.1648530 0.1869512 0.1496682