##
## Attaching package: 'zoo'
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
## Warning: package 'knitr' was built under R version 4.3.3
## Loading required package: rugarch
## Loading required package: parallel
##
## Attaching package: 'rugarch'
## The following object is masked from 'package:stats':
##
## sigma
## 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.
##
## 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)
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.
##
##
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 5: Averaged connectedness measures
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 |
|
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.
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)
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 |
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.
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)
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 |