Temporary replication file

library("knitr")
library("ConnectednessApproach")
## 
## Please cite as:
##  Gabauer, David (2022). ConnectednessApproach.
##  R package version 1.0.0. https://CRAN.R-project.org/package=ConnectednessApproach
data("dy2012")
x = dy2012

Table 2: DY2012

mf = ConnectednessApproach(x,
                           window.size=NULL,
                           connectedness="R2")
## Estimating model
## Computing connectedness measures
mb = ConnectednessApproach(x,
                           nlag=4,
                           nfore=10,
                           window.size=NULL,
                           model="VAR")
## Estimating model
## Computing connectedness measures
## The (generalized) VAR connectedness approach is implemented according to:
##  Diebold, F. X., & Yilmaz, K. (2012). Better to give than to receive: Predictive directional measurement of volatility spillovers. International Journal of Forecasting, 28(1), 57-66.
df = data.frame(round(t(rbind(mf$NET, mb$NET)),2))
colnames(df) = c("MF","MB")
kable(df)
MF MB
SP500 -0.90 5.13
R_10Y 2.56 -0.54
DJUBSCOM -1.35 -1.69
USDX -0.31 -2.90
window.size = 200
dmb = ConnectednessApproach(x,
                            nlag=4,
                            nfore=10,
                            window.size=window.size,
                            model="VAR")
## Estimating model
## Computing connectedness measures
## The (generalized) VAR connectedness approach is implemented according to:
##  Diebold, F. X., & Yilmaz, K. (2012). Better to give than to receive: Predictive directional measurement of volatility spillovers. International Journal of Forecasting, 28(1), 57-66.
mfp = ConnectednessApproach(x,
                            window.size=window.size,
                            connectedness="R2",
                            Connectedness_config=list(R2Connectedness=list(method="pearson")))
## Estimating model
## Computing connectedness measures
mfs = ConnectednessApproach(x,
                            window.size=window.size,
                            connectedness="R2",
                            Connectedness_config=list(R2Connectedness=list(method="spearman")))
## Estimating model
## Computing connectedness measures
mfk = ConnectednessApproach(x,
                            window.size=window.size,
                            connectedness="R2",
                            Connectedness_config=list(R2Connectedness=list(method="kendall")))
## Estimating model
## Computing connectedness measures

Figure 2: Dynamic total connectedness

PlotTCI(dmb, ca=list(mfp), ylim=c(0,50))

Figure 4: Robustness check

PlotTCI(mfp, ca=list(mfs,mfk), ylim=c(0,50))