├── .DS_Store ├── R ├── .DS_Store ├── ConnectednessApproach-internal.R ├── ConditionalCorrelations.R ├── UninformativePrior.R ├── PartialCorrelations.R ├── MinnesotaPrior.R ├── Wold.R ├── LADVAR.R ├── RobustCovariance.R ├── DCCGARCHselection.R ├── VAR.R ├── BayesPrior.R ├── ConnectednessTable.R ├── QVAR.R ├── QuantileCorrelation.R ├── R2Correlations.R ├── PlotNPT.R ├── PlotTO.R ├── PlotNET.R ├── PlotFROM.R ├── PlotNetwork.R ├── BivariateDCCGARCH.R ├── ElasticNetVAR.R ├── PlotTCI.R ├── VFEVD.R ├── IRF.R ├── EquallyWeightedPortfolio.R ├── GARCHselection.R ├── TimeConnectedness.R ├── PlotNPDC.R └── VarianceTest.R ├── .Rbuildignore ├── data ├── g2020.rda ├── acg2020.rda ├── bcg2022.rda ├── bgu2021.rda ├── cg2021.rda ├── cgg2022.rda ├── cgp2024.rda ├── cgs2021.rda ├── cgs2022.rda ├── dy2009.rda ├── dy2012.rda ├── gg2018.rda ├── lw2021.rda ├── aaacgo2022.rda ├── cegg2022.rda ├── gcat2022.rda ├── gghm2022.rda └── jcggh2022.rda ├── docs ├── .DS_Store ├── Rpackage_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2020Gabauer_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2022Adekoya_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2009DieboldYilmaz_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2012DieboldYilmaz_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2018GabauerGupta_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2018BarunikKrehlik_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2021LastrapesWiesen_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2021BalcilarGabauerUmar_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2021ChatziantoniouGabauer_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2022GabauerChatziantoniouGupta_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2022StenforsChatziantoniouGabauer_files │ └── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg ├── 2020AntonakakisChatziantoniouGabauer_files │ ├── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg │ └── style.css ├── 2022BroadstockChatziantoniouGabauer_files │ └── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg ├── 2022ChatziantoniouAikinsGabauerTiwari_files │ └── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg ├── 2020AntonakakisCunadoFilisGabauerGracia_files │ └── images │ │ ├── header-bg.jpg │ │ └── highlight-bg.jpg └── 2022ChatziantoniouElsayedGabauerGozgor_files │ └── images │ ├── header-bg.jpg │ └── highlight-bg.jpg ├── .gitignore ├── man ├── lw2021.Rd ├── g2020.Rd ├── cgs2022.Rd ├── cgg2022.Rd ├── cg2021.Rd ├── bgu2021.Rd ├── cgp2024.Rd ├── cgs2021.Rd ├── gghm2022.Rd ├── gg2018.Rd ├── acg2020.Rd ├── dy2009.Rd ├── dy2012.Rd ├── jcggh2022.Rd ├── cegg2022.Rd ├── aaacgo2022.Rd ├── bcg2022.Rd ├── gcat2022.Rd ├── Wold.Rd ├── LADVAR.Rd ├── ConditionalCorrelation.Rd ├── UninformativePrior.Rd ├── ConnectednessTable.Rd ├── BayesPrior.Rd ├── MinnesotaPrior.Rd ├── RobustCovariance.Rd ├── PartialCorrelations.Rd ├── VAR.Rd ├── PlotNPT.Rd ├── QuantileCorrelation.Rd ├── VFEVD.Rd ├── PlotTCI.Rd ├── JointConnectedness.Rd ├── R2Correlations.Rd ├── SummaryStatistics.Rd ├── PlotTO.Rd ├── PlotNET.Rd ├── PlotFROM.Rd ├── GARCHtests.Rd ├── PlotNetwork.Rd ├── PlotINF.Rd ├── PlotPCI.Rd ├── PlotNPDC.Rd ├── ExtendedJointConnectedness.Rd ├── QVAR.Rd ├── TVPVAR.Rd ├── IRF.Rd ├── ExternalConnectedness.Rd ├── InclusiveConnectedness.Rd ├── AggregatedConnectedness.Rd ├── ExclusiveConnectedness.Rd ├── ConditionalConnectedness.Rd ├── InternalConnectedness.Rd ├── EquallyWeightedPortfolio.Rd ├── VarianceTest.Rd ├── DCCGARCHselection.Rd ├── FEVD.Rd ├── FrequencyConnectedness.Rd ├── GARCHselection.Rd ├── RiskParityPortfolio.Rd ├── TimeConnectedness.Rd ├── HedgeRatio.Rd ├── BivariateDCCGARCH.Rd ├── MultivariateHedgingPortfolio.Rd ├── BivariatePortfolio.Rd ├── ElasticNetVAR.Rd ├── MinimumConnectednessPortfolio.Rd ├── R2Connectedness.Rd └── WeightedBoxTest.Rd ├── ConnectednessApproach.Rproj ├── README.md ├── DESCRIPTION └── NAMESPACE /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/.DS_Store -------------------------------------------------------------------------------- /R/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/R/.DS_Store -------------------------------------------------------------------------------- /.Rbuildignore: -------------------------------------------------------------------------------- 1 | ^.*\.Rproj$ 2 | ^\.Rproj\.user$ 3 | ^cran-comments\.md$ 4 | ^CRAN-SUBMISSION$ 5 | -------------------------------------------------------------------------------- /data/g2020.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/g2020.rda -------------------------------------------------------------------------------- /docs/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/.DS_Store -------------------------------------------------------------------------------- /data/acg2020.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/acg2020.rda -------------------------------------------------------------------------------- /data/bcg2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/bcg2022.rda -------------------------------------------------------------------------------- /data/bgu2021.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/bgu2021.rda -------------------------------------------------------------------------------- /data/cg2021.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/cg2021.rda -------------------------------------------------------------------------------- /data/cgg2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/cgg2022.rda -------------------------------------------------------------------------------- /data/cgp2024.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/cgp2024.rda -------------------------------------------------------------------------------- /data/cgs2021.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/cgs2021.rda -------------------------------------------------------------------------------- /data/cgs2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/cgs2022.rda -------------------------------------------------------------------------------- /data/dy2009.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/dy2009.rda -------------------------------------------------------------------------------- /data/dy2012.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/dy2012.rda -------------------------------------------------------------------------------- /data/gg2018.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/gg2018.rda -------------------------------------------------------------------------------- /data/lw2021.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/lw2021.rda -------------------------------------------------------------------------------- /data/aaacgo2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/aaacgo2022.rda -------------------------------------------------------------------------------- /data/cegg2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/cegg2022.rda -------------------------------------------------------------------------------- /data/gcat2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/gcat2022.rda -------------------------------------------------------------------------------- /data/gghm2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/gghm2022.rda -------------------------------------------------------------------------------- /data/jcggh2022.rda: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/data/jcggh2022.rda -------------------------------------------------------------------------------- /docs/Rpackage_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/Rpackage_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2020Gabauer_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2020Gabauer_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2022Adekoya_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022Adekoya_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/Rpackage_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/Rpackage_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2020Gabauer_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2020Gabauer_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2022Adekoya_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022Adekoya_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | *.RData 6 | *.rdb 7 | *.rdx 8 | *.png 9 | *.woff 10 | __packages 11 | inst/doc 12 | *.Rmd -------------------------------------------------------------------------------- /docs/2009DieboldYilmaz_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2009DieboldYilmaz_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2012DieboldYilmaz_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2012DieboldYilmaz_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2018GabauerGupta_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2018GabauerGupta_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2018BarunikKrehlik_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2018BarunikKrehlik_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2018GabauerGupta_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2018GabauerGupta_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2021LastrapesWiesen_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2021LastrapesWiesen_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2009DieboldYilmaz_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2009DieboldYilmaz_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2012DieboldYilmaz_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2012DieboldYilmaz_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2018BarunikKrehlik_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2018BarunikKrehlik_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2021LastrapesWiesen_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2021LastrapesWiesen_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2021BalcilarGabauerUmar_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2021BalcilarGabauerUmar_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2021BalcilarGabauerUmar_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2021BalcilarGabauerUmar_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2021ChatziantoniouGabauer_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2021ChatziantoniouGabauer_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2021ChatziantoniouGabauer_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2021ChatziantoniouGabauer_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2022GabauerChatziantoniouGupta_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022GabauerChatziantoniouGupta_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2022GabauerChatziantoniouGupta_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022GabauerChatziantoniouGupta_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2022StenforsChatziantoniouGabauer_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022StenforsChatziantoniouGabauer_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2020AntonakakisChatziantoniouGabauer_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2020AntonakakisChatziantoniouGabauer_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2022BroadstockChatziantoniouGabauer_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022BroadstockChatziantoniouGabauer_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2022ChatziantoniouAikinsGabauerTiwari_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022ChatziantoniouAikinsGabauerTiwari_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2022StenforsChatziantoniouGabauer_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022StenforsChatziantoniouGabauer_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2020AntonakakisChatziantoniouGabauer_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2020AntonakakisChatziantoniouGabauer_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2020AntonakakisCunadoFilisGabauerGracia_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2020AntonakakisCunadoFilisGabauerGracia_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2022BroadstockChatziantoniouGabauer_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022BroadstockChatziantoniouGabauer_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2022ChatziantoniouElsayedGabauerGozgor_files/images/header-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022ChatziantoniouElsayedGabauerGozgor_files/images/header-bg.jpg -------------------------------------------------------------------------------- /docs/2020AntonakakisCunadoFilisGabauerGracia_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2020AntonakakisCunadoFilisGabauerGracia_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2022ChatziantoniouAikinsGabauerTiwari_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022ChatziantoniouAikinsGabauerTiwari_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /docs/2022ChatziantoniouElsayedGabauerGozgor_files/images/highlight-bg.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GabauerDavid/ConnectednessApproach/HEAD/docs/2022ChatziantoniouElsayedGabauerGozgor_files/images/highlight-bg.jpg -------------------------------------------------------------------------------- /R/ConnectednessApproach-internal.R: -------------------------------------------------------------------------------- 1 | .onAttach <- 2 | function(libname, pkgname) { 3 | packageStartupMessage("\nPlease cite as: \n") 4 | packageStartupMessage(" Gabauer, David (2022). ConnectednessApproach.") 5 | packageStartupMessage(" R package version 1.0.0. https://CRAN.R-project.org/package=ConnectednessApproach \n") 6 | } -------------------------------------------------------------------------------- /man/lw2021.Rd: -------------------------------------------------------------------------------- 1 | \name{lw2021} 2 | \docType{data} 3 | \alias{lw2021} 4 | \title{Dataset of Lastrapes and Wiesen (2021)} 5 | \description{ 6 | For detailed information see: Lastrapes, W. D., & Wiesen, T. F. (2021). The joint spillover index. Economic Modelling, 94, 681-691. 7 | } 8 | \usage{data(lw2021)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /ConnectednessApproach.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Package 16 | PackageUseDevtools: Yes 17 | PackageInstallArgs: --no-multiarch --with-keep.source 18 | -------------------------------------------------------------------------------- /man/g2020.Rd: -------------------------------------------------------------------------------- 1 | \name{g2020} 2 | \docType{data} 3 | \alias{g2020} 4 | \title{Dataset of Gabauer (2020)} 5 | \description{ 6 | For detailed information see: Gabauer, D. (2020). Volatility impulse response analysis for DCC-GARCH models: The role of volatility transmission mechanisms. Journal of Forecasting, 39(5), 788-796. 7 | } 8 | \usage{data(g2020)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/cgs2022.Rd: -------------------------------------------------------------------------------- 1 | \name{cgs2022} 2 | \docType{data} 3 | \alias{cgs2022} 4 | \title{Dataset of Chatziantoniou, Gabauer and Stenfors (2022)} 5 | \description{ 6 | For detailed information see: Chatziantoniou, I., Gabauer, D., & Stenfors, A. Independent Policy, Dependent Out-comes: A Game of Cross-Country Dom-inoes across European Yield Curves. 7 | } 8 | \usage{data(cgs2022)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/cgg2022.Rd: -------------------------------------------------------------------------------- 1 | \name{cgg2022} 2 | \docType{data} 3 | \alias{cgg2022} 4 | \title{Dataset of Chatziantoniou, Gabauer and Gupta (2022)} 5 | \description{ 6 | For detailed information see: Chatziantoniou, I., Gabauer, D., & Gupta, R. (2021). Integration and Risk Transmission in the Market for Crude Oil: A Time-Varying Parameter Frequency Connectedness Approach. 7 | } 8 | \usage{data(cgg2022)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/cg2021.Rd: -------------------------------------------------------------------------------- 1 | \name{cg2021} 2 | \docType{data} 3 | \alias{cg2021} 4 | \title{Dataset of Chatziantoniou and Gabauer (2021)} 5 | \description{ 6 | For detailed information see: Chatziantoniou, I., & Gabauer, D. (2021). EMU risk-synchronisation and financial fragility through the prism of dynamic connectedness. The Quarterly Review of Economics and Finance, 79, 1-14. 7 | } 8 | \usage{data(cg2021)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/bgu2021.Rd: -------------------------------------------------------------------------------- 1 | \name{bgu2021} 2 | \docType{data} 3 | \alias{bgu2021} 4 | \title{Dataset of Balcilar, Gabauer and Umar (2021)} 5 | \description{ 6 | For detailed information see: Balcilar, M., Gabauer, D., & Umar, Z. (2021). Crude Oil futures contracts and commodity markets: New evidence from a TVP-VAR extended joint connectedness approach. Resources Policy, 73, 102219. 7 | } 8 | \usage{data(bgu2021)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/cgp2024.Rd: -------------------------------------------------------------------------------- 1 | \name{cgp2024} 2 | \docType{data} 3 | \alias{cgp2024} 4 | \title{Dataset of Cocca, Gabauer, and Pomberger (2024)} 5 | \description{ 6 | For detailed information see: Cocca, T., Gabauer, D., & Pomberger, S. (2024). Clean energy market connectedness and investment strategies: New evidence from DCC-GARCH R2 decomposed connectedness measures. Energy Economics. 7 | } 8 | \usage{data(cgp2024)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/cgs2021.Rd: -------------------------------------------------------------------------------- 1 | \name{cgs2021} 2 | \docType{data} 3 | \alias{cgs2021} 4 | \title{Dataset of Chatziantoniou, Gabauer and Stenfors (2021)} 5 | \description{ 6 | For detailed information see: Chatziantoniou, I., Gabauer, D., & Stenfors, A. (2021). Interest rate swaps and the transmission mechanism of monetary policy: A quantile connectedness approach. Economics Letters, 204, 109891. 7 | } 8 | \usage{data(cgs2021)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/gghm2022.Rd: -------------------------------------------------------------------------------- 1 | \name{gghm2022} 2 | \docType{data} 3 | \alias{gghm2022} 4 | \title{Dataset of Gabauer, Gupta, Haradik and Miller (2020)} 5 | \description{ 6 | For detailed information see: Gabauer, D., Gupta, R., Marfatia, H., and Miller, S. M. (2020). Estimating us housing price network connectedness: Evidence from dynamic elastic net, lasso, and ridge vector autoregressive models. 7 | } 8 | \usage{data(gghm2022)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/gg2018.Rd: -------------------------------------------------------------------------------- 1 | \name{gg2018} 2 | \docType{data} 3 | \alias{gg2018} 4 | \title{Dataset of Gabauer and Gupta (2018)} 5 | \description{ 6 | For detailed information see, Gabauer, D., & Gupta, R. (2018). On the transmission mechanism of country-specific and international economic uncertainty spillovers: Evidence from a TVP-VAR connectedness decomposition approach. Economics Letters, 171, 63-71. 7 | } 8 | \usage{data(gg2018)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/acg2020.Rd: -------------------------------------------------------------------------------- 1 | \name{acg2020} 2 | \docType{data} 3 | \alias{acg2020} 4 | \title{Dataset of Antonakakis, Chatziantoniou and Gabauer (2020)} 5 | \description{ 6 | For detailed information see: Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2020). Refined measures of dynamic connectedness based on time-varying parameter vector autoregressions. Journal of Risk and Financial Management, 13(4), 84. 7 | } 8 | \usage{data(acg2020)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/dy2009.Rd: -------------------------------------------------------------------------------- 1 | \name{dy2009} 2 | \docType{data} 3 | \alias{dy2009} 4 | \title{Dataset of Diebold and Yilmaz (2009)} 5 | \description{ 6 | For detailed information see: Diebold, F. X., & Yilmaz, K. (2009). Measuring financial asset return and volatility spillovers, with application to global equity markets. The Economic Journal, 119(534), 158-171. 7 | } 8 | \usage{data(dy2009)} 9 | \format{A zoo data.frame containing 30x1141 observations.} 10 | \source{Yahoo Finance} 11 | \keyword{datasets} 12 | -------------------------------------------------------------------------------- /man/dy2012.Rd: -------------------------------------------------------------------------------- 1 | \name{dy2012} 2 | \docType{data} 3 | \alias{dy2012} 4 | \title{Dataset of Diebold and Yilmaz (2012)} 5 | \description{ 6 | For detailed information see: 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. 7 | } 8 | \usage{data(dy2012)} 9 | \format{A zoo data.frame containing 30x1141 observations.} 10 | \source{Yahoo Finance} 11 | \keyword{datasets} 12 | -------------------------------------------------------------------------------- /man/jcggh2022.Rd: -------------------------------------------------------------------------------- 1 | \name{jcggh2022} 2 | \docType{data} 3 | \alias{jcggh2022} 4 | \title{Dataset of Juncal, Chatziantoniou, Gabauer, Garcia & Hardik (2022)} 5 | \description{ 6 | For detailed information see: Juncal, C., Chatziantoniou, I., Gabauer, D., De Gracia, F. P., & Hardik, M. (2022). Dynamic spillovers across precious metals and energy realized volatilities: Evidence from quantile extended joint connectedness measures.} 7 | \usage{data(jcggh2022)} 8 | \format{zoo data.frame} 9 | \keyword{datasets} 10 | -------------------------------------------------------------------------------- /man/cegg2022.Rd: -------------------------------------------------------------------------------- 1 | \name{cegg2022} 2 | \docType{data} 3 | \alias{cegg2022} 4 | \title{Dataset of Chatziantoniou, Elsayed, Gabauer and Gozgor (2022)} 5 | \description{ 6 | For detailed information see: Chatziantoniou, I., Elsayed, AH., Gabauer, D. and Gozgor, G. (2021). Oil price shocks and exchange rate dynamics: New evidence from internal, external and partial connectedness measures for oil importing and exporting countries 7 | } 8 | \usage{data(cegg2022)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/aaacgo2022.Rd: -------------------------------------------------------------------------------- 1 | \name{aaacgo2022} 2 | \docType{data} 3 | \alias{aaacgo2022} 4 | \title{Dataset of Adekoya, Akinseye, Antonakakis, Chatziantoniou, Gabauer and Oliyide (2022)} 5 | \description{ 6 | For detailed information see: Adekoya, O. B., Akinseye, A., Antonakakis, N., Chatziantoniou, I., Gabauer, D., and Oliyide, J. A. (2021). Crude oil and Islamic sectoral stocks: Asymmetric connectedness and investment strategies. Available at SSRN. 7 | } 8 | \usage{data(aaacgo2022)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/bcg2022.Rd: -------------------------------------------------------------------------------- 1 | \name{bcg2022} 2 | \docType{data} 3 | \alias{bcg2022} 4 | \title{Dataset of Broadstock, Chatziantoniou and Gabauer (2022)} 5 | \description{ 6 | For detailed information see: Broadstock, D., 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. 7 | } 8 | \usage{data(bcg2022)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/gcat2022.Rd: -------------------------------------------------------------------------------- 1 | \name{gcat2022} 2 | \docType{data} 3 | \alias{gcat2022} 4 | \title{Dataset of Chatziantoniou, Abakah, Gabauer & Tiwari (2022)} 5 | \description{ 6 | For detailed information see: Chatziantoniou, I., Abakah, E. J., Gabauer, D., & Tiwari, A. K. (2022). Quantile time-frequency price connectedness between green bond, green equity, sustainable investments and clean energy markets: Implications for eco-friendly investors. Available at SSRN 3970746. 7 | } 8 | \usage{data(gcat2022)} 9 | \format{zoo data.frame} 10 | \keyword{datasets} 11 | -------------------------------------------------------------------------------- /man/Wold.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/Wold.R 3 | \name{Wold} 4 | \alias{Wold} 5 | \title{Wold representation theorem} 6 | \usage{ 7 | Wold(x, nfore = 10) 8 | } 9 | \arguments{ 10 | \item{x}{VAR coefficients} 11 | 12 | \item{nfore}{H-step ahead forecast horizon} 13 | } 14 | \value{ 15 | Get VMA coefficients 16 | } 17 | \description{ 18 | Transform VAR to VMA coefficients 19 | } 20 | \examples{ 21 | \donttest{ 22 | data("dy2012") 23 | fit = VAR(dy2012, configuration=list(nlag=1)) 24 | wold = Wold(fit$B, nfore=10) 25 | } 26 | } 27 | \author{ 28 | David Gabauer 29 | } 30 | -------------------------------------------------------------------------------- /man/LADVAR.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/LADVAR.R 3 | \name{LADVAR} 4 | \alias{LADVAR} 5 | \title{Least absolute deviation vector autoregression} 6 | \usage{ 7 | LADVAR(x, configuration = list(nlag = 1)) 8 | } 9 | \arguments{ 10 | \item{x}{zoo data matrix} 11 | 12 | \item{configuration}{model configuration} 13 | 14 | \item{nlag}{Lag length} 15 | } 16 | \value{ 17 | Estimate LAD VAR model 18 | } 19 | \description{ 20 | Estimation of a LAD VAR using equation-by-equation LAD regressions. 21 | } 22 | \examples{ 23 | data("dy2012") 24 | fit = LADVAR(dy2012, configuration=list(nlag=1)) 25 | } 26 | \author{ 27 | David Gabauer 28 | } 29 | -------------------------------------------------------------------------------- /man/ConditionalCorrelation.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ConditionalCorrelations.R 3 | \name{ConditionalCorrelation} 4 | \alias{ConditionalCorrelation} 5 | \title{Partial Conditional Correlations} 6 | \usage{ 7 | ConditionalCorrelation(Q) 8 | } 9 | \arguments{ 10 | \item{Q}{Variance-covariance matrix of dimension} 11 | } 12 | \value{ 13 | Get partial conditional correlations 14 | } 15 | \description{ 16 | Compute partial conditional correlations 17 | } 18 | \examples{ 19 | \donttest{ 20 | data("dy2012") 21 | fit = VAR(dy2012, configuration=list(nlag=1)) 22 | pcc = ConditionalCorrelation(fit$Q) 23 | } 24 | } 25 | \author{ 26 | David Gabauer 27 | } 28 | -------------------------------------------------------------------------------- /man/UninformativePrior.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/UninformativePrior.R 3 | \name{UninformativePrior} 4 | \alias{UninformativePrior} 5 | \title{Uninformative Prior} 6 | \usage{ 7 | UninformativePrior(k, nlag) 8 | } 9 | \arguments{ 10 | \item{k}{Number of series} 11 | 12 | \item{nlag}{Lag length} 13 | } 14 | \value{ 15 | Get Uninformative Prior 16 | } 17 | \description{ 18 | Get Uninformative Prior 19 | } 20 | \examples{ 21 | prior = UninformativePrior(k=4, nlag=1) 22 | } 23 | \references{ 24 | Koop, G., & Korobilis, D. (2010). Bayesian multivariate time series methods for empirical macroeconomics. Now Publishers Inc. 25 | } 26 | \author{ 27 | David Gabauer 28 | } 29 | -------------------------------------------------------------------------------- /man/ConnectednessTable.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ConnectednessTable.R 3 | \name{ConnectednessTable} 4 | \alias{ConnectednessTable} 5 | \title{Connectedness table} 6 | \usage{ 7 | ConnectednessTable(FEVD, digit = 2) 8 | } 9 | \arguments{ 10 | \item{FEVD}{Forecast error variance decomposition} 11 | 12 | \item{digit}{Number of decimal places} 13 | } 14 | \value{ 15 | Get connectedness table 16 | } 17 | \description{ 18 | This function provides standard connectedness table. 19 | } 20 | \examples{ 21 | \donttest{ 22 | data("dy2012") 23 | fit = VAR(dy2012, configuration=list(nlag=1)) 24 | fevd = FEVD(Phi=fit$B, Sigma=fit$Q, nfore=10, type="time", generalized=TRUE)$FEVD 25 | dca = ConnectednessTable(fevd) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /man/BayesPrior.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/BayesPrior.R 3 | \name{BayesPrior} 4 | \alias{BayesPrior} 5 | \title{Bayes Prior} 6 | \usage{ 7 | BayesPrior(x, size = NULL, nlag) 8 | } 9 | \arguments{ 10 | \item{x}{zoo data matrix} 11 | 12 | \item{size}{Sample size used to calculate prior parameters} 13 | 14 | \item{nlag}{Lag length} 15 | } 16 | \value{ 17 | Get Bayes Prior 18 | } 19 | \description{ 20 | Get Bayes prior 21 | } 22 | \examples{ 23 | \donttest{ 24 | data("dy2012") 25 | prior = BayesPrior(dy2012, nlag=1) 26 | } 27 | } 28 | \references{ 29 | Primiceri, G. E. (2005). Time varying structural vector autoregressions and monetary policy. The Review of Economic Studies, 72(3), 821-852. 30 | } 31 | \author{ 32 | David Gabauer 33 | } 34 | -------------------------------------------------------------------------------- /man/MinnesotaPrior.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MinnesotaPrior.R 3 | \name{MinnesotaPrior} 4 | \alias{MinnesotaPrior} 5 | \title{Minnesota Prior} 6 | \usage{ 7 | MinnesotaPrior(gamma = 0.1, k, nlag) 8 | } 9 | \arguments{ 10 | \item{gamma}{Diagonal value of variance-covariance matrix} 11 | 12 | \item{k}{Number of series} 13 | 14 | \item{nlag}{Lag length} 15 | } 16 | \value{ 17 | Get Minnesota Prior 18 | } 19 | \description{ 20 | Get Minnesota Prior 21 | } 22 | \examples{ 23 | \donttest{ 24 | prior = MinnesotaPrior(0.1, k=4, nlag=1) 25 | } 26 | } 27 | \references{ 28 | Koop, G., & Korobilis, D. (2010). Bayesian multivariate time series methods for empirical macroeconomics. Now Publishers Inc. 29 | } 30 | \author{ 31 | David Gabauer 32 | } 33 | -------------------------------------------------------------------------------- /man/RobustCovariance.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/RobustCovariance.R 3 | \name{RobustCovariance} 4 | \alias{RobustCovariance} 5 | \title{Robust Covariance} 6 | \usage{ 7 | RobustCovariance(x, method = "pearson") 8 | } 9 | \arguments{ 10 | \item{x}{zoo data matrix} 11 | 12 | \item{method}{Either "mcd", "mve", "ogk", "tyler", "sccm" (covariance), "pearson", "spearman" and "kendall" (correlation) or a combination of the two.} 13 | } 14 | \value{ 15 | Estimate robust covariance matrix 16 | } 17 | \description{ 18 | Estimation of robust covariance 19 | } 20 | \examples{ 21 | data("dy2012") 22 | RobustCovariance(dy2012, method=c("pearson")) 23 | RobustCovariance(dy2012, method=c("mcd", "pearson")) 24 | } 25 | \author{ 26 | David Gabauer 27 | } 28 | -------------------------------------------------------------------------------- /man/PartialCorrelations.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PartialCorrelations.R 3 | \name{PartialCorrelations} 4 | \alias{PartialCorrelations} 5 | \title{Partial Contemporaneous Correlations} 6 | \usage{ 7 | PartialCorrelations(Q) 8 | } 9 | \arguments{ 10 | \item{Q}{variance-covariance matrix} 11 | } 12 | \value{ 13 | Get partial contemporaneous correlations 14 | } 15 | \description{ 16 | Get partial contemporaneous correlations 17 | } 18 | \examples{ 19 | \donttest{ 20 | data(dy2012) 21 | fit = VAR(dy2012, configuration=list(nlag=1)) 22 | pcc = PartialCorrelations(fit$Q) 23 | } 24 | } 25 | \references{ 26 | Dahlhaus, R., & Eichler, M. (2003). Causality and graphical models in time series analysis. Oxford Statistical Science Series, 115-137. 27 | } 28 | \author{ 29 | David Gabauer 30 | } 31 | -------------------------------------------------------------------------------- /man/VAR.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/VAR.R 3 | \name{VAR} 4 | \alias{VAR} 5 | \title{Vector autoregression} 6 | \usage{ 7 | VAR(x, configuration = list(nlag = 1, method = "pearson")) 8 | } 9 | \arguments{ 10 | \item{x}{zoo data matrix} 11 | 12 | \item{configuration}{model configuration} 13 | 14 | \item{nlag}{Lag length} 15 | 16 | \item{method}{OLS estimates are based on Pearson, Spearman or Kendall correlation.} 17 | } 18 | \value{ 19 | Estimate VAR model 20 | } 21 | \description{ 22 | Estimation of a VAR using equation-by-equation OLS regressions. 23 | } 24 | \examples{ 25 | data("dy2012") 26 | fit = VAR(dy2012, configuration=list(nlag=1)) 27 | } 28 | \references{ 29 | Sims, C. A. (1980). Macroeconomics and reality. Econometrica, 1-48. 30 | } 31 | \author{ 32 | David Gabauer 33 | } 34 | -------------------------------------------------------------------------------- /man/PlotNPT.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotNPT.R 3 | \name{PlotNPT} 4 | \alias{PlotNPT} 5 | \title{Dynamic net pairwise transmission plot} 6 | \usage{ 7 | PlotNPT(dca, ca = NULL, path = NULL, width = 10, height = 7, ...) 8 | } 9 | \arguments{ 10 | \item{dca}{Connectedness object} 11 | 12 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 13 | 14 | \item{path}{Path where plots should be saved} 15 | 16 | \item{width}{The width of the graphics region in inches} 17 | 18 | \item{height}{The height of the graphics region in inches} 19 | 20 | \item{...}{Arguments to be passed to methods, such as graphidcal parameters (see par).} 21 | } 22 | \value{ 23 | Return connectedness plot 24 | } 25 | \description{ 26 | Visualize dynamic net total directional connectedness 27 | } 28 | -------------------------------------------------------------------------------- /R/ConditionalCorrelations.R: -------------------------------------------------------------------------------- 1 | #' @title Partial Conditional Correlations 2 | #' @description Compute partial conditional correlations 3 | #' @param Q Variance-covariance matrix of dimension 4 | #' @return Get partial conditional correlations 5 | #' @examples 6 | #' \donttest{ 7 | #' data("dy2012") 8 | #' fit = VAR(dy2012, configuration=list(nlag=1)) 9 | #' pcc = ConditionalCorrelation(fit$Q) 10 | #' } 11 | #' @author David Gabauer 12 | #' @export 13 | ConditionalCorrelation = function (Q) { 14 | if (length(dim(Q))<=1) { 15 | stop("Q needs to be at least a 2-dimensional matrix") 16 | } 17 | k = dim(Q)[1] 18 | NAMES = colnames(Q) 19 | if (length(dim(Q))==2) { 20 | Q = array(Q, c(k,k,1), dimnames=list(NAMES,NAMES)) 21 | } 22 | R = Q 23 | for (i in 1:k) { 24 | for (j in 1:k) { 25 | R[i,j,] = Q[i,j,] / (sqrt(Q[i,i,])*sqrt(Q[j,j,])) 26 | } 27 | } 28 | return(R) 29 | } 30 | -------------------------------------------------------------------------------- /R/UninformativePrior.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Uninformative Prior 3 | #' @description Get Uninformative Prior 4 | #' @param k Number of series 5 | #' @param nlag Lag length 6 | #' @return Get Uninformative Prior 7 | #' @examples 8 | #' prior = UninformativePrior(k=4, nlag=1) 9 | #' @references Koop, G., & Korobilis, D. (2010). Bayesian multivariate time series methods for empirical macroeconomics. Now Publishers Inc. 10 | #' @author David Gabauer 11 | #' @export 12 | UninformativePrior = function(k, nlag) { 13 | if (k<=1) { 14 | stop("k represents the number of series and needs to be an integer larger than 1") 15 | } 16 | if (nlag<=0) { 17 | stop("nlag needs to be a positive integer") 18 | } 19 | m = nlag*(k^2) 20 | bprior = c(cbind(0*diag(k), matrix(0, ncol=(nlag-1)*k, nrow=k))) 21 | V_i = matrix(4, nrow=(m/k), ncol=k) 22 | V_i_T = t(V_i) 23 | Vprior = diag(c(V_i_T)) 24 | return = list(bprior=bprior, Vprior=Vprior) 25 | } 26 | -------------------------------------------------------------------------------- /man/QuantileCorrelation.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/QuantileCorrelation.R 3 | \name{QuantileCorrelation} 4 | \alias{QuantileCorrelation} 5 | \title{Quantile correlation} 6 | \usage{ 7 | QuantileCorrelation(x, tau = 0.5, method = "lasso") 8 | } 9 | \arguments{ 10 | \item{x}{zoo data matrix} 11 | 12 | \item{tau}{quantile between 0 and 1} 13 | 14 | \item{method}{Either "lasso", "br", "fn" or "sfn". Default is "lasso"} 15 | } 16 | \value{ 17 | Get quantile correlations 18 | } 19 | \description{ 20 | This function computes the quantile correlation coefficient proposed by Choi and Shin (2022). 21 | } 22 | \examples{ 23 | \donttest{ 24 | data("g2020") 25 | fit = QuantileCorrelation(g2020, tau=0.5) 26 | } 27 | } 28 | \references{ 29 | Choi, J. E., & Shin, D. W. (2022). Quantile correlation coefficient: A new tail dependence measure. Statistical Papers, 63(4), 1075-1104. 30 | } 31 | \author{ 32 | David Gabauer 33 | } 34 | -------------------------------------------------------------------------------- /man/VFEVD.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/VFEVD.R 3 | \name{VFEVD} 4 | \alias{VFEVD} 5 | \title{Generalized volatility forecast error variance decomposition and volatility impulse response functions} 6 | \usage{ 7 | VFEVD(fit, nfore = 100, standardize = FALSE) 8 | } 9 | \arguments{ 10 | \item{fit}{Fitted DCC-GARCH model} 11 | 12 | \item{nfore}{H-step ahead forecast horizon} 13 | 14 | \item{standardize}{Boolean value whether GIRF should be standardized} 15 | } 16 | \value{ 17 | Get volatility impulse response functions and forecast error variance decomposition 18 | } 19 | \description{ 20 | This function provides the volatility impulse responses and the forecast error variance decomposition of DCC-GARCH models. 21 | } 22 | \references{ 23 | Gabauer, D. (2020). Volatility impulse response analysis for DCC‐GARCH models: The role of volatility transmission mechanisms. Journal of Forecasting, 39(5), 788-796. 24 | } 25 | \author{ 26 | David Gabauer 27 | } 28 | -------------------------------------------------------------------------------- /man/PlotTCI.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotTCI.R 3 | \name{PlotTCI} 4 | \alias{PlotTCI} 5 | \title{Dynamic total connectedness plot} 6 | \usage{ 7 | PlotTCI( 8 | dca, 9 | ca = NULL, 10 | path = NULL, 11 | ylim = c(NULL, NULL), 12 | width = 10, 13 | height = 5, 14 | ... 15 | ) 16 | } 17 | \arguments{ 18 | \item{dca}{Connectedness object} 19 | 20 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 21 | 22 | \item{path}{Path where plots should be saved} 23 | 24 | \item{ylim}{A vector including the lower and upper limit of the y-axis} 25 | 26 | \item{width}{The width of the graphics region in inches} 27 | 28 | \item{height}{The height of the graphics region in inches} 29 | 30 | \item{...}{Arguments to be passed to methods, such as graphical parameters (see par).} 31 | } 32 | \value{ 33 | Return connectedness plot 34 | } 35 | \description{ 36 | Visualize dynamic total connectedness 37 | } 38 | -------------------------------------------------------------------------------- /man/JointConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/JointConnectedness.R 3 | \name{JointConnectedness} 4 | \alias{JointConnectedness} 5 | \title{Lastrapes and Wiesen (2021) joint connectedness approach} 6 | \usage{ 7 | JointConnectedness(Phi, Sigma, nfore) 8 | } 9 | \arguments{ 10 | \item{Phi}{VAR coefficient matrix} 11 | 12 | \item{Sigma}{Residual variance-covariance matrix} 13 | 14 | \item{nfore}{H-step ahead forecast horizon} 15 | } 16 | \value{ 17 | Get connectedness measures 18 | } 19 | \description{ 20 | This function calculates the Lastrapes and Wiesen (2021) joint connectedness measures. 21 | } 22 | \examples{ 23 | \donttest{ 24 | data("lw2021") 25 | fit = VAR(lw2021, configuration=list(nlag=2)) 26 | dca = JointConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=30) 27 | dca$TABLE 28 | } 29 | } 30 | \references{ 31 | Lastrapes, W. D., & Wiesen, T. F. (2021). The joint spillover index. Economic Modelling, 94, 681-691. 32 | } 33 | \author{ 34 | David Gabauer 35 | } 36 | -------------------------------------------------------------------------------- /man/R2Correlations.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/R2Correlations.R 3 | \name{R2Correlations} 4 | \alias{R2Correlations} 5 | \title{R2 decomposed connectedness from correlations} 6 | \usage{ 7 | R2Correlations(R) 8 | } 9 | \arguments{ 10 | \item{R}{zoo correlation data matrix} 11 | } 12 | \value{ 13 | Get R2 connectedness measures from correlation matrix 14 | } 15 | \description{ 16 | This function computes the R2 decomposed connectedness measures from correlations 17 | } 18 | \references{ 19 | Naeem, M. A., Chatziantoniou, I., Gabauer, D., & Karim, S. (2023). Measuring the G20 Stock Market Return Transmission Mechanism: Evidence From the R2 Connectedness Approach. International Review of Financial Analysis. 20 | 21 | Balli, F., Balli, H. O., Dang, T. H. N., & Gabauer, D. (2023). Contemporaneous and lagged R2 decomposed connectedness approach: New evidence from the energy futures market. Finance Research Letters, 57, 104168. 22 | } 23 | \author{ 24 | David Gabauer 25 | } 26 | -------------------------------------------------------------------------------- /man/SummaryStatistics.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/SummaryStatistics.R 3 | \name{SummaryStatistics} 4 | \alias{SummaryStatistics} 5 | \title{Summary Statistics} 6 | \usage{ 7 | SummaryStatistics( 8 | x, 9 | portmanteau = c("Ljung-Box", "Box-Pierce", "Monti"), 10 | correlation = c("kendall", "spearman", "pearson"), 11 | nlag = 20, 12 | digit = 3 13 | ) 14 | } 15 | \arguments{ 16 | \item{x}{zoo data matrix} 17 | 18 | \item{portmanteau}{portmanteau statistics: "Box-Pierce", "Ljung-Box", "Monti"} 19 | 20 | \item{correlation}{correlation coefficient: "pearson", "kendall", "spearman".} 21 | 22 | \item{nlag}{number of lags for Weighted Portmanteau statistics} 23 | 24 | \item{digit}{digit Number of decimal places} 25 | } 26 | \value{ 27 | Get summary statistics 28 | } 29 | \description{ 30 | Get comprehensive summary statistics 31 | } 32 | \examples{ 33 | \donttest{ 34 | data(dy2012) 35 | SummaryStatistics(dy2012) 36 | } 37 | } 38 | \author{ 39 | David Gabauer 40 | } 41 | -------------------------------------------------------------------------------- /man/PlotTO.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotTO.R 3 | \name{PlotTO} 4 | \alias{PlotTO} 5 | \title{Dynamic to total directional connectedness plot} 6 | \usage{ 7 | PlotTO( 8 | dca, 9 | ca = NULL, 10 | path = NULL, 11 | ylim = c(NULL, NULL), 12 | width = 10, 13 | height = 7, 14 | ... 15 | ) 16 | } 17 | \arguments{ 18 | \item{dca}{Connectedness object} 19 | 20 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 21 | 22 | \item{path}{Path where plots should be saved} 23 | 24 | \item{ylim}{A vector including the lower and upper limit of the y-axis} 25 | 26 | \item{width}{The width of the graphics region in inches} 27 | 28 | \item{height}{The height of the graphics region in inches} 29 | 30 | \item{...}{Arguments to be passed to methods, such as graphical parameters (see par).} 31 | } 32 | \value{ 33 | Return connectedness plot 34 | } 35 | \description{ 36 | Visualize dynamic to total directional connectedness 37 | } 38 | -------------------------------------------------------------------------------- /man/PlotNET.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotNET.R 3 | \name{PlotNET} 4 | \alias{PlotNET} 5 | \title{Dynamic net total directional connectedness plot} 6 | \usage{ 7 | PlotNET( 8 | dca, 9 | ca = NULL, 10 | path = NULL, 11 | ylim = c(NULL, NULL), 12 | width = 10, 13 | height = 7, 14 | ... 15 | ) 16 | } 17 | \arguments{ 18 | \item{dca}{Connectedness object} 19 | 20 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 21 | 22 | \item{path}{Path where plots should be saved} 23 | 24 | \item{ylim}{A vector including the lower and upper limit of the y-axis} 25 | 26 | \item{width}{The width of the graphics region in inches} 27 | 28 | \item{height}{The height of the graphics region in inches} 29 | 30 | \item{...}{Arguments to be passed to methods, such as graphical parameters (see par).} 31 | } 32 | \value{ 33 | Return connectedness plot 34 | } 35 | \description{ 36 | Visualize dynamic net total directional connectedness 37 | } 38 | -------------------------------------------------------------------------------- /man/PlotFROM.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotFROM.R 3 | \name{PlotFROM} 4 | \alias{PlotFROM} 5 | \title{Dynamic from total directional connectedness plot} 6 | \usage{ 7 | PlotFROM( 8 | dca, 9 | ca = NULL, 10 | path = NULL, 11 | ylim = c(NULL, NULL), 12 | width = 10, 13 | height = 7, 14 | ... 15 | ) 16 | } 17 | \arguments{ 18 | \item{dca}{Connectedness object} 19 | 20 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 21 | 22 | \item{path}{Path where plots should be saved} 23 | 24 | \item{ylim}{A vector including the lower and upper limit of the y-axis} 25 | 26 | \item{width}{The width of the graphics region in inches} 27 | 28 | \item{height}{The height of the graphics region in inches} 29 | 30 | \item{...}{Arguments to be passed to methods, such as graphical parameters (see par).} 31 | } 32 | \value{ 33 | Return connectedness plot 34 | } 35 | \description{ 36 | Visualize dynamic from total directional connectedness 37 | } 38 | -------------------------------------------------------------------------------- /man/GARCHtests.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/GARCHtests.R 3 | \name{GARCHtests} 4 | \alias{GARCHtests} 5 | \title{Univariate GARCH test statistics} 6 | \usage{ 7 | GARCHtests(fit, lag = 20, prob = 0.05, conf.level = 0.9) 8 | } 9 | \arguments{ 10 | \item{fit}{Fitted univariate GARCH} 11 | 12 | \item{lag}{Lag length of weighted Portmanteau statistics} 13 | 14 | \item{prob}{The quantile (coverage) used for the VaR.} 15 | 16 | \item{conf.level}{Confidence level of VaR test statistics} 17 | } 18 | \value{ 19 | Get best univariate GARCH 20 | } 21 | \description{ 22 | This function provides the results of multiple univariate GARCH test statistics 23 | } 24 | \references{ 25 | Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3. 26 | 27 | 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. 28 | } 29 | \author{ 30 | David Gabauer 31 | } 32 | -------------------------------------------------------------------------------- /man/PlotNetwork.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotNetwork.R 3 | \name{PlotNetwork} 4 | \alias{PlotNetwork} 5 | \title{Network plot} 6 | \usage{ 7 | PlotNetwork( 8 | dca, 9 | method = "NPDC", 10 | path = NULL, 11 | name_length = NULL, 12 | threshold = 0, 13 | width = 10, 14 | height = 10, 15 | ... 16 | ) 17 | } 18 | \arguments{ 19 | \item{dca}{Connectedness object} 20 | 21 | \item{method}{Either visualizing NPDC or PCI} 22 | 23 | \item{path}{Path where plots should be saved} 24 | 25 | \item{name_length}{Length of variable names in the network plot} 26 | 27 | \item{threshold}{Threshold for bivariate connections between 0 and 1} 28 | 29 | \item{width}{The width of the graphics region in inches} 30 | 31 | \item{height}{The height of the graphics region in inches} 32 | 33 | \item{...}{Arguments to be passed to methods, such as graphical parameters (see par).} 34 | } 35 | \value{ 36 | Return connectedness plot 37 | } 38 | \description{ 39 | Visualize net pairwise or pairwise connectedness measures 40 | } 41 | -------------------------------------------------------------------------------- /R/PartialCorrelations.R: -------------------------------------------------------------------------------- 1 | #' @title Partial Contemporaneous Correlations 2 | #' 3 | #' @description Get partial contemporaneous correlations 4 | #' @param Q variance-covariance matrix 5 | #' @return Get partial contemporaneous correlations 6 | #' @examples 7 | #' \donttest{ 8 | #' data(dy2012) 9 | #' fit = VAR(dy2012, configuration=list(nlag=1)) 10 | #' pcc = PartialCorrelations(fit$Q) 11 | #' } 12 | #' @references Dahlhaus, R., & Eichler, M. (2003). Causality and graphical models in time series analysis. Oxford Statistical Science Series, 115-137. 13 | #' @author David Gabauer 14 | #' @export 15 | PartialCorrelations = function (Q) { 16 | if (length(dim(Q))<=1) { 17 | stop("Q needs to be at least a 2-dimensional matrix") 18 | } 19 | k = dim(Q)[1] 20 | NAMES = colnames(Q) 21 | if (length(dim(Q))==2) { 22 | Q = array(Q, c(k,k,1), dimnames=list(NAMES,NAMES)) 23 | } 24 | pcc = Q 25 | for (l in 1:dim(Q)[3]) { 26 | precision = MASS::ginv(Q[,,l]) 27 | theta = diag(1/sqrt(diag(precision))) 28 | pcc[,,l] = -theta %*% precision %*% theta 29 | } 30 | return(pcc) 31 | } 32 | -------------------------------------------------------------------------------- /man/PlotINF.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotINF.R 3 | \name{PlotINF} 4 | \alias{PlotINF} 5 | \title{Dynamic influence connectedness plot} 6 | \usage{ 7 | PlotINF( 8 | dca, 9 | ca = NULL, 10 | path = NULL, 11 | ylim = c(NULL, NULL), 12 | selection = NULL, 13 | width = 10, 14 | height = 7, 15 | ... 16 | ) 17 | } 18 | \arguments{ 19 | \item{dca}{Connectedness object} 20 | 21 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 22 | 23 | \item{path}{Path where plots should be saved} 24 | 25 | \item{ylim}{A vector including the lower and upper limit of the y-axis} 26 | 27 | \item{selection}{Indidcator of the illustrated series} 28 | 29 | \item{width}{The width of the graphics region in inches} 30 | 31 | \item{height}{The height of the graphics region in inches} 32 | 33 | \item{...}{Arguments to be passed to methods, such as graphidcal parameters (see par).} 34 | } 35 | \value{ 36 | Return connectedness plot 37 | } 38 | \description{ 39 | Visualize dynamic influence connectedness 40 | } 41 | -------------------------------------------------------------------------------- /man/PlotPCI.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotPCI.R 3 | \name{PlotPCI} 4 | \alias{PlotPCI} 5 | \title{Dynamic pairwise connectedness plot} 6 | \usage{ 7 | PlotPCI( 8 | dca, 9 | ca = NULL, 10 | path = NULL, 11 | ylim = c(NULL, NULL), 12 | selection = NULL, 13 | width = 10, 14 | height = 7, 15 | ... 16 | ) 17 | } 18 | \arguments{ 19 | \item{dca}{Connectedness object} 20 | 21 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 22 | 23 | \item{path}{Path where plots should be saved} 24 | 25 | \item{ylim}{A vector including the lower and upper limit of the y-axis} 26 | 27 | \item{selection}{Indidcator of the illustrated series} 28 | 29 | \item{width}{The width of the graphics region in inches} 30 | 31 | \item{height}{The height of the graphics region in inches} 32 | 33 | \item{...}{Arguments to be passed to methods, such as graphidcal parameters (see par).} 34 | } 35 | \value{ 36 | Return connectedness plot 37 | } 38 | \description{ 39 | Visualize dynamic pairwise connectedness 40 | } 41 | -------------------------------------------------------------------------------- /man/PlotNPDC.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/PlotNPDC.R 3 | \name{PlotNPDC} 4 | \alias{PlotNPDC} 5 | \title{Dynamic net pairwise connectedness plot} 6 | \usage{ 7 | PlotNPDC( 8 | dca, 9 | ca = NULL, 10 | path = NULL, 11 | ylim = c(NULL, NULL), 12 | selection = NULL, 13 | width = 10, 14 | height = 7, 15 | ... 16 | ) 17 | } 18 | \arguments{ 19 | \item{dca}{Connectedness object} 20 | 21 | \item{ca}{Compare dca object with a single connectedness object or a list of of connectedness objects} 22 | 23 | \item{path}{Path where plots should be saved} 24 | 25 | \item{ylim}{A vector including the lower and upper limit of the y-axis} 26 | 27 | \item{selection}{Indicator of the illustrated series} 28 | 29 | \item{width}{The width of the graphics region in inches} 30 | 31 | \item{height}{The height of the graphics region in inches} 32 | 33 | \item{...}{Arguments to be passed to methods, such as graphical parameters (see par).} 34 | } 35 | \value{ 36 | Return connectedness plot 37 | } 38 | \description{ 39 | Visualize dynamic net pairwise connectedness 40 | } 41 | -------------------------------------------------------------------------------- /R/MinnesotaPrior.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Minnesota Prior 3 | #' @description Get Minnesota Prior 4 | #' @param gamma Diagonal value of variance-covariance matrix 5 | #' @param k Number of series 6 | #' @param nlag Lag length 7 | #' @return Get Minnesota Prior 8 | #' @examples 9 | #' \donttest{ 10 | #' prior = MinnesotaPrior(0.1, k=4, nlag=1) 11 | #' } 12 | #' @references Koop, G., & Korobilis, D. (2010). Bayesian multivariate time series methods for empirical macroeconomics. Now Publishers Inc. 13 | #' @author David Gabauer 14 | #' @export 15 | MinnesotaPrior = function(gamma=0.1, k, nlag) { 16 | if (k<=1) { 17 | stop("k represents the number of series and needs to be an integer larger than 1") 18 | } 19 | if (nlag<=0) { 20 | stop("nlag needs to be a positive integer") 21 | } 22 | m = nlag*(k^2) 23 | bprior = c(cbind(0*diag(k), matrix(0, ncol=(nlag-1)*k, nrow=k))) 24 | V_i = matrix(0, nrow=(m/k), ncol=k) 25 | for (i in 1:k) { 26 | for (j in 1:(m/k)) { 27 | V_i[j,i] = gamma/(ceiling(j/k)^2) 28 | } 29 | } 30 | V_i_T = t(V_i) 31 | Vprior = diag(c(V_i_T)) 32 | return = list(bprior=bprior, Vprior=Vprior) 33 | } 34 | -------------------------------------------------------------------------------- /R/Wold.R: -------------------------------------------------------------------------------- 1 | #' @title Wold representation theorem 2 | #' @description Transform VAR to VMA coefficients 3 | #' @param x VAR coefficients 4 | #' @param nfore H-step ahead forecast horizon 5 | #' @return Get VMA coefficients 6 | #' @examples 7 | #' \donttest{ 8 | #' data("dy2012") 9 | #' fit = VAR(dy2012, configuration=list(nlag=1)) 10 | #' wold = Wold(fit$B, nfore=10) 11 | #' } 12 | #' @author David Gabauer 13 | #' @export 14 | Wold = function (x, nfore=10) { 15 | if (nfore<=0) { 16 | stop("nfore needs to be a positive integer") 17 | } 18 | nstep = abs(as.integer(nfore)) 19 | K = nrow(x) 20 | p = floor(ncol(x)/K) 21 | A = array(0, c(K,K,nstep)) 22 | for (i in 1:p){ 23 | A[,,i]=x[,((i-1)*K+1):(i*K)] 24 | } 25 | Phi = array(0, dim = c(K, K, nstep + 1)) 26 | Phi[,,1]=diag(K) 27 | Phi[,,2]=Phi[,,1] %*% A[,,1] 28 | if (nstep > 1) { 29 | for (i in 3:(nstep + 1)) { 30 | tmp1 = Phi[,,1] %*% A[,,i-1] 31 | tmp2 = matrix(0, nrow=K, ncol=K) 32 | idx = (i-2):1 33 | for (j in 1:(i-2)) { 34 | tmp2 = tmp2 + Phi[,,j+1] %*% A[,,idx[j]] 35 | } 36 | Phi[,,i] = tmp1 + tmp2 37 | } 38 | } 39 | return(Phi) 40 | } 41 | -------------------------------------------------------------------------------- /man/ExtendedJointConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ExtendedJointConnectedness.R 3 | \name{ExtendedJointConnectedness} 4 | \alias{ExtendedJointConnectedness} 5 | \title{Balcilar et al. (2021) extended joint connectedness approach} 6 | \usage{ 7 | ExtendedJointConnectedness(Phi, Sigma, nfore = 10) 8 | } 9 | \arguments{ 10 | \item{Phi}{VAR coefficient matrix} 11 | 12 | \item{Sigma}{Residual variance-covariance matrix} 13 | 14 | \item{nfore}{H-step ahead forecast horizon} 15 | } 16 | \value{ 17 | Get connectedness measures 18 | } 19 | \description{ 20 | This function provides extended joint connectedness measures. 21 | } 22 | \examples{ 23 | \donttest{ 24 | #Replication of Balcilar et al. (2021) 25 | data("bgu2021") 26 | fit = VAR(bgu2021, configuration=list(nlag=1)) 27 | dca = ExtendedJointConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=20) 28 | dca$TABLE 29 | } 30 | } 31 | \references{ 32 | Balcilar, M., Gabauer, D., & Umar, Z. (2021). Crude Oil futures contracts and commodity markets: New evidence from a TVP-VAR extended joint connectedness approach. Resources Policy, 73, 102219. 33 | } 34 | \author{ 35 | David Gabauer 36 | } 37 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ConnectednessApproach 2 | 3 | ## Step 1: Install the devtools package 4 | 5 | To install a R package, start by installing the devtools package. The best way to do this is from CRAN, by typing: 6 | 7 | ```r 8 | install.packages("devtools") 9 | ``` 10 | 11 | ## Step 2: Install the package of interest from GitHub 12 | 13 | Install the package of interest from GitHub using the following code, where you need to remember to list both the author and the name of the package (in GitHub jargon, the package is the repo, which is short for repository). In this example, we are installing the ConnectednessApproach package created by GabauerDavid. 14 | 15 | ```r 16 | library(devtools) 17 | install_github("GabauerDavid/ConnectednessApproach") 18 | ``` 19 | 20 | ## Step 3: Go through tutorial 21 | 22 | [ConnectednessApproach Tutorial](https://gabauerdavid.github.io/ConnectednessApproach/#Dynamic_Connectedness_Measures) 23 | 24 | ## BibTeX Citation 25 | 26 | If you use this package in a scientific publication, I would appreciate if you use the following citation: 27 | 28 | ``` 29 | @article{gabauer2022, 30 | title={Package ‘ConnectednessApproach’}, 31 | author={Gabauer, David}, 32 | year={2022} 33 | } 34 | ``` 35 | -------------------------------------------------------------------------------- /man/QVAR.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/QVAR.R 3 | \name{QVAR} 4 | \alias{QVAR} 5 | \title{Quantile vector autoregression} 6 | \usage{ 7 | QVAR(x, configuration = list(nlag = 1, tau = 0.5, method = "fn")) 8 | } 9 | \arguments{ 10 | \item{x}{zoo data matrix} 11 | 12 | \item{configuration}{model configuration} 13 | 14 | \item{nlag}{Lag length} 15 | 16 | \item{tau}{quantile between 0 and 1} 17 | 18 | \item{method}{See methods for rq in quantreg package. Default is "fn".} 19 | } 20 | \value{ 21 | Estimate QVAR model 22 | } 23 | \description{ 24 | Estimation of a QVAR using equation-by-equation quantile regressions. 25 | } 26 | \examples{ 27 | \donttest{ 28 | data("dy2012") 29 | fit = QVAR(dy2012, configuration=list(nlag=1, tau=0.5)) 30 | } 31 | } 32 | \references{ 33 | White, H., Kim, T. H., & Manganelli, S. (2015). VAR for VaR: Measuring tail dependence using multivariate regression quantiles. Journal of Econometrics, 187(1), 169-188. 34 | 35 | Chatziantoniou, I., Gabauer, D., & Stenfors, A. (2021). Interest rate swaps and the transmission mechanism of monetary policy: A quantile connectedness approach. Economics Letters, 204, 109891. 36 | } 37 | \author{ 38 | David Gabauer 39 | } 40 | -------------------------------------------------------------------------------- /man/TVPVAR.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/TVPVAR.R 3 | \name{TVPVAR} 4 | \alias{TVPVAR} 5 | \title{Time-varying parameter vector autoregression} 6 | \usage{ 7 | TVPVAR(x, configuration = list(l = c(0.99, 0.99), nlag = 1, prior = NULL)) 8 | } 9 | \arguments{ 10 | \item{x}{zoo data matrix} 11 | 12 | \item{configuration}{model configuration} 13 | 14 | \item{nlag}{Lag length} 15 | 16 | \item{prior}{List of prior VAR coefficients and variance-covariance matrix} 17 | 18 | \item{l}{forgetting factors (kappa1, kappa2)} 19 | } 20 | \value{ 21 | Estimate TVP-VAR model 22 | } 23 | \description{ 24 | Estimate TVP-VAR model 25 | } 26 | \examples{ 27 | \donttest{ 28 | data("dy2012") 29 | prior = BayesPrior(dy2012, nlag=1) 30 | fit = TVPVAR(dy2012, configuration=list(nlag=1, prior=prior, l=c(0.99,0.99))) 31 | } 32 | } 33 | \references{ 34 | Koop, G., & Korobilis, D. (2014). A new index of financial conditions. European Economic Review, 71, 101-116. 35 | 36 | Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2020). Refined measures of dynamic connectedness based on time-varying parameter vector autoregressions. Journal of Risk and Financial Management, 13(4), 84. 37 | } 38 | \author{ 39 | David Gabauer 40 | } 41 | -------------------------------------------------------------------------------- /man/IRF.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/IRF.R 3 | \name{IRF} 4 | \alias{IRF} 5 | \title{Impulse response functions} 6 | \usage{ 7 | IRF(Phi, Sigma, nfore = 10, orth = TRUE) 8 | } 9 | \arguments{ 10 | \item{Phi}{VAR coefficient matrix} 11 | 12 | \item{Sigma}{Residual Variance-Covariance Matrix} 13 | 14 | \item{nfore}{H-step ahead forecast horizon} 15 | 16 | \item{orth}{Boolean} 17 | } 18 | \value{ 19 | Orthorgonal/generalized time/frequency impulse response functions 20 | } 21 | \description{ 22 | This function calculates orthorgonalized/generalized impulse response functions of time or frequency domain. 23 | } 24 | \examples{ 25 | \donttest{ 26 | data("dy2012") 27 | fit = VAR(dy2012, configuration=list(nlag=1)) 28 | irf = IRF(Phi=fit$B, Sigma=fit$Q, nfore=10, orth=TRUE) 29 | } 30 | } 31 | \references{ 32 | Stiassny, A. (1996). A spectral decomposition for structural VAR models. Empirical Economics, 21(4), 535-555. 33 | 34 | Koop, G., Pesaran, M. H., & Potter, S. M. (1996). Impulse response analysis in nonlinear multivariate models. Journal of Econometrics, 74(1), 119-147. 35 | 36 | Pesaran, H. H., & Shin, Y. (1998). Generalized impulse response analysis in linear multivariate models. Economics Letters, 58(1), 17-29. 37 | } 38 | \author{ 39 | David Gabauer 40 | } 41 | -------------------------------------------------------------------------------- /man/ExternalConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ExternalConnectedness.R 3 | \name{ExternalConnectedness} 4 | \alias{ExternalConnectedness} 5 | \title{External Connectedness Measures} 6 | \usage{ 7 | ExternalConnectedness( 8 | dca, 9 | groups = list(c(1), c(2:ncol(dca$NET))), 10 | start = NULL, 11 | end = NULL 12 | ) 13 | } 14 | \arguments{ 15 | \item{dca}{Dynamic connectedness object} 16 | 17 | \item{groups}{List of at least two group vectors} 18 | 19 | \item{start}{Start index} 20 | 21 | \item{end}{End index} 22 | } 23 | \value{ 24 | Get connectedness measures 25 | } 26 | \description{ 27 | This function provides external connectedness measures 28 | } 29 | \examples{ 30 | \donttest{ 31 | data("gg2018") 32 | dca = ConnectednessApproach(gg2018, model="VAR", 33 | connectedness="Time", 34 | nlag=1, nfore=10, window.size=200) 35 | ext = ExternalConnectedness(dca, groups=list("US"=c(1,2,3,4), "JP"=c(5,6,7,8))) 36 | } 37 | } 38 | \references{ 39 | Gabauer, D., & Gupta, R. (2018). On the transmission mechanism of country-specific and international economic uncertainty spillovers: Evidence from a TVP-VAR connectedness decomposition approach. Economics Letters, 171, 63-71. 40 | } 41 | \author{ 42 | David Gabauer 43 | } 44 | -------------------------------------------------------------------------------- /man/InclusiveConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/InclusiveConnectedness.R 3 | \name{InclusiveConnectedness} 4 | \alias{InclusiveConnectedness} 5 | \title{Inclusive Connectedness Measures} 6 | \usage{ 7 | InclusiveConnectedness(dca, group = c(1, 2), start = NULL, end = NULL) 8 | } 9 | \arguments{ 10 | \item{dca}{Dynamic connectedness object} 11 | 12 | \item{group}{Vector of group indices} 13 | 14 | \item{start}{Start index} 15 | 16 | \item{end}{End index} 17 | } 18 | \value{ 19 | Get connectedness measures 20 | } 21 | \description{ 22 | This function results in inclusive connectedness measures 23 | } 24 | \examples{ 25 | \donttest{ 26 | data("cegg2022") 27 | dca = ConnectednessApproach(cegg2022, 28 | model="VAR", 29 | connectedness="Time", 30 | nlag=1, 31 | nfore=20, 32 | corrected=TRUE) 33 | inc = InclusiveConnectedness(dca, group=c(1,2,3)) 34 | } 35 | } 36 | \references{ 37 | Chatziantoniou, I., Elsayed, A. H., Gabauer, D., & Gozgor, G. (2023). Oil price shocks and exchange rate dynamics: Evidence from decomposed and partial connectedness measures for oil importing and exporting economies. Energy Economics, 120, 106627. 38 | } 39 | \author{ 40 | David Gabauer 41 | } 42 | -------------------------------------------------------------------------------- /R/LADVAR.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Least absolute deviation vector autoregression 3 | #' @description Estimation of a LAD VAR using equation-by-equation LAD regressions. 4 | #' @param x zoo data matrix 5 | #' @param nlag Lag length 6 | #' @param configuration model configuration 7 | #' @return Estimate LAD VAR model 8 | #' @examples 9 | #' data("dy2012") 10 | #' fit = LADVAR(dy2012, configuration=list(nlag=1)) 11 | #' @author David Gabauer 12 | #' @importFrom L1pack lad 13 | #' @importFrom stats lm 14 | #' @importFrom stats embed 15 | #' @export 16 | LADVAR = function (x, configuration = list(nlag = 1)) { 17 | if (!is(x, "zoo")) { 18 | stop("Data needs to be of type 'zoo'") 19 | } 20 | k = ncol(x) 21 | NAMES = colnames(x) 22 | if (is.null(NAMES)) { 23 | NAMES = 1:k 24 | } 25 | nlag = as.numeric(configuration$nlag) 26 | if (nlag <= 0) { 27 | stop("nlag needs to be a positive integer") 28 | } 29 | Res = B = se = NULL 30 | for (i in 1:k) { 31 | z = stats::embed(x, nlag + 1) 32 | fit = summary(lad(z[, i] ~ z[, -c(1:k)])) 33 | B = rbind(B, fit$coefficients[-1, 1]) 34 | se = rbind(se, fit$coefficients[-1, 2]) 35 | Res = cbind(Res, fit$residuals) 36 | } 37 | Q = array(t(Res) %*% Res/nrow(Res), c(k, k, 1), 38 | dimnames = list(NAMES, NAMES, tail(as.character(zoo::index(x)), 1))) 39 | results = list(B=B, Q=Q, se=se) 40 | } 41 | -------------------------------------------------------------------------------- /man/AggregatedConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/AggregatedConnectedness.R 3 | \name{AggregatedConnectedness} 4 | \alias{AggregatedConnectedness} 5 | \title{Aggregated Connectedness Measures} 6 | \usage{ 7 | AggregatedConnectedness(dca, groups, start = NULL, end = NULL) 8 | } 9 | \arguments{ 10 | \item{dca}{Dynamic connectedness object} 11 | 12 | \item{groups}{List of at least two group vectors} 13 | 14 | \item{start}{Start index} 15 | 16 | \item{end}{End index} 17 | } 18 | \value{ 19 | Get connectedness measures 20 | } 21 | \description{ 22 | This function results in aggregated connectedness measures. 23 | } 24 | \examples{ 25 | \donttest{ 26 | #Replication of Gabauer and Gupta (2018) 27 | data("gg2018") 28 | dca = ConnectednessApproach(gg2018, 29 | nlag=1, 30 | nfore=10, 31 | model="VAR", 32 | connectedness="Time") 33 | ac = AggregatedConnectedness(dca, groups=list("US"=c(1,2,3,4), "JP"=c(5,6,7,8))) 34 | } 35 | } 36 | \references{ 37 | Stenfors, A., Chatziantoniou, I., & Gabauer, D. (2022). Independent Policy, Dependent Outcomes: A Game of Cross-Country Dominoes across European Yield Curves. Journal of International Financial Markets, Institutions and Money. 38 | } 39 | \author{ 40 | David Gabauer 41 | } 42 | -------------------------------------------------------------------------------- /man/ExclusiveConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ExclusiveConnectedness.R 3 | \name{ExclusiveConnectedness} 4 | \alias{ExclusiveConnectedness} 5 | \title{Exclusive Connectedness Measures} 6 | \usage{ 7 | ExclusiveConnectedness(dca, group = c(1, 2), start = NULL, end = NULL) 8 | } 9 | \arguments{ 10 | \item{dca}{Dynamic connectedness object} 11 | 12 | \item{group}{Vector of group indices} 13 | 14 | \item{start}{Start index} 15 | 16 | \item{end}{End index} 17 | } 18 | \value{ 19 | Get connectedness measures 20 | } 21 | \description{ 22 | This function results in exclusive connectedness measures 23 | } 24 | \examples{ 25 | \donttest{ 26 | #Replication of Chatziantoniou, et al. (2022) 27 | data("cegg2022") 28 | dca = ConnectednessApproach(cegg2022, 29 | nlag=1, 30 | nfore=20, 31 | model="VAR", 32 | connectedness="Time", 33 | corrected=TRUE) 34 | exc = ExclusiveConnectedness(dca, group=c(1,2,3)) 35 | } 36 | } 37 | \references{ 38 | Chatziantoniou, I., Elsayed, A. H., Gabauer, D., & Gozgor, G. (2023). Oil price shocks and exchange rate dynamics: Evidence from decomposed and partial connectedness measures for oil importing and exporting economies. Energy Economics, 120, 106627. 39 | } 40 | \author{ 41 | David Gabauer 42 | } 43 | -------------------------------------------------------------------------------- /man/ConditionalConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ConditionalConnectedness.R 3 | \name{ConditionalConnectedness} 4 | \alias{ConditionalConnectedness} 5 | \title{ConditionalConnectedness} 6 | \usage{ 7 | ConditionalConnectedness(dca, group = c(1, 2, 3), start = NULL, end = NULL) 8 | } 9 | \arguments{ 10 | \item{dca}{Dynamic connectedness object} 11 | 12 | \item{group}{Group vector} 13 | 14 | \item{start}{Start index} 15 | 16 | \item{end}{End index} 17 | } 18 | \value{ 19 | Get connectedness measures 20 | } 21 | \description{ 22 | This function computes the conditional connectedness measures. 23 | } 24 | \examples{ 25 | \donttest{ 26 | #Replication of Chatzianzoniou, Gabauer and Stenfors (2022) 27 | data("cgs2022") 28 | dca = ConnectednessApproach(cgs2022, 29 | nlag=1, 30 | nfore=10, 31 | window.size=250, 32 | model="VAR", 33 | connectedness="Time") 34 | cc = ConditionalConnectedness(dca, group=c(1,4,7,10,13,16)) 35 | } 36 | } 37 | \references{ 38 | Stenfors, A., Chatziantoniou, I., & Gabauer, D. (2022). Independent Policy, Dependent Outcomes: A Game of Cross-Country Dominoes across European Yield Curves. Journal of International Financial Markets, Institutions and Money. 39 | } 40 | \author{ 41 | David Gabauer 42 | } 43 | -------------------------------------------------------------------------------- /DESCRIPTION: -------------------------------------------------------------------------------- 1 | Package: ConnectednessApproach 2 | Type: Package 3 | Title: Connectedness Approach 4 | Version: 1.0.4 5 | Date: 2025-02-24 6 | Authors@R: c(person("David", "Gabauer", email="david.gabauer@hotmail.com", role=c("aut","cre"))) 7 | Maintainer: David Gabauer 8 | Description: The estimation of static and dynamic connectedness measures is created in a modular and user-friendly way. Besides, the time domain connectedness approaches, this package further allows to estimate the frequency connectedness approach, the joint spillover index and the extended joint connectedness approach. In addition, all connectedness frameworks can be based upon orthogonalized and generalized VAR, QVAR, LASSO VAR, Ridge VAR, Elastic Net VAR and TVP-VAR models. Furthermore, the package includes the conditional, decomposed and partial connectedness measures as well as the pairwise connectedness index, influence index and corrected total connectedness index. Finally, a battery of datasets are available allowing to replicate a variety of connectedness papers. 9 | License: GPL-3 10 | Encoding: UTF-8 11 | LazyData: true 12 | RoxygenNote: 7.3.2 13 | Depends: R (>= 4.3) 14 | Imports: frequencyConnectedness, rmgarch, rugarch, igraph, utils, quantreg, MASS, progress, glmnet, xts, zoo, urca, moments, riskParityPortfolio, methods, PerformanceAnalytics, car, L1pack, rrcov 15 | Suggests: 16 | rmarkdown, 17 | knitr 18 | -------------------------------------------------------------------------------- /man/InternalConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/InternalConnectedness.R 3 | \name{InternalConnectedness} 4 | \alias{InternalConnectedness} 5 | \title{Internal Connectedness Measures} 6 | \usage{ 7 | InternalConnectedness( 8 | dca, 9 | groups = list(c(1), c(2:ncol(dca$NET))), 10 | start = NULL, 11 | end = NULL 12 | ) 13 | } 14 | \arguments{ 15 | \item{dca}{Dynamic connectedness object} 16 | 17 | \item{groups}{List of at least two group vectors} 18 | 19 | \item{start}{Start index} 20 | 21 | \item{end}{End index} 22 | } 23 | \value{ 24 | Get connectedness measures 25 | } 26 | \description{ 27 | This function provides internal connectedness measures 28 | } 29 | \examples{ 30 | \donttest{ 31 | data("gg2018") 32 | dca = ConnectednessApproach(gg2018, 33 | nlag=1, 34 | nfore=10, 35 | window.size=200, 36 | model="VAR", 37 | connectedness="Time") 38 | int = InternalConnectedness(dca, groups=list("US"=c(1,2,3,4), "JP"=c(5,6,7,8))) 39 | } 40 | } 41 | \references{ 42 | Gabauer, D., & Gupta, R. (2018). On the transmission mechanism of country-specific and international economic uncertainty spillovers: Evidence from a TVP-VAR connectedness decomposition approach. Economics Letters, 171, 63-71. 43 | } 44 | \author{ 45 | David Gabauer 46 | } 47 | -------------------------------------------------------------------------------- /man/EquallyWeightedPortfolio.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/EquallyWeightedPortfolio.R 3 | \name{EquallyWeightedPortfolio} 4 | \alias{EquallyWeightedPortfolio} 5 | \title{Equally weighted portfolio} 6 | \usage{ 7 | EquallyWeightedPortfolio( 8 | x, 9 | method = c("cumsum", "cumprod"), 10 | statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"), 11 | metric = "StdDev", 12 | digit = 2 13 | ) 14 | } 15 | \arguments{ 16 | \item{x}{zoo return matrix (in percentage)} 17 | 18 | \item{method}{Cumulative sum or cumulative product} 19 | 20 | \item{statistics}{Hedging effectiveness statistic} 21 | 22 | \item{metric}{Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR)} 23 | 24 | \item{digit}{Number of decimal places} 25 | } 26 | \value{ 27 | Get portfolio weights 28 | } 29 | \description{ 30 | This function calculates the equality weighted portfolio 31 | } 32 | \examples{ 33 | \donttest{ 34 | data("g2020") 35 | mcp = EquallyWeightedPortfolio(g2020/100, statistics="Fisher") 36 | mcp$TABLE 37 | } 38 | } 39 | \references{ 40 | Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170. 41 | 42 | 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. 43 | } 44 | \author{ 45 | David Gabauer 46 | } 47 | -------------------------------------------------------------------------------- /man/VarianceTest.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/VarianceTest.R 3 | \name{VarianceTest} 4 | \alias{VarianceTest} 5 | \title{Variance Test} 6 | \usage{ 7 | VarianceTest( 8 | formula, 9 | data, 10 | alpha = 0.05, 11 | method = c("Bartlett", "Brown-Forsythe", "Fligner-Killeen", "Fisher", "Levene"), 12 | na.rm = TRUE 13 | ) 14 | } 15 | \arguments{ 16 | \item{formula}{a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups.} 17 | 18 | \item{data}{a tibble or data frame containing the variables in the formula formula} 19 | 20 | \item{alpha}{the level of significance to assess variance homogeneity. Default is set to alpha = 0.05.} 21 | 22 | \item{method}{a character string to select one of the variance homogeneity tests: "Bartlett", "Brown-Forsythe", "Fisher" and "Fligner-Killeen".} 23 | 24 | \item{na.rm}{Ha logical value indicating whether NA values should be stripped before the computation proceeds.} 25 | } 26 | \value{ 27 | Get bivariate portfolio weights 28 | } 29 | \description{ 30 | VarianceTest performs variance homogeneity tests including Ftest, Bartlett, Brown-Forsythe and Fligner-Killeen tests. 31 | } 32 | \references{ 33 | 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. 34 | } 35 | \author{ 36 | David Gabauer 37 | } 38 | -------------------------------------------------------------------------------- /man/DCCGARCHselection.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/DCCGARCHselection.R 3 | \name{DCCGARCHselection} 4 | \alias{DCCGARCHselection} 5 | \title{DCC-GARCH selection specification} 6 | \usage{ 7 | DCCGARCHselection( 8 | x, 9 | distributions = c("norm", "snorm", "std", "sstd", "ged", "sged"), 10 | models = c("sGARCH", "eGARCH", "gjrGARCH", "iGARCH", "TGARCH", "AVGARCH", "NGARCH", 11 | "NAGARCH", "APARCH", "ALLGARCH"), 12 | prob = 0.05, 13 | conf.level = 0.9, 14 | lag = 20, 15 | ar = 0, 16 | ma = 0 17 | ) 18 | } 19 | \arguments{ 20 | \item{x}{zoo data matrix} 21 | 22 | \item{distributions}{Vector of distributions} 23 | 24 | \item{models}{Vector of GARCH models} 25 | 26 | \item{prob}{The quantile (coverage) used for the VaR.} 27 | 28 | \item{conf.level}{Confidence level of VaR test statistics} 29 | 30 | \item{lag}{Lag length of weighted Portmanteau statistics} 31 | 32 | \item{ar}{AR(p)} 33 | 34 | \item{ma}{MA(q)} 35 | } 36 | \value{ 37 | Get best DCC-GARCH 38 | } 39 | \description{ 40 | This function calculates the optimal DCC-GARCH specification 41 | } 42 | \references{ 43 | Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3. 44 | 45 | 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. 46 | } 47 | \author{ 48 | David Gabauer 49 | } 50 | -------------------------------------------------------------------------------- /man/FEVD.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/FEVD.R 3 | \name{FEVD} 4 | \alias{FEVD} 5 | \title{Forecast error variance decomposition} 6 | \usage{ 7 | FEVD( 8 | Phi, 9 | Sigma, 10 | nfore = 100, 11 | type = c("time", "frequency"), 12 | generalized = TRUE, 13 | range = NULL 14 | ) 15 | } 16 | \arguments{ 17 | \item{Phi}{VAR coefficient matrix} 18 | 19 | \item{Sigma}{Residual variance-covariance matrix} 20 | 21 | \item{nfore}{H-step ahead forecast horizon} 22 | 23 | \item{type}{Time or Frequency connectedness approach} 24 | 25 | \item{generalized}{Generalized or orthogonalized FEVD} 26 | 27 | \item{range}{Partition range for frequency approach only.} 28 | } 29 | \value{ 30 | Orthogonalized/generalized time/frequency forecast error variance decomposition 31 | } 32 | \description{ 33 | This function computes the orthogonalized/generalized forecast error variance decomposition 34 | } 35 | \examples{ 36 | data("dy2012") 37 | fit = VAR(dy2012, configuration=list(nlag=1)) 38 | fevd = FEVD(Phi=fit$B, Sigma=fit$Q, nfore=10, type="time", generalized=TRUE)$FEVD 39 | } 40 | \references{ 41 | Stiassny, A. (1996). A spectral decomposition for structural VAR models. Empirical Economics, 21(4), 535-555. 42 | 43 | Koop, G., Pesaran, M. H., & Potter, S. M. (1996). Impulse response analysis in nonlinear multivariate models. Journal of Econometrics, 74(1), 119-147. 44 | 45 | Pesaran, H. H., & Shin, Y. (1998). Generalized impulse response analysis in linear multivariate models. Economics Letters, 58(1), 17-29. 46 | } 47 | -------------------------------------------------------------------------------- /man/FrequencyConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/FrequencyConnectedness.R 3 | \name{FrequencyConnectedness} 4 | \alias{FrequencyConnectedness} 5 | \title{Baruník and Křehlík (2018) frequency connectedness approach} 6 | \usage{ 7 | FrequencyConnectedness( 8 | Phi, 9 | Sigma, 10 | nfore = 100, 11 | partition = c(pi, pi/2, 0), 12 | generalized = TRUE, 13 | orth = FALSE, 14 | scenario = "ABS", 15 | corrected = FALSE 16 | ) 17 | } 18 | \arguments{ 19 | \item{Phi}{VAR coefficient matrix} 20 | 21 | \item{Sigma}{Residual variance-covariance matrix} 22 | 23 | \item{nfore}{H-step ahead forecast horizon} 24 | 25 | \item{partition}{Frequency spectrum} 26 | 27 | \item{generalized}{Orthorgonalized/generalized FEVD} 28 | 29 | \item{orth}{Orthorgonalized shocks} 30 | 31 | \item{scenario}{ABS or WTH} 32 | 33 | \item{corrected}{Boolean value whether corrected or standard TCI should be computed} 34 | } 35 | \value{ 36 | Get connectedness measures 37 | } 38 | \description{ 39 | This function calculates the Baruník and Křehlík (2018) frequency connectedness measures. 40 | } 41 | \examples{ 42 | \donttest{ 43 | data("dy2012") 44 | partition = c(pi+0.00001, pi/4, 0) 45 | fit = VAR(dy2012, configuration=list(nlag=4)) 46 | dca = FrequencyConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=100, partition=partition) 47 | } 48 | } 49 | \references{ 50 | Baruník, J., & Křehlík, T. (2018). Measuring the frequency dynamics of financial connectedness and systemic risk. Journal of Financial Econometrics, 16(2), 271-296. 51 | } 52 | \author{ 53 | David Gabauer 54 | } 55 | -------------------------------------------------------------------------------- /R/RobustCovariance.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Robust Covariance 3 | #' @description Estimation of robust covariance 4 | #' @param x zoo data matrix 5 | #' @param method Either "mcd", "mve", "ogk", "tyler", "sccm" (covariance), "pearson", "spearman" and "kendall" (correlation) or a combination of the two. 6 | #' @return Estimate robust covariance matrix 7 | #' @examples 8 | #' data("dy2012") 9 | #' RobustCovariance(dy2012, method=c("pearson")) 10 | #' RobustCovariance(dy2012, method=c("mcd", "pearson")) 11 | #' @author David Gabauer 12 | #' @importFrom rrcov CovMcd 13 | #' @importFrom rrcov CovMve 14 | #' @importFrom rrcov CovSest 15 | #' @importFrom stats cor 16 | #' @export 17 | RobustCovariance = function (x, method = "pearson") { 18 | x = as.matrix(x) 19 | if ("mcd" %in% method) { 20 | Q = rrcov::CovMcd(x)@cov 21 | } else if ("mve" %in% method) { 22 | Q = rrcov::CovMve(x)@cov 23 | } else if ("ogk" %in% method) { 24 | Q = rrcov::CovOgk(x)@cov 25 | } else if ("sscm" %in% method) { 26 | Q = rrcov::CovSest(x)@cov 27 | } else if ("sde" %in% method) { 28 | Q = rrcov::CovSde(x)@cov 29 | } else { 30 | Q = cov(x) 31 | } 32 | 33 | R = ConditionalCorrelation(Q)[, , 1] 34 | S = diag(sqrt(diag(Q))) 35 | if (length(method) > 1 || method %in% c("spearman", "kendall")) { 36 | if ("spearman" %in% method) { 37 | R = 2 * sin(pi/6 * stats::cor(x, method = "spearman")) 38 | Q = S %*% R %*% S 39 | } else if ("kendall" %in% method) { 40 | R = sin(pi/2 * stats::cor(x, method = "kendall")) 41 | Q = S %*% R %*% S 42 | } 43 | } 44 | return(list(Q = Q, R = R)) 45 | } 46 | -------------------------------------------------------------------------------- /man/GARCHselection.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/GARCHselection.R 3 | \name{GARCHselection} 4 | \alias{GARCHselection} 5 | \title{Univariate GARCH selection criterion} 6 | \usage{ 7 | GARCHselection( 8 | x, 9 | distributions = c("norm", "snorm", "std", "sstd", "ged", "sged"), 10 | models = c("sGARCH", "eGARCH", "gjrGARCH", "iGARCH", "TGARCH", "AVGARCH", "NGARCH", 11 | "NAGARCH", "APARCH", "ALLGARCH"), 12 | prob = 0.05, 13 | conf.level = 0.9, 14 | lag = 20, 15 | ar = 0, 16 | ma = 0 17 | ) 18 | } 19 | \arguments{ 20 | \item{x}{zoo data matrix} 21 | 22 | \item{distributions}{Vector of distributions} 23 | 24 | \item{models}{Vector of GARCH models} 25 | 26 | \item{prob}{The quantile (coverage) used for the VaR.} 27 | 28 | \item{conf.level}{Confidence level of VaR test statistics} 29 | 30 | \item{lag}{Lag length of weighted Portmanteau statistics} 31 | 32 | \item{ar}{AR(p)} 33 | 34 | \item{ma}{MA(q)} 35 | } 36 | \value{ 37 | Get optimal univariate GARCH model specification 38 | } 39 | \description{ 40 | This function estimates and evaluates a combination of GARCH models with different distributions and suggests the best GARCH models among all alternatives given some test statistics 41 | } 42 | \references{ 43 | Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3. 44 | 45 | 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. 46 | } 47 | \author{ 48 | David Gabauer 49 | } 50 | -------------------------------------------------------------------------------- /man/RiskParityPortfolio.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/RiskParityPortfolio.R 3 | \name{RiskParityPortfolio} 4 | \alias{RiskParityPortfolio} 5 | \title{Minimum connectedness portfolio} 6 | \usage{ 7 | RiskParityPortfolio( 8 | x, 9 | H, 10 | method = c("cumsum", "cumprod"), 11 | statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"), 12 | long = TRUE, 13 | metric = "StdDev", 14 | digit = 2 15 | ) 16 | } 17 | \arguments{ 18 | \item{x}{zoo return matrix (in percentage)} 19 | 20 | \item{H}{Pairwise connectedness matrix or alternatively variance-covariance or correlation matrix} 21 | 22 | \item{method}{Cumulative sum or cumulative product} 23 | 24 | \item{statistics}{Hedging effectiveness statistic} 25 | 26 | \item{long}{Allow only long portfolio position} 27 | 28 | \item{metric}{Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR)} 29 | 30 | \item{digit}{Number of decimal places} 31 | } 32 | \value{ 33 | Get portfolio weights 34 | } 35 | \description{ 36 | This function calculates the minimum connectedness portfolio 37 | } 38 | \examples{ 39 | \donttest{ 40 | data("g2020") 41 | fit = VAR(g2020, configuration=list(nlag=1)) 42 | mcp = RiskParityPortfolio(g2020/100, fit$Q, statistics="Fisher") 43 | mcp$TABLE 44 | } 45 | } 46 | \references{ 47 | Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170. 48 | 49 | 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. 50 | } 51 | \author{ 52 | David Gabauer 53 | } 54 | -------------------------------------------------------------------------------- /man/TimeConnectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/TimeConnectedness.R 3 | \name{TimeConnectedness} 4 | \alias{TimeConnectedness} 5 | \title{Diebold and Yilmaz (2009, 2012) connectedness approach} 6 | \usage{ 7 | TimeConnectedness( 8 | Phi = NULL, 9 | Sigma = NULL, 10 | nfore = 10, 11 | generalized = TRUE, 12 | corrected = FALSE, 13 | FEVD = NULL 14 | ) 15 | } 16 | \arguments{ 17 | \item{Phi}{VAR coefficient matrix} 18 | 19 | \item{Sigma}{Residual variance-covariance matrix} 20 | 21 | \item{nfore}{H-step ahead forecast horizon} 22 | 23 | \item{generalized}{Orthorgonalized/generalized FEVD} 24 | 25 | \item{corrected}{Boolean value whether corrected or standard TCI should be computed} 26 | 27 | \item{FEVD}{Alternatively, to provide Phi and Sigma it is also possible to use FEVD directly.} 28 | } 29 | \value{ 30 | Get connectedness measures 31 | } 32 | \description{ 33 | This function allows to calculate the Diebold and Yilmaz (2009, 2012) connectedness measures. 34 | } 35 | \examples{ 36 | \donttest{ 37 | #Replication of DY2012 38 | data("dy2012") 39 | fit = VAR(dy2012, configuration=list(nlag=4)) 40 | dca = TimeConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=10, generalized=TRUE) 41 | dca$TABLE 42 | } 43 | } 44 | \references{ 45 | Diebold, F. X., & Yilmaz, K. (2009). Measuring financial asset return and volatility spillovers, with application to global equity markets. The Economic Journal, 119(534), 158-171. 46 | 47 | 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. 48 | } 49 | \author{ 50 | David Gabauer 51 | } 52 | -------------------------------------------------------------------------------- /man/HedgeRatio.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/HedgeRatio.R 3 | \name{HedgeRatio} 4 | \alias{HedgeRatio} 5 | \title{Kroner and Sultan (1993) hedge ratios} 6 | \usage{ 7 | HedgeRatio( 8 | x, 9 | H, 10 | method = c("cumsum", "cumprod"), 11 | statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"), 12 | metric = "StdDev", 13 | digit = 2 14 | ) 15 | } 16 | \arguments{ 17 | \item{x}{zoo return matrix (in percentage)} 18 | 19 | \item{H}{Residual variance-covariance, correlation or pairwise connectedness matrix} 20 | 21 | \item{method}{Cumulative sum or cumulative product} 22 | 23 | \item{statistics}{Hedging effectiveness statistic} 24 | 25 | \item{metric}{Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR)} 26 | 27 | \item{digit}{Number of decimal places} 28 | } 29 | \value{ 30 | Get hedge ratios 31 | } 32 | \description{ 33 | This function calculates the hedge ratios of Kroner and Sultan (1993) 34 | } 35 | \examples{ 36 | \donttest{ 37 | data("g2020") 38 | fit = VAR(g2020, configuration=list(nlag=1)) 39 | hr = HedgeRatio(g2020/100, fit$Q) 40 | hr$TABLE 41 | } 42 | } 43 | \references{ 44 | 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. 45 | 46 | Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170. 47 | 48 | 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. 49 | } 50 | \author{ 51 | David Gabauer 52 | } 53 | -------------------------------------------------------------------------------- /R/DCCGARCHselection.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title DCC-GARCH selection specification 3 | #' @description This function calculates the optimal DCC-GARCH specification 4 | #' @param x zoo data matrix 5 | #' @param distributions Vector of distributions 6 | #' @param models Vector of GARCH models 7 | #' @param ar AR(p) 8 | #' @param ma MA(q) 9 | #' @param prob The quantile (coverage) used for the VaR. 10 | #' @param conf.level Confidence level of VaR test statistics 11 | #' @param lag Lag length of weighted Portmanteau statistics 12 | #' @return Get best DCC-GARCH 13 | #' @importFrom stats bartlett.test coef fitted fligner.test integrate qnorm quantile residuals sd sigma var.test 14 | #' @references 15 | #' Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3. 16 | #' 17 | #' 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. 18 | #' @author David Gabauer 19 | #' @export 20 | DCCGARCHselection = function(x, distributions=c("norm","snorm","std","sstd","ged","sged"), models=c("sGARCH","eGARCH","gjrGARCH","iGARCH","TGARCH","AVGARCH","NGARCH","NAGARCH","APARCH","ALLGARCH"), prob=0.05, conf.level=0.90, lag=20, ar=0, ma=0) { 21 | if (!is(x, "zoo")) { 22 | stop("Data needs to be of type 'zoo'") 23 | } 24 | k = ncol(x) 25 | for (i in 1:k) { 26 | print(colnames(x)[i]) 27 | sel = GARCHselection(x=x[,i], distributions=distributions, models=models, 28 | prob=prob, conf.level=conf.level, lag=lag, ar=ar, ma=ma) 29 | if (i==1) { 30 | mspec = sel$best_ugarch 31 | } else { 32 | mspec = c(mspec, sel$best_ugarch) 33 | } 34 | } 35 | mspec 36 | } 37 | -------------------------------------------------------------------------------- /man/BivariateDCCGARCH.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/BivariateDCCGARCH.R 3 | \name{BivariateDCCGARCH} 4 | \alias{BivariateDCCGARCH} 5 | \title{Bivariate DCC-GARCH} 6 | \usage{ 7 | BivariateDCCGARCH( 8 | x, 9 | spec, 10 | copula = "mvt", 11 | method = "Kendall", 12 | transformation = "parametric", 13 | time.varying = TRUE, 14 | asymmetric = FALSE, 15 | eval.se = FALSE, 16 | print = TRUE 17 | ) 18 | } 19 | \arguments{ 20 | \item{x}{zoo dataset} 21 | 22 | \item{spec}{A cGARCHspec A cGARCHspec object created by calling cgarchspec.} 23 | 24 | \item{copula}{"mvnorm" or "mvt" (see, rmgarch package)} 25 | 26 | \item{method}{"Kendall" or "ML" (see, rmgarch package)} 27 | 28 | \item{transformation}{"parametric", "empirical" or "spd" (see, rmgarch package)} 29 | 30 | \item{time.varying}{Boolean value to either choose DCC-GARCH or CCC-GARCH} 31 | 32 | \item{asymmetric}{Whether to include an asymmetry term to the DCC model (thus estimating the aDCC).} 33 | 34 | \item{eval.se}{Boolean value to compute standard errors} 35 | } 36 | \value{ 37 | Estimate Bivariate DCC-GARCH 38 | } 39 | \description{ 40 | This function multiple Bivariate DCC-GARCH models that captures more accurately conditional covariances and correlations 41 | } 42 | \references{ 43 | Cocca, T., Gabauer, D., & Pomberger, S. (2024). Clean energy market connectedness and investment strategies: New evidence from DCC-GARCH R2 decomposed connectedness measures. Energy Economics. 44 | 45 | Engle, R. (2002). Dynamic conditional correlation: A simple class of multivariate generalized autoregressive conditional heteroskedasticity models. Journal of Business & Economic Statistics, 20(3), 339-350. 46 | } 47 | \author{ 48 | David Gabauer 49 | } 50 | -------------------------------------------------------------------------------- /R/VAR.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Vector autoregression 3 | #' @description Estimation of a VAR using equation-by-equation OLS regressions. 4 | #' @param x zoo data matrix 5 | #' @param nlag Lag length 6 | #' @param method OLS estimates are based on Pearson, Spearman or Kendall correlation. 7 | #' @param configuration model configuration 8 | #' @return Estimate VAR model 9 | #' @examples 10 | #' data("dy2012") 11 | #' fit = VAR(dy2012, configuration=list(nlag=1)) 12 | #' @references Sims, C. A. (1980). Macroeconomics and reality. Econometrica, 1-48. 13 | #' @author David Gabauer 14 | #' @importFrom stats embed 15 | #' @export 16 | VAR = function (x, configuration = list(nlag=1, method="pearson")) { 17 | if (!is(x, "zoo")) { 18 | stop("Data needs to be of type 'zoo'") 19 | } 20 | k = ncol(x) 21 | NAMES = colnames(x) 22 | if (is.null(NAMES)) { 23 | NAMES = 1:k 24 | } 25 | nlag = as.numeric(configuration$nlag) 26 | if (nlag <= 0) { 27 | stop("nlag needs to be a positive integer") 28 | } 29 | 30 | Res = B = se = NULL 31 | for (i in 1:k) { 32 | z = stats::embed(x, nlag + 1) 33 | Z = cbind(z[, -c(1:k)]) 34 | XX = RobustCovariance(Z, method=configuration$method)$Q*nrow(Z) 35 | yX = matrix(RobustCovariance(cbind(z[,i], Z), method=configuration$method)$Q[1,-1], ncol=1)*nrow(Z) 36 | XXinv = solve(XX) 37 | beta = XXinv %*% yX 38 | resid = (z[,i] - mean(z[,i])) - c(Z%*%beta) 39 | resid = scale(resid, T, F) 40 | sigma2 = sum(resid^2) / (nrow(Z)-ncol(Z)-1) 41 | 42 | B = rbind(B, c(beta)) 43 | se = rbind(se, sqrt(diag(sigma2*XXinv))) 44 | Res = cbind(Res, resid) 45 | } 46 | Q = array(t(Res)%*%Res/nrow(Res), c(k, k, 1), 47 | dimnames = list(NAMES, NAMES, tail(as.character(zoo::index(x)), 1))) 48 | results = list(B = B, Q = Q, Res=Res, se = se) 49 | } 50 | -------------------------------------------------------------------------------- /man/MultivariateHedgingPortfolio.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MultivariateHedgingPortfolio.R 3 | \name{MultivariateHedgingPortfolio} 4 | \alias{MultivariateHedgingPortfolio} 5 | \title{Multivariate Hedging Portfolio} 6 | \usage{ 7 | MultivariateHedgingPortfolio( 8 | x, 9 | H, 10 | method = c("cumsum", "cumprod"), 11 | statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"), 12 | metric = "StdDev", 13 | digit = 2 14 | ) 15 | } 16 | \arguments{ 17 | \item{x}{zoo return matrix (in percentage)} 18 | 19 | \item{H}{Residual variance-covariance, correlation or pairwise connectedness matrix} 20 | 21 | \item{method}{Cumulative sum or cumulative product} 22 | 23 | \item{statistics}{Hedging effectiveness statistic} 24 | 25 | \item{metric}{Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR)} 26 | 27 | \item{digit}{Number of decimal places} 28 | } 29 | \value{ 30 | Get hedge ratios 31 | } 32 | \description{ 33 | This function calculates the multivariate hedging portfolio of Cocca et al. (2024) 34 | } 35 | \examples{ 36 | \donttest{ 37 | data("g2020") 38 | fit = VAR(g2020, configuration=list(nlag=1)) 39 | mhp = MultivariateHedgingPortfolio(g2020/100, fit$Q) 40 | mhp$TABLE 41 | } 42 | } 43 | \references{ 44 | Cocca, T., Gabauer, D., & Pomberger, S. (2024). Clean energy market connectedness and investment strategies: New evidence from DCC-GARCH R2 decomposed connectedness measures. Energy Economics. 45 | 46 | Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170. 47 | 48 | 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. 49 | } 50 | \author{ 51 | David Gabauer 52 | } 53 | -------------------------------------------------------------------------------- /man/BivariatePortfolio.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/BivariatePortfolio.R 3 | \name{BivariatePortfolio} 4 | \alias{BivariatePortfolio} 5 | \title{Kroner and Ng (1998) optimal bivariate portfolio weights} 6 | \usage{ 7 | BivariatePortfolio( 8 | x, 9 | H, 10 | method = c("cumsum", "cumprod"), 11 | long = TRUE, 12 | statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"), 13 | metric = "StdDev", 14 | digit = 2 15 | ) 16 | } 17 | \arguments{ 18 | \item{x}{zoo return matrix (in percentage)} 19 | 20 | \item{H}{Residual variance-covariance, correlation or pairwise connectedness matrix} 21 | 22 | \item{method}{Cumulative sum or cumulative product} 23 | 24 | \item{long}{Allow only long portfolio position} 25 | 26 | \item{statistics}{Hedging effectiveness statistic} 27 | 28 | \item{metric}{Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR)} 29 | 30 | \item{digit}{Number of decimal places} 31 | } 32 | \value{ 33 | Get bivariate portfolio weights 34 | } 35 | \description{ 36 | This function calculates the optimal portfolio weights according to Kroner and Ng (1998) 37 | } 38 | \examples{ 39 | \donttest{ 40 | data("g2020") 41 | fit = VAR(g2020, configuration=list(nlag=1)) 42 | bpw = BivariatePortfolio(g2020/100, fit$Q, method="cumsum", statistics="Fisher") 43 | bpw$TABLE 44 | } 45 | } 46 | \references{ 47 | Kroner, K. F., & Ng, V. K. (1998). Modeling asymmetric comovements of asset returns. The Review of Financial Studies, 11(4), 817-844. 48 | 49 | Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170. 50 | 51 | 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. 52 | } 53 | \author{ 54 | David Gabauer 55 | } 56 | -------------------------------------------------------------------------------- /man/ElasticNetVAR.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/ElasticNetVAR.R 3 | \name{ElasticNetVAR} 4 | \alias{ElasticNetVAR} 5 | \title{Elastic Net vector autoregression} 6 | \usage{ 7 | ElasticNetVAR( 8 | x, 9 | configuration = list(nlag = 1, nfolds = 10, loss = "mae", alpha = NULL, n_alpha = 10) 10 | ) 11 | } 12 | \arguments{ 13 | \item{x}{zoo data matrix} 14 | 15 | \item{configuration}{Model configuration} 16 | 17 | \item{nlag}{Lag length} 18 | 19 | \item{nfolds}{N-fold cross validation} 20 | 21 | \item{loss}{Loss function} 22 | 23 | \item{alpha}{LASSO is alpha equal 1 and Ridge if alpha equal 0} 24 | 25 | \item{n_alpha}{Creates n-equidistant alpha values} 26 | } 27 | \value{ 28 | Estimate VAR model 29 | } 30 | \description{ 31 | Estimation of a VAR using equation-by-equation LASSO, Ridge or Elastic Net regressions. 32 | } 33 | \examples{ 34 | \donttest{ 35 | data("dy2012") 36 | fit = ElasticNetVAR(dy2012, configuration=list(nlag=1, alpha=1, nfolds=10, loss="mae")) 37 | } 38 | } 39 | \references{ 40 | Tibshirani, R., Bien, J., Friedman, J., Hastie, T., Simon, N., Taylor, J., & Tibshirani, R. J. (2012). Strong rules for discarding predictors in lasso‐type problems. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(2), 245-266. 41 | 42 | Hoerl, A. E., & Kennard, R. W. (1970). Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1), 55-67. 43 | 44 | Zou, H., & Hastie, T. (2005). Regularization and variable selection via the elastic net. Journal of the royal statistical society: series B (statistical methodology), 67(2), 301-320. 45 | 46 | Gabauer, D., Gupta, R., Marfatia, H. A., & Miller, S. M. (2024). Estimating US housing price network connectedness: Evidence from dynamic Elastic Net, Lasso, and ridge vector autoregressive models. International Review of Economics & Finance, 89, 349-362. 47 | } 48 | \author{ 49 | David Gabauer 50 | } 51 | -------------------------------------------------------------------------------- /R/BayesPrior.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Bayes Prior 3 | #' @description Get Bayes prior 4 | #' @param x zoo data matrix 5 | #' @param nlag Lag length 6 | #' @param size Sample size used to calculate prior parameters 7 | #' @return Get Bayes Prior 8 | #' @examples 9 | #' \donttest{ 10 | #' data("dy2012") 11 | #' prior = BayesPrior(dy2012, nlag=1) 12 | #' } 13 | #' @importFrom methods is 14 | #' @references Primiceri, G. E. (2005). Time varying structural vector autoregressions and monetary policy. The Review of Economic Studies, 72(3), 821-852. 15 | #' @author David Gabauer 16 | #' @export 17 | BayesPrior = function(x, size=NULL, nlag) { 18 | if (!is(x, "zoo")) { 19 | stop("Data needs to be of type 'zoo'") 20 | } 21 | if (nlag<=0) { 22 | stop("nlag needs to be a positive integer") 23 | } 24 | if (is.null(size)) { 25 | size = nrow(x) 26 | } 27 | if ((size-nlag)<=0) { 28 | stop("size needs to be larger than nlag") 29 | } 30 | 31 | p = ncol(x) 32 | size = size - nlag 33 | yt = t(x[(nlag+1):(size+nlag),]) 34 | m = p + nlag*(p^2) 35 | Zt = NULL 36 | for (i in (nlag+1):(size+nlag)) { 37 | ztemp = diag(p) 38 | for (j in 1:nlag) { 39 | xlag = x[(i-j),1:p] 40 | xtemp = matrix(0,p,p*p) 41 | for (jj in 1:p) { 42 | xtemp[jj,((jj-1)*p+1):(jj*p)] = xlag 43 | } 44 | ztemp = cbind(ztemp, xtemp) 45 | } 46 | Zt = rbind(Zt, ztemp) 47 | } 48 | vbar = matrix(0,m,m) 49 | xhy = matrix(0,m,1) 50 | for (i in 1:size) { 51 | zhat1 = Zt[((i-1)*p+1):(i*p),] 52 | vbar = vbar + t(zhat1)%*%zhat1 53 | xhy = xhy + t(zhat1)%*%as.matrix(yt[,i]) 54 | } 55 | vbar = MASS::ginv(vbar) 56 | aols = vbar%*%xhy 57 | 58 | sse2 = matrix(0,p,p) 59 | for (i in 1:size) { 60 | zhat1 = Zt[((i-1)*p+1):(i*p),] 61 | sse2 = sse2 + (yt[,i] - zhat1%*%aols)%*%t(yt[,i] - zhat1%*%aols) 62 | } 63 | hbar = sse2/size 64 | return(list(bprior=aols[-c(1:p)],Vprior=vbar[-c(1:p),-c(1:p)],Q=hbar)) 65 | } 66 | -------------------------------------------------------------------------------- /R/ConnectednessTable.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Connectedness table 3 | #' @description This function provides standard connectedness table. 4 | #' @param FEVD Forecast error variance decomposition 5 | #' @param digit Number of decimal places 6 | #' @return Get connectedness table 7 | #' @examples 8 | #' \donttest{ 9 | #' data("dy2012") 10 | #' fit = VAR(dy2012, configuration=list(nlag=1)) 11 | #' fevd = FEVD(Phi=fit$B, Sigma=fit$Q, nfore=10, type="time", generalized=TRUE)$FEVD 12 | #' dca = ConnectednessTable(fevd) 13 | #' } 14 | #' @export 15 | ConnectednessTable = function(FEVD, digit=2) { 16 | if (length(dim(FEVD))<=1) { 17 | stop("FEVD needs to be at least a 2-dimensional matrix") 18 | } 19 | NAMES = colnames(FEVD) 20 | k = dim(FEVD)[1] 21 | if (is.null(NAMES)) { 22 | NAMES = 1:k 23 | } 24 | CT = apply(FEVD,1:2,mean)*100 # spillover from others to one specific 25 | OWN = diag(diag(CT)) 26 | TO = colSums(CT-OWN) 27 | FROM = rowSums(CT-OWN) 28 | NET = TO-FROM 29 | TCI = mean(TO) 30 | cTCI = TCI*k/(k-1) 31 | NPDC = CT-t(CT) 32 | NPT = rowSums(NPDC<0) 33 | INFLUENCE = 100*abs(NPDC/t(t(CT)+CT)) 34 | table = format(round(cbind(CT,FROM),digit),nsmall=digit) 35 | to = c(format(round(c(TO,sum(TO)),digit),nsmall=digit)) 36 | inc = c(format(round(colSums(CT), digit),nsmall=digit), "cTCI/TCI") 37 | tci = paste0(format(round(cTCI,digit),nsmall=digit),"/",format(round(TCI,digit),nsmall=digit)) 38 | net = c(format(round(NET,digit),nsmall=digit)) 39 | net = c(net, tci) 40 | npt = c(format(round(NPT,digit),nsmall=digit), "") 41 | 42 | TABLE = rbind(table,to,inc,net,npt) 43 | colnames(TABLE) = c(NAMES,"FROM") 44 | rownames(TABLE) = c(NAMES,"TO","Inc.Own","NET","NPT") 45 | PCI = matrix(NA, k, k) 46 | for (i in 1:k) { 47 | for (j in 1:k) { 48 | PCI[i,j] = 200*(CT[i,j]+CT[j,i])/(CT[i,i]+CT[i,j]+CT[j,i]+CT[j,j]) 49 | } 50 | } 51 | return = list(FEVD=CT, TCI=TCI, cTCI=cTCI, PCI=PCI, 52 | TO=TO, FROM=FROM, NET=NET, NPDC=NPDC, TABLE=TABLE, 53 | NPT=NPT, INFLUENCE=INFLUENCE) 54 | } 55 | -------------------------------------------------------------------------------- /man/MinimumConnectednessPortfolio.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/MinimumConnectednessPortfolio.R 3 | \name{MinimumConnectednessPortfolio} 4 | \alias{MinimumConnectednessPortfolio} 5 | \title{Minimum connectedness portfolio} 6 | \usage{ 7 | MinimumConnectednessPortfolio( 8 | x, 9 | H, 10 | method = c("cumsum", "cumprod"), 11 | statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"), 12 | long = TRUE, 13 | metric = "StdDev", 14 | digit = 2 15 | ) 16 | } 17 | \arguments{ 18 | \item{x}{zoo return matrix (in percentage)} 19 | 20 | \item{H}{Pairwise connectedness matrix or alternatively variance-covariance or correlation matrix} 21 | 22 | \item{method}{Cumulative sum or cumulative product} 23 | 24 | \item{statistics}{Hedging effectiveness statistic} 25 | 26 | \item{long}{Allow only long portfolio position} 27 | 28 | \item{metric}{Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR)} 29 | 30 | \item{digit}{Number of decimal places} 31 | } 32 | \value{ 33 | Get portfolio weights 34 | } 35 | \description{ 36 | This function calculates the minimum connectedness portfolio 37 | } 38 | \examples{ 39 | data("g2020") 40 | fit = VAR(g2020, configuration=list(nlag=1)) 41 | dca = TimeConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=10, generalized=TRUE) 42 | mcp = MinimumConnectednessPortfolio(g2020/100, dca$PCI, statistics="Fisher") 43 | mcp$TABLE 44 | } 45 | \references{ 46 | 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. 47 | 48 | Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170. 49 | 50 | 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. 51 | } 52 | \author{ 53 | David Gabauer 54 | } 55 | -------------------------------------------------------------------------------- /R/QVAR.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Quantile vector autoregression 3 | #' @description Estimation of a QVAR using equation-by-equation quantile regressions. 4 | #' @param x zoo data matrix 5 | #' @param nlag Lag length 6 | #' @param tau quantile between 0 and 1 7 | #' @param method See methods for rq in quantreg package. Default is "fn". 8 | #' @param configuration model configuration 9 | #' @return Estimate QVAR model 10 | #' @examples 11 | #' \donttest{ 12 | #' data("dy2012") 13 | #' fit = QVAR(dy2012, configuration=list(nlag=1, tau=0.5)) 14 | #' } 15 | #' @importFrom quantreg rq 16 | #' @references 17 | #' White, H., Kim, T. H., & Manganelli, S. (2015). VAR for VaR: Measuring tail dependence using multivariate regression quantiles. Journal of Econometrics, 187(1), 169-188. 18 | #' 19 | #' Chatziantoniou, I., Gabauer, D., & Stenfors, A. (2021). Interest rate swaps and the transmission mechanism of monetary policy: A quantile connectedness approach. Economics Letters, 204, 109891. 20 | #' @author David Gabauer 21 | #' @export 22 | QVAR = function(x, configuration=list(nlag=1, tau=0.5, method="fn")) { 23 | tau = as.numeric(configuration$tau) 24 | nlag = as.numeric(configuration$nlag) 25 | if (is.null(configuration$method)) { 26 | configuration$method = "fn" 27 | } 28 | method = as.character(configuration$method) 29 | 30 | if (!is(x, "zoo")) { 31 | stop("Data needs to be of type 'zoo'") 32 | } 33 | if (nlag<=0) { 34 | stop("nlag needs to be a positive integer") 35 | } 36 | if ((sum(tau <= 0 | tau >= 1))>0) { 37 | stop("tau needs to be within 0 and 1") 38 | } 39 | k = ncol(x) 40 | if (length(tau)!=k) { 41 | tau = rep(tau,k) 42 | } 43 | NAMES = colnames(x) 44 | if (is.null(NAMES)) { 45 | NAMES = 1:k 46 | } 47 | 48 | Res = B = NULL 49 | for (i in 1:k) { 50 | z = embed(x, nlag+1) 51 | fit = rq(z[,i] ~ z[,-c(1:k)], tau=tau[i], method=method) 52 | B = rbind(B, fit$coefficients[-1]) 53 | Res = cbind(Res, fit$residuals) 54 | } 55 | Q = array(t(Res)%*%Res/nrow(Res), c(k, k, 1), dimnames=list(NAMES, NAMES, tail(zoo::index(rownames(x)),1))) 56 | results = list(B=B, Q=Q, Res=Res) 57 | } 58 | -------------------------------------------------------------------------------- /man/R2Connectedness.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/R2Connectedness.R 3 | \name{R2Connectedness} 4 | \alias{R2Connectedness} 5 | \title{R2 connectedness approach} 6 | \usage{ 7 | R2Connectedness( 8 | x, 9 | window.size = NULL, 10 | nlag = 1, 11 | tau = NULL, 12 | method = "pearson", 13 | relative = FALSE, 14 | lambda = 0 15 | ) 16 | } 17 | \arguments{ 18 | \item{x}{zoo data matrix} 19 | 20 | \item{window.size}{Rolling-window size or Bayes Prior sample size} 21 | 22 | \item{nlag}{Lag length} 23 | 24 | \item{tau}{Quantile between 0 and 1} 25 | 26 | \item{method}{Methods for R2 connectedness are:"pearson", "spearman", or "kendall". "pearson" is default. Methods for pseudo R2 quantile connectedness are: "lasso", "br", "fn", or "sfn". "lasso" is default.} 27 | 28 | \item{relative}{Boolean whether relative or absolute R2 should be used} 29 | 30 | \item{lambda}{The correlation shrinkage intensity (range 0-1). If lambda is not specified (the default) it is estimated using an analytic formula from Sch\"afer and Strimmer (2005) - see details below. For lambda=0 the empirical correlations are recovered.} 31 | } 32 | \value{ 33 | Get R2 connectedness measures 34 | } 35 | \description{ 36 | This function computes the R2 connectedness measures as well as peudo R2 quantile connectedness measures 37 | } 38 | \examples{ 39 | \donttest{ 40 | data("dy2012") 41 | dca = R2Connectedness(dy2012, window.size=NULL, nlag=0, method="pearson") 42 | dca$TABLE 43 | } 44 | } 45 | \references{ 46 | Naeem, M. A., Chatziantoniou, I., Gabauer, D., & Karim, S. (2023). Measuring the G20 Stock Market Return Transmission Mechanism: Evidence From the R2 Connectedness Approach. International Review of Financial Analysis. 47 | 48 | Balli, F., Balli, H. O., Dang, T. H. N., & Gabauer, D. (2023). Contemporaneous and lagged R2 decomposed connectedness approach: New evidence from the energy futures market. Finance Research Letters, 57, 104168. 49 | 50 | Ferrer, R., Shahzad, S. J. H., Furió, D., & Benammar, R. (2025). Systemic Risk in the Tails: Contemporaneous Transmission and Spillover Dynamics in European Renewable Energy Equities. 51 | } 52 | \author{ 53 | David Gabauer 54 | } 55 | -------------------------------------------------------------------------------- /R/QuantileCorrelation.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Quantile correlation 3 | #' @description This function computes the quantile correlation coefficient proposed by Choi and Shin (2022). 4 | #' @param x zoo data matrix 5 | #' @param tau quantile between 0 and 1 6 | #' @param method Either "lasso", "br", "fn" or "sfn". Default is "lasso" 7 | #' @return Get quantile correlations 8 | #' @importFrom zoo zoo 9 | #' @importFrom zoo index 10 | #' @examples 11 | #' \donttest{ 12 | #' data("g2020") 13 | #' fit = QuantileCorrelation(g2020, tau=0.5) 14 | #' } 15 | #' @references 16 | #' Choi, J. E., & Shin, D. W. (2022). Quantile correlation coefficient: A new tail dependence measure. Statistical Papers, 63(4), 1075-1104. 17 | #' @author David Gabauer 18 | #' @export 19 | QuantileCorrelation = function(x, tau=0.5, method="lasso") { 20 | stopifnot(tau > 0, tau < 1) 21 | 22 | # coerce to numeric matrix 23 | if (zoo::is.zoo(x) || xts::is.xts(x)) x <- zoo::coredata(x) 24 | x <- as.matrix(x) 25 | storage.mode(x) <- "double" 26 | 27 | n <- ncol(x) 28 | nm <- colnames(x) 29 | if (is.null(nm)) nm <- paste0("V", seq_len(n)) 30 | 31 | # result matrix 32 | corQ <- matrix(NA_real_, n, n, dimnames = list(nm, nm)) 33 | diag(corQ) <- 1 34 | 35 | # choose faster quantile regression solver 36 | rq_fit <- switch( 37 | method, 38 | br = function(y, X) quantreg::rq.fit.br (X, y, tau = tau)$coefficients, 39 | sfn = function(y, X) quantreg::rq.fit.sfn(X, y, tau = tau)$coefficients, 40 | fn = function(y, X) quantreg::rq.fit.fnb(X, y, tau = tau)$coefficients, 41 | lasso = function(y, X) quantreg::rq.fit.lasso(X, y, tau = tau)$coefficients, 42 | stop("Unknown 'method': use one of 'lasso', 'br', 'sfn', 'fn'", call. = FALSE) 43 | ) 44 | 45 | # compute pairwise quantile correlations (upper triangle) 46 | inds <- which(upper.tri(corQ), arr.ind = TRUE) 47 | vals <- vapply(seq_len(nrow(inds)), function(k) { 48 | i <- inds[k, 1]; j <- inds[k, 2] 49 | xi <- x[, i]; xj <- x[, j] 50 | 51 | ok <- is.finite(xi) & is.finite(xj) 52 | xi <- xi[ok]; xj <- xj[ok] 53 | if (length(xi) < 3L) return(NA_real_) 54 | 55 | # y ~ 1 + x 56 | X1 <- cbind(1, xi) 57 | b2.1 <- rq_fit(y = xj, X = X1)[2] 58 | 59 | # x ~ 1 + y 60 | X2 <- cbind(1, xj) 61 | b1.2 <- rq_fit(y = xi, X = X2)[2] 62 | 63 | qcor <- sign(b2.1) * (if ((b2.1 * b1.2) > 0) sqrt(b2.1 * b1.2) else 0) 64 | if (qcor > 1) qcor <- 0.999999 65 | if (qcor < -1) qcor <- -0.999999 66 | qcor 67 | }, numeric(1)) 68 | 69 | # fill symmetric matrix 70 | corQ[upper.tri(corQ)] = vals 71 | corQ[lower.tri(corQ)] = t(corQ)[lower.tri(corQ)] 72 | corQ 73 | } 74 | -------------------------------------------------------------------------------- /R/R2Correlations.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title R2 decomposed connectedness from correlations 3 | #' @description This function computes the R2 decomposed connectedness measures from correlations 4 | #' @param R zoo correlation data matrix 5 | #' @return Get R2 connectedness measures from correlation matrix 6 | #' @import progress 7 | #' @importFrom utils setTxtProgressBar txtProgressBar 8 | #' @references 9 | #' Naeem, M. A., Chatziantoniou, I., Gabauer, D., & Karim, S. (2023). Measuring the G20 Stock Market Return Transmission Mechanism: Evidence From the R2 Connectedness Approach. International Review of Financial Analysis. 10 | #' 11 | #' Balli, F., Balli, H. O., Dang, T. H. N., & Gabauer, D. (2023). Contemporaneous and lagged R2 decomposed connectedness approach: New evidence from the energy futures market. Finance Research Letters, 57, 104168. 12 | #' @author David Gabauer 13 | #' @export 14 | R2Correlations = function(R) { 15 | date = as.character(dimnames(R)[[3]]) 16 | 17 | k = ncol(R) 18 | if (length(dim(R))==2) { 19 | R = array(R, c(k,k,1)) 20 | } 21 | t = dim(R)[3] 22 | NAMES = colnames(R) 23 | 24 | R2dec = array(1, c(k,k,t), dimnames=list(NAMES,NAMES,date)) 25 | pb = txtProgressBar(max=t,style=3) 26 | for (j in 1:t) { 27 | setTxtProgressBar(pb, j) 28 | for (i in 1:k) { 29 | Rc = R[,,j] 30 | ryx = Rc[-i,i,drop=F] 31 | rxx = Rc[-i,-i] 32 | 33 | eigcovx = eigen(rxx, TRUE) 34 | rootcovx = eigcovx$vectors%*%diag(sqrt(abs(eigcovx$values)))%*%t(eigcovx$vectors) 35 | cd = rootcovx^2 %*% (solve(rootcovx)%*%ryx)^2 36 | if (sum(cd)>1) { 37 | R2dec[i,-i,j] = R2dec[i,-i,c(j-1)] 38 | } else { 39 | R2dec[i,-i,j] = cd 40 | } 41 | } 42 | } 43 | TABLE = ConnectednessTable(apply(R2dec,1:2,mean))$TABLE 44 | 45 | t0 = dim(R2dec)[3] 46 | TCI = array(0, c(t0, 1), dimnames=list(date, "TCI")) 47 | TO = FROM = NET = array(0, c(t0, k), dimnames=list(date, NAMES)) 48 | FEVD = NPDC = array(0, c(k, k, t0), dimnames=list(NAMES, NAMES, date)) 49 | for (i in 1:dim(R2dec)[3]) { 50 | ct = ConnectednessTable(R2dec[,,i]) 51 | FEVD[,,i] = ct$FEVD 52 | NPDC[,,i] = ct$NPDC 53 | TO[i,] = ct$TO 54 | FROM[i,] = ct$FROM 55 | NET[i,] = ct$NET 56 | TCI[i,] = mean(ct$TO) 57 | } 58 | 59 | PCI = R2dec 60 | for (l in 1:dim(R2dec)[3]) { 61 | for (i in 1:k) { 62 | for (j in 1:k) { 63 | PCI[i,j,l] = 2*(R2dec[i,j,l]+R2dec[j,i,l])/(R2dec[i,j,l]+R2dec[j,i,l]+R2dec[i,i,l]+R2dec[j,j,l]) 64 | } 65 | } 66 | } 67 | 68 | config = list(approach="R2") 69 | return = list(CT=R2dec, TO=TO, FROM=FROM, NET=NET, TCI=TCI, PCI=PCI, NPDC=NPDC, TABLE=TABLE, config=config) 70 | } -------------------------------------------------------------------------------- /R/PlotNPT.R: -------------------------------------------------------------------------------- 1 | #' @title Dynamic net pairwise transmission plot 2 | #' @description Visualize dynamic net total directional connectedness 3 | #' @param dca Connectedness object 4 | #' @param ca Compare dca object with a single connectedness object or a list of of connectedness objects 5 | #' @param path Path where plots should be saved 6 | #' @param width The width of the graphics region in inches 7 | #' @param height The height of the graphics region in inches 8 | #' @param ... Arguments to be passed to methods, such as graphidcal parameters (see par). 9 | #' @return Return connectedness plot 10 | #' @export 11 | PlotNPT = function(dca, ca=NULL, path=NULL, width=10, height=7, ...) { 12 | if (!is.null(path)) { 13 | if (!dir.exists(path)) { 14 | dir.create(path) 15 | } 16 | } 17 | if (length(ca)>0 && !is.null(ca$config$approach)) { 18 | ca = list(ca) 19 | } 20 | x = dca$NPT 21 | if (is.null(x)) { 22 | stop(paste(dca$config$approach, "has no NPT.")) 23 | } 24 | date = as.Date(rownames(x)) 25 | t = length(date) 26 | k = ncol(x) 27 | NAMES = colnames(x) 28 | if (is.null(NAMES)) { 29 | NAMES = 1:k 30 | } 31 | k_row = ceiling(sqrt(k)) 32 | k_col = ceiling(k/k_row) 33 | 34 | oldpar = par(no.readonly=TRUE) 35 | on.exit(par(oldpar)) 36 | if (!is.null(path)) pdf(file=paste0(path, "/NPT.pdf"), width=width, height=height) 37 | par(mfcol=c(k_row,k_col), oma=c(0,0,0,0) + 0.5, mar = c(1,1,1,1) + .5, mgp=c(1, 0.4, 0)) 38 | if (length(dim(dca$NET))>2) { 39 | for (i in 1:k) { 40 | x_ = x[,i,] 41 | plot(date, apply(x_,1,sum), type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(0,k-1))#, ...) 42 | grid(NA, NULL, lty=2) 43 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(apply(x_,1,sum))),col=1, border=1) 44 | for (j in ncol(x_):1) { 45 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x_[,j])),col=j+1, border=j+1) 46 | } 47 | for (j in 1:ncol(x_)) { 48 | lines(date, x_[,j],col=j+1) 49 | } 50 | lines(date, apply(x_,1,sum), col=1) 51 | abline(h=0, lty=3) 52 | legend("topleft", colnames(x_), fill=1:(ncol(x_)+1), bty="n") 53 | box() 54 | } 55 | } else { 56 | for (i in 1:k) { 57 | plot(date, x[,i], type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(0,k-1), ...) 58 | grid(NA, NULL, lty=2) 59 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x[,i])),col=1, border=1) 60 | if (!is.null(ca)) { 61 | for (il in 1:length(ca)) { 62 | lines(as.Date(rownames(ca[[il]]$TCI)), ca[[il]]$NPT[,i], col=il+1) 63 | } 64 | } 65 | abline(h=0, lty=3) 66 | box() 67 | } 68 | } 69 | if (!is.null(path)) dev.off() 70 | } 71 | 72 | -------------------------------------------------------------------------------- /man/WeightedBoxTest.Rd: -------------------------------------------------------------------------------- 1 | % Generated by roxygen2: do not edit by hand 2 | % Please edit documentation in R/WeightedBoxTest.R 3 | \name{WeightedBoxTest} 4 | \alias{WeightedBoxTest} 5 | \title{WeightedBoxTest} 6 | \usage{ 7 | WeightedBoxTest( 8 | x, 9 | lag = 1, 10 | type = c("Box-Pierce", "Ljung-Box", "Monti"), 11 | fitdf = 0, 12 | sqrd.res = FALSE, 13 | log.sqrd.res = FALSE, 14 | abs.res = FALSE, 15 | weighted = TRUE 16 | ) 17 | } 18 | \arguments{ 19 | \item{x}{a numeric vector or univariate time series, or residuals of a fitted time series} 20 | 21 | \item{lag}{the statistic will be based on lag autocorrelation coefficients. lag=1 by default} 22 | 23 | \item{type}{test to be performed, partial matching is used. "Box-Pierce" by default} 24 | 25 | \item{fitdf}{number of degrees of freedom to be subtracted if x is a series of residuals, set at 0 by default} 26 | 27 | \item{sqrd.res}{A flag, should the series/residuals be squared to detect for nonlinear effects?, FALSE by default} 28 | 29 | \item{log.sqrd.res}{A flag, should a log of the squared series/residuals be used to detect for nonlinear effects? FALSE by default} 30 | 31 | \item{abs.res}{A flag, should the absolute series or residuals be used to detect for nonlinear effects? FALSE by default} 32 | 33 | \item{weighted}{A flag determining if the weighting scheme should be utilized. TRUE by default. If set to FALSE, the traditional test is performed with no weights} 34 | } 35 | \value{ 36 | Get Uninformative Prior 37 | } 38 | \description{ 39 | Weighted portmanteau tests for testing the null hypothesis of adequate ARMA fit and/or for detecting nonlinear processes. Written in the style of Box.test() and is capable of performing the traditional Box Pierce (1970), Ljung Box (1978) or Monti (1994) tests. 40 | } 41 | \references{ 42 | Box, G. E. P. and Pierce, D. A. (1970), Distribution of residual correlations in autoregressive-integrated moving average time series models. Journal of the American Statistical Association, 65, 1509-1526. 43 | 44 | Fisher, T. J. and Gallagher, C. M. (2012), New Weighted Portmanteau Statistics for Time Series Goodness-of-Fit Testing. Journal of the American Statistical Association, accepted. 45 | 46 | Ljung, G. M. and Box, G. E. P. (1978), On a measure of lack of fit in time series models. Biometrika 65, 297-303. 47 | 48 | Mahdi, E. and McLeod, A. I. (2012), Improved multivariate portmanteau test. Journal of Time Series Analysis 65(2), 297-303. 49 | 50 | Monti, A. C. (1994), A proposal for a residual autocorrelation test in linear models. Biometrika 81(4), 776-780. 51 | 52 | Pena, D. and Rodriguez, J. (2002) A powerful portmanteau test of lack of fit for time series. Journal of the American Statistical Association 97(458), 601-610. 53 | } 54 | \author{ 55 | David Gabauer 56 | } 57 | -------------------------------------------------------------------------------- /R/PlotTO.R: -------------------------------------------------------------------------------- 1 | #' @title Dynamic to total directional connectedness plot 2 | #' @description Visualize dynamic to total directional connectedness 3 | #' @param dca Connectedness object 4 | #' @param ca Compare dca object with a single connectedness object or a list of of connectedness objects 5 | #' @param path Path where plots should be saved 6 | #' @param ylim A vector including the lower and upper limit of the y-axis 7 | #' @param width The width of the graphics region in inches 8 | #' @param height The height of the graphics region in inches 9 | #' @param ... Arguments to be passed to methods, such as graphical parameters (see par). 10 | #' @return Return connectedness plot 11 | #' @export 12 | PlotTO = function(dca, ca=NULL, path=NULL, ylim=c(NULL, NULL), width=10, height=7, ...) { 13 | if (!is.null(path)) { 14 | if (!dir.exists(path)) { 15 | dir.create(path) 16 | } 17 | } 18 | if (length(ca)>0 && !is.null(ca$config$approach)) { 19 | ca = list(ca) 20 | } 21 | x = dca$TO 22 | date = as.Date(rownames(x)) 23 | t = length(date) 24 | k = ncol(x) 25 | NAMES = colnames(x) 26 | if (is.null(NAMES)) { 27 | NAMES = 1:k 28 | } 29 | k_row = ceiling(sqrt(k)) 30 | k_col = ceiling(k/k_row) 31 | lower = ylim[1] 32 | upper = ylim[2] 33 | 34 | oldpar = par(no.readonly=TRUE) 35 | on.exit(par(oldpar)) 36 | if (!is.null(path)) pdf(file=paste0(path, "/TO.pdf"), width=width, height=height) 37 | par(mfcol=c(k_row,k_col), oma=c(0,0,0,0) + 0.5, mar = c(1,1,1,1) + .5, mgp=c(1, 0.4, 0)) 38 | if (length(dim(dca$NET))>2) { 39 | for (i in 1:k) { 40 | x_ = x[,i,] 41 | if (is.null(lower)) { 42 | lower = min(x) 43 | } 44 | if (is.null(upper)) { 45 | upper = max(x) 46 | } 47 | plot(date, x_[,1], type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper))#, ...) 48 | grid(NA, NULL, lty=2) 49 | for (j in 1:ncol(x_)) { 50 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x_[,j])),col=j, border=j) 51 | } 52 | for (j in 1:ncol(x_)) { 53 | lines(date, x_[,j],col=j) 54 | } 55 | abline(h=0, lty=3) 56 | legend("topleft", colnames(x_), fill=c(1:(ncol(x_)+1)), bty="n") 57 | box() 58 | } 59 | } else { 60 | if (is.null(lower)) { 61 | lower = min(x) 62 | } 63 | if (is.null(upper)) { 64 | upper = max(x) 65 | } 66 | for (i in 1:k) { 67 | plot(date, x[,i], type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper), ...) 68 | grid(NA, NULL, lty=2) 69 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x[,i])),col=1, border=1) 70 | if (!is.null(ca)) { 71 | for (il in 1:length(ca)) { 72 | lines(as.Date(rownames(ca[[il]]$TCI)), ca[[il]]$TO[,i], col=il+1) 73 | } 74 | } 75 | abline(h=0, lty=3) 76 | box() 77 | } 78 | } 79 | if (!is.null(path)) dev.off() 80 | } 81 | -------------------------------------------------------------------------------- /R/PlotNET.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Dynamic net total directional connectedness plot 3 | #' @description Visualize dynamic net total directional connectedness 4 | #' @param dca Connectedness object 5 | #' @param ca Compare dca object with a single connectedness object or a list of of connectedness objects 6 | #' @param path Path where plots should be saved 7 | #' @param ylim A vector including the lower and upper limit of the y-axis 8 | #' @param width The width of the graphics region in inches 9 | #' @param height The height of the graphics region in inches 10 | #' @param ... Arguments to be passed to methods, such as graphical parameters (see par). 11 | #' @return Return connectedness plot 12 | #' @export 13 | PlotNET = function(dca, ca=NULL, path=NULL, ylim=c(NULL, NULL), width=10, height=7, ...) { 14 | if (!is.null(path)) { 15 | if (!dir.exists(path)) { 16 | dir.create(path) 17 | } 18 | } 19 | if (length(ca)>0 && !is.null(ca$config$approach)) { 20 | ca = list(ca) 21 | } 22 | x = dca$NET 23 | date = as.Date(rownames(x)) 24 | t = length(date) 25 | k = ncol(x) 26 | NAMES = colnames(x) 27 | if (is.null(NAMES)) { 28 | NAMES = 1:k 29 | } 30 | lower = ylim[1] 31 | upper = ylim[2] 32 | 33 | k_row = ceiling(sqrt(k)) 34 | k_col = ceiling(k/k_row) 35 | oldpar = par(no.readonly=TRUE) 36 | on.exit(par(oldpar)) 37 | if (!is.null(path)) pdf(file=paste0(path, "/NET.pdf"), width=width, height=height) 38 | par(mfcol=c(k_row,k_col), oma=c(0,0,0,0) + 0.5, mar = c(1,1,1,1) + .5, mgp=c(1, 0.4, 0)) 39 | if (length(dim(dca$NET))>2) { 40 | for (i in 1:k) { 41 | x_ = x[,i,] 42 | if (is.null(lower)) { 43 | lower = min(x) 44 | } 45 | if (is.null(upper)) { 46 | upper = max(x) 47 | } 48 | plot(date, x_[,1], type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper))#, ...) 49 | grid(NA, NULL, lty=2) 50 | for (j in 1:ncol(x_)) { 51 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x_[,j])),col=j, border=j) 52 | } 53 | for (j in 1:ncol(x_)) { 54 | lines(date, x_[,j],col=j) 55 | } 56 | abline(h=0, lty=3) 57 | legend("topleft", colnames(x_), fill=c(1:(ncol(x_)+1)), bty="n") 58 | box() 59 | } 60 | } else { 61 | if (is.null(lower)) { 62 | lower = min(x) 63 | } 64 | if (is.null(upper)) { 65 | upper = max(x) 66 | } 67 | for (i in 1:k) { 68 | plot(date, x[,i], type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper))#, ...) 69 | grid(NA, NULL, lty=2) 70 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x[,i])),col=1, border=1) 71 | if (!is.null(ca)) { 72 | for (il in 1:length(ca)) { 73 | lines(as.Date(rownames(ca[[il]]$TCI)), ca[[il]]$NET[,i], col=il+1) 74 | } 75 | } 76 | abline(h=0, lty=3) 77 | box() 78 | } 79 | } 80 | if (!is.null(path)) dev.off() 81 | } 82 | -------------------------------------------------------------------------------- /R/PlotFROM.R: -------------------------------------------------------------------------------- 1 | #' @title Dynamic from total directional connectedness plot 2 | #' @description Visualize dynamic from total directional connectedness 3 | #' @param dca Connectedness object 4 | #' @param ca Compare dca object with a single connectedness object or a list of of connectedness objects 5 | #' @param path Path where plots should be saved 6 | #' @param ylim A vector including the lower and upper limit of the y-axis 7 | #' @param width The width of the graphics region in inches 8 | #' @param height The height of the graphics region in inches 9 | #' @param ... Arguments to be passed to methods, such as graphical parameters (see par). 10 | #' @return Return connectedness plot 11 | #' @export 12 | PlotFROM = function(dca, ca=NULL, path=NULL, ylim=c(NULL, NULL), width=10, height=7, ...) { 13 | if (!is.null(path)) { 14 | if (!dir.exists(path)) { 15 | dir.create(path) 16 | } 17 | } 18 | if (length(ca)>0 && !is.null(ca$config$approach)) { 19 | ca = list(ca) 20 | } 21 | x = dca$FROM 22 | date = as.Date(rownames(x)) 23 | t = length(date) 24 | k = ncol(x) 25 | NAMES = colnames(x) 26 | if (is.null(NAMES)) { 27 | NAMES = 1:k 28 | } 29 | if (is.null(ylim[1])) { 30 | lower = min(x) 31 | } 32 | if (is.null(ylim[2])) { 33 | upper = max(x) 34 | } 35 | k_row = ceiling(sqrt(k)) 36 | k_col = ceiling(k/k_row) 37 | lower = ylim[1] 38 | upper = ylim[2] 39 | 40 | oldpar = par(no.readonly=TRUE) 41 | on.exit(par(oldpar)) 42 | if (!is.null(path)) pdf(file=paste0(path, "/FROM.pdf"), width=width, height=height) 43 | par(mfcol=c(k_row,k_col), oma=c(0,0,0,0) + 0.5, mar = c(1,1,1,1) + .5, mgp=c(1, 0.4, 0)) 44 | if (length(dim(dca$NET))>2) { 45 | for (i in 1:k) { 46 | x_ = x[,i,] 47 | if (is.null(lower)) { 48 | lower = min(x) 49 | } 50 | if (is.null(upper)) { 51 | upper = max(x) 52 | } 53 | plot(date, x_[,1], type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper))#, ...) 54 | grid(NA, NULL, lty=2) 55 | for (j in 1:ncol(x_)) { 56 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x_[,j])),col=j, border=j) 57 | } 58 | for (j in 1:ncol(x_)) { 59 | lines(date, x_[,j],col=j) 60 | } 61 | abline(h=0, lty=3) 62 | legend("topleft", colnames(x_), fill=c(1:(ncol(x_)+1)), bty="n") 63 | box() 64 | } 65 | } else { 66 | if (is.null(lower)) { 67 | lower = min(x) 68 | } 69 | if (is.null(upper)) { 70 | upper = max(x) 71 | } 72 | for (i in 1:k) { 73 | plot(date, x[,i], type="l", main=NAMES[i], las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper), ...) 74 | grid(NA, NULL, lty=2) 75 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x[,i])),col=1, border=1) 76 | if (!is.null(ca)) { 77 | for (il in 1:length(ca)) { 78 | lines(as.Date(rownames(ca[[il]]$TCI)), ca[[il]]$FROM[,i], col=il+1) 79 | } 80 | } 81 | abline(h=0, lty=3) 82 | box() 83 | } 84 | } 85 | if (!is.null(path)) dev.off() 86 | } 87 | -------------------------------------------------------------------------------- /R/PlotNetwork.R: -------------------------------------------------------------------------------- 1 | #' @title Network plot 2 | #' @description Visualize net pairwise or pairwise connectedness measures 3 | #' @param dca Connectedness object 4 | #' @param path Path where plots should be saved 5 | #' @param method Either visualizing NPDC or PCI 6 | #' @param name_length Length of variable names in the network plot 7 | #' @param threshold Threshold for bivariate connections between 0 and 1 8 | #' @param width The width of the graphics region in inches 9 | #' @param height The height of the graphics region in inches 10 | #' @param ... Arguments to be passed to methods, such as graphical parameters (see par). 11 | #' @return Return connectedness plot 12 | #' @export 13 | #' @import igraph 14 | PlotNetwork = function(dca, method="NPDC", path=NULL, name_length=NULL, threshold=0.00, width=10, height=10, ...) { 15 | if (!is.null(path)) { 16 | if (!dir.exists(path)) { 17 | dir.create(path) 18 | } 19 | } 20 | if (method=="NPDC") { 21 | x = dca$NPDC 22 | } else if (method=="PCI") { 23 | x = dca$PCI 24 | } else { 25 | stop("This method does not exists") 26 | } 27 | date = as.Date(dimnames(x)[[3]]) 28 | t = length(date) 29 | k = ncol(x) 30 | 31 | NAMES = dimnames(x)[[1]] 32 | if (is.null(NAMES)) { 33 | NAMES = 1:k 34 | } else { 35 | NAMES = colnames(x) 36 | if (!is.null(name_length)) { 37 | NAMES = substr(NAMES, 1, name_length) 38 | } 39 | } 40 | 41 | oldpar = par(no.readonly=TRUE) 42 | on.exit(par(oldpar)) 43 | if (length(dim(x))>3) { 44 | kk = dim(x)[4] 45 | k1 = ceiling(kk) 46 | k2 = ceiling(kk/k1) 47 | } else { 48 | kk = k1 = k2 = 1 49 | x = array(x, c(k,k,t,1)) 50 | } 51 | 52 | par(mfrow = c(k2,k1), oma = c(0,0,0,0), mar = c(0,0,0,0), mgp = c(0, 0, 0)) 53 | if (!is.null(path)) pdf(file=paste0(path, "/NetworkPlot.pdf"), width=width, height=height) 54 | for (ijk in 1:kk) { 55 | x_ = t(apply(x[,,,ijk], 1:2, mean)) 56 | x_ = ifelse(x_<0, 0, x_) 57 | colnames(x_) = rownames(x_) = NAMES 58 | diag(x_) = 0 59 | x_ = x_ - min(x_) 60 | x_ = x_ / max(x_) 61 | x_[x_0] = "gold3" 76 | nn = abs(nn/max(abs(nn))) 77 | } 78 | plot.igraph(net,vertex.label=V(net)$name, layout=lo, vertex.label.cex=0.99, vertex.size=10+nn*10, vertex.color=color, vertex.frame.color=color, vertex.label.color="black", mark.col="steelblue4", 79 | edge.width=E(net)$weight, edge.color="grey50", edge.arrow.size=0.5, edge.curved=0.3, lty=2) 80 | } 81 | if (!is.null(path)) dev.off() 82 | } 83 | -------------------------------------------------------------------------------- /R/BivariateDCCGARCH.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Bivariate DCC-GARCH 3 | #' @description This function multiple Bivariate DCC-GARCH models that captures more accurately conditional covariances and correlations 4 | #' @param x zoo dataset 5 | #' @param spec A cGARCHspec A cGARCHspec object created by calling cgarchspec. 6 | #' @param copula "mvnorm" or "mvt" (see, rmgarch package) 7 | #' @param method "Kendall" or "ML" (see, rmgarch package) 8 | #' @param transformation "parametric", "empirical" or "spd" (see, rmgarch package) 9 | #' @param time.varying Boolean value to either choose DCC-GARCH or CCC-GARCH 10 | #' @param asymmetric Whether to include an asymmetry term to the DCC model (thus estimating the aDCC). 11 | #' @param eval.se Boolean value to compute standard errors 12 | #' @return Estimate Bivariate DCC-GARCH 13 | #' @importFrom rmgarch cgarchspec 14 | #' @importFrom rmgarch cgarchfit 15 | #' @importFrom rmgarch rcor 16 | #' @importFrom rmgarch rcov 17 | #' @importFrom zoo zoo 18 | #' @references 19 | #' Cocca, T., Gabauer, D., & Pomberger, S. (2024). Clean energy market connectedness and investment strategies: New evidence from DCC-GARCH R2 decomposed connectedness measures. Energy Economics. 20 | #' 21 | #' Engle, R. (2002). Dynamic conditional correlation: A simple class of multivariate generalized autoregressive conditional heteroskedasticity models. Journal of Business & Economic Statistics, 20(3), 339-350. 22 | #' @author David Gabauer 23 | #' @export 24 | BivariateDCCGARCH = function (x, spec, copula = "mvt", method = "Kendall", transformation = "parametric", 25 | time.varying = TRUE, asymmetric = FALSE, eval.se = FALSE, print=TRUE) { 26 | if (!is(x, "zoo")) { 27 | stop("Data needs to be of type 'zoo'") 28 | } 29 | t = nrow(x) 30 | k = ncol(x) 31 | NAMES = colnames(x) 32 | Z_t = NULL 33 | H_t = R_t = array(1, c(k, k, t), dimnames = list(NAMES, 34 | NAMES, as.character(index(x)))) 35 | for (i in 1:k) { 36 | for (j in 1:k) { 37 | if (i < j) { 38 | print(paste("DCC-GARCH estimation based on", NAMES[i], "and", NAMES[j])) 39 | mgarch.spec = rmgarch::cgarchspec(uspec = multispec(c(spec[i], 40 | spec[j])), dccOrder = c(1, 1), asymmetric = asymmetric, 41 | distribution.model = list(copula = copula, 42 | method = method, time.varying = time.varying, 43 | transformation = transformation)) 44 | copula_fit = rmgarch::cgarchfit(mgarch.spec, 45 | data = x[, c(i, j)], solver = c("hybrid", "solnp"), 46 | fit.control = list(eval.se = eval.se)) 47 | print(copula_fit) 48 | r = rcor(copula_fit) 49 | h = rcov(copula_fit) 50 | R_t[c(i, j), c(i, j), ] = r 51 | H_t[c(i, j), c(i, j), ] = h 52 | } 53 | } 54 | Z_t = cbind(Z_t, copula_fit@mfit$Z[, 1]) 55 | } 56 | colnames(Z_t) = NAMES 57 | return = list(H_t=H_t, R_t=R_t, Z_t=zoo::zoo(Z_t, as.Date(index(x)))) 58 | } 59 | 60 | -------------------------------------------------------------------------------- /R/ElasticNetVAR.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Elastic Net vector autoregression 3 | #' @description Estimation of a VAR using equation-by-equation LASSO, Ridge or Elastic Net regressions. 4 | #' @param x zoo data matrix 5 | #' @param nlag Lag length 6 | #' @param nfolds N-fold cross validation 7 | #' @param loss Loss function 8 | #' @param alpha LASSO is alpha equal 1 and Ridge if alpha equal 0 9 | #' @param n_alpha Creates n-equidistant alpha values 10 | #' @param configuration Model configuration 11 | #' @return Estimate VAR model 12 | #' @examples 13 | #' \donttest{ 14 | #' data("dy2012") 15 | #' fit = ElasticNetVAR(dy2012, configuration=list(nlag=1, alpha=1, nfolds=10, loss="mae")) 16 | #' } 17 | #' @import glmnet 18 | #' @importFrom stats predict 19 | #' @references 20 | #' Tibshirani, R., Bien, J., Friedman, J., Hastie, T., Simon, N., Taylor, J., & Tibshirani, R. J. (2012). Strong rules for discarding predictors in lasso‐type problems. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 74(2), 245-266. 21 | #' 22 | #' Hoerl, A. E., & Kennard, R. W. (1970). Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1), 55-67. 23 | #' 24 | #' Zou, H., & Hastie, T. (2005). Regularization and variable selection via the elastic net. Journal of the royal statistical society: series B (statistical methodology), 67(2), 301-320. 25 | #' 26 | #' Gabauer, D., Gupta, R., Marfatia, H. A., & Miller, S. M. (2024). Estimating US housing price network connectedness: Evidence from dynamic Elastic Net, Lasso, and ridge vector autoregressive models. International Review of Economics & Finance, 89, 349-362. 27 | #' @author David Gabauer 28 | #' @importFrom glmnet cv.glmnet 29 | #' @importFrom glmnet predict.glmnet 30 | #' @export 31 | ElasticNetVAR = function(x, configuration=list(nlag=1, nfolds=10, loss="mae", alpha=NULL, n_alpha=10)) { 32 | nlag = configuration$nlag 33 | alpha_ = configuration$alpha 34 | nfolds = configuration$nfolds 35 | n_alpha = configuration$n_alpha 36 | loss = configuration$loss 37 | if (nlag<=0) { 38 | stop("nlag needs to be a positive integer") 39 | } 40 | if (nfolds<=0) { 41 | stop("nfolds needs to be a positive integer") 42 | } 43 | if (!is(x, "zoo")) { 44 | stop("Data needs to be of type 'zoo'") 45 | } 46 | NAMES = colnames(x) 47 | k = ncol(x) 48 | if (is.null(NAMES)) { 49 | NAMES = 1:k 50 | } 51 | if (is.null(alpha_) ) { 52 | alpha_ = seq(0, 1, 1/n_alpha) 53 | } 54 | alpha = Res = B = NULL 55 | for (i in 1:k) { 56 | MAE = NULL 57 | B_ = array(NA, c(nlag*k, length(alpha_))) 58 | for (j in 1:length(alpha_)) { 59 | z = embed(x, nlag+1) 60 | X = z[,-c(1:k)] 61 | y = z[,i] 62 | fit = glmnet::cv.glmnet(X, y, alpha=alpha_[j], type.measure=loss, nfolds=nfolds) 63 | B_[,j] = coef(fit)[-1] 64 | y_pred = cbind(1, X) %*% coef(fit) 65 | MAE[j] = mean(abs(y - y_pred[,1])) 66 | if (MAE[j] <= min(MAE)) { 67 | Y_pred = y_pred[,1] 68 | } 69 | } 70 | ind = which(MAE==min(MAE))[1] 71 | B = rbind(B, B_[,ind]) 72 | Res = cbind(Res, y-Y_pred) 73 | alpha[i] = alpha_[ind] 74 | } 75 | Q = array(t(Res)%*%Res/nrow(Res), c(k, k, 1), dimnames=list(NAMES, NAMES, tail(as.character(zoo::index(x)),1))) 76 | results = list(B=B, Q=Q, alpha=alpha) 77 | } 78 | -------------------------------------------------------------------------------- /R/PlotTCI.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Dynamic total connectedness plot 3 | #' @description Visualize dynamic total connectedness 4 | #' @param dca Connectedness object 5 | #' @param ca Compare dca object with a single connectedness object or a list of of connectedness objects 6 | #' @param path Path where plots should be saved 7 | #' @param ylim A vector including the lower and upper limit of the y-axis 8 | #' @param width The width of the graphics region in inches 9 | #' @param height The height of the graphics region in inches 10 | #' @param ... Arguments to be passed to methods, such as graphical parameters (see par). 11 | #' @return Return connectedness plot 12 | #' @import graphics 13 | #' @import grDevices 14 | #' @export 15 | PlotTCI = function(dca, ca=NULL, path=NULL, ylim=c(NULL, NULL), width=10, height=5, ...) { 16 | if (!is.null(path)) { 17 | if (!dir.exists(path)) { 18 | dir.create(path) 19 | } 20 | } 21 | if (length(ca)>0 && !is.null(ca$config$approach)) { 22 | ca = list(ca) 23 | } 24 | x = dca$TCI 25 | date = as.Date(rownames(x)) 26 | t = length(date) 27 | k = ncol(x) 28 | lower = ylim[1] 29 | upper = ylim[2] 30 | 31 | oldpar = par(no.readonly=TRUE) 32 | on.exit(par(oldpar)) 33 | if (!is.null(path)) pdf(file=paste0(path, "/TCI.pdf"), width=width, height=height) 34 | par(mfrow=c(1,1), oma=c(0,0,0,0) + 0.5, mar = c(1,1,1,1) + .5, mgp=c(1, 0.4, 0)) 35 | if (length(dim(dca$NET))>2) { 36 | x_ = x 37 | if (is.null(lower)) { 38 | lower = min(x) 39 | } 40 | if (is.null(upper)) { 41 | upper = max(x) 42 | } 43 | plot(date, x_[,1], type="l", main="", las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper))#, ...) 44 | grid(NA, NULL, lty=2) 45 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x_[,1])),col=1, border=1) 46 | for (j in 1:dim(x_)[2]) { 47 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x_[,j])),col=j, border=j) 48 | } 49 | legend("topleft", colnames(x_), fill=1:dim(x_)[2], bty="n") 50 | for (j in 1:ncol(x_)) { 51 | lines(date, x_[,j],col=j) 52 | } 53 | abline(h=0, lty=3) 54 | box() 55 | } else { 56 | if (is.null(lower)) { 57 | lower = 0 58 | } 59 | if (is.null(upper)) { 60 | upper = 100 61 | } 62 | plot(date, as.numeric(x), type="l", main="", las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper), ...) 63 | grid(NA, NULL, lty=2) 64 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x)),col=1, border=1) 65 | if (!is.null(ca)) { 66 | for (il in 1:length(ca)) { 67 | lines(as.Date(rownames(ca[[il]]$TCI)), ca[[il]]$TCI, col=il+1) 68 | gTCI = ca[[il]]$gTCI 69 | if (!is.null(gTCI)) { 70 | for (ij in 1:ncol(gTCI)) { 71 | lines(as.Date(rownames(ca[[il]]$TCI)), gTCI[,ij], col=ij+2) 72 | } 73 | } 74 | } 75 | if (length(ca)==1) { 76 | if (ca[[1]]$config$approach=="Internal" || ca[[1]]$config$approach=="External") { 77 | legend("topleft", c("TCI", paste("TCI",ca[[1]]$config$approach), colnames(gTCI)), fill=1:(ncol(gTCI)+2), bty="n") 78 | } else if (ca[[1]]$config$approach=="Inclusive" || ca[[1]]$config$approach=="Exclusive") { 79 | legend("topleft", c("TCI", paste("TCI", ca[[1]]$config$approach)), fill=1:2, bty="n") 80 | } 81 | } 82 | } 83 | box() 84 | } 85 | if (!is.null(path)) dev.off() 86 | } 87 | -------------------------------------------------------------------------------- /R/VFEVD.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Generalized volatility forecast error variance decomposition and volatility impulse response functions 3 | #' @description This function provides the volatility impulse responses and the forecast error variance decomposition of DCC-GARCH models. 4 | #' @param fit Fitted DCC-GARCH model 5 | #' @param nfore H-step ahead forecast horizon 6 | #' @param standardize Boolean value whether GIRF should be standardized 7 | #' @return Get volatility impulse response functions and forecast error variance decomposition 8 | #' @references 9 | #' Gabauer, D. (2020). Volatility impulse response analysis for DCC‐GARCH models: The role of volatility transmission mechanisms. Journal of Forecasting, 39(5), 788-796. 10 | #' @author David Gabauer 11 | #' @importFrom rmgarch rcor 12 | #' @importFrom rmgarch rcov 13 | #' @export 14 | VFEVD = function(fit, nfore=100, standardize=FALSE) { 15 | if (!is(fit, "DCCfit")) { 16 | stop("fit needs to be of class DCCfit") 17 | } 18 | if (nfore<=0) { 19 | stop("nfore needs to be a positive integer") 20 | } 21 | NAMES = fit@model$modeldata$asset.names 22 | H = rmgarch::rcov(fit) 23 | R = rmgarch::rcor(fit) 24 | R.bar = apply(R,1:2,mean) 25 | Q.bar = fit@mfit$Qbar 26 | t = dim(H)[3] 27 | k = dim(H)[1] 28 | alpha = array(0,c(k,k,nfore)) 29 | alpha[,,1] = diag(fit@mfit$matcoef[c(seq(3,(4*k),4)),1]) 30 | beta = diag(fit@mfit$matcoef[c(seq(4,(4*k),4)),1]) 31 | ALPHA = fit@mfit$matcoef[(4*k+1),1] 32 | BETA = fit@mfit$matcoef[(4*k+2),1] 33 | 34 | H.hat = array(0,c(k,k,nfore+1)) 35 | VIRF = H.hat.shock = H.hat.no_shock = array(0,c(k,k,t,nfore+1)) 36 | e = diag(k) 37 | for (i in 1:t) { 38 | H.hat[,,1] = H[,,i] 39 | Q.hat = H.hat 40 | Q.hat[,,1] = fit@mfit$Q[[i]] 41 | for (j in 1:nfore) { 42 | H.hat[,,j+1] = (alpha[,,j])%*%e^2 + beta%*%H.hat[,,j] 43 | D = diag(diag(H.hat[,,j+1])^0.5) 44 | u = D%*%e 45 | if (j==1) { 46 | Q.hat[,,2] = (1-ALPHA-BETA)*Q.bar + ALPHA*crossprod(u) + BETA*H.hat[,,1] 47 | } else { 48 | Q.hat[,,j+1] = (1-ALPHA-BETA)*Q.bar + (ALPHA+BETA)*Q.hat[,,j] 49 | } 50 | R.hat = diag(1/(diag(Q.hat[,,j+1])^0.5))%*%Q.hat[,,j+1]%*%(diag(1/diag(Q.hat[,,j+1])^0.5)) 51 | H.hat[,,j+1] = D%*%R.hat%*%D 52 | } 53 | H.hat.shock[,,i,] = H.hat 54 | } 55 | if (standardize) { 56 | e = 0*diag(k) 57 | for (i in 1:t) { 58 | H.hat[,,1] = H[,,i] 59 | Q.hat = H.hat 60 | Q.hat[,,1] = fit@mfit$Q[[i]] 61 | for (j in 1:nfore) { 62 | H.hat[,,j+1] = beta%*%H.hat[,,j] 63 | D = diag(diag(H.hat[,,j+1])^0.5) 64 | if (j==1) { 65 | Q.hat[,,2] = (1-ALPHA-BETA)*Q.bar + BETA*H.hat[,,1] 66 | } else { 67 | Q.hat[,,j+1] = (1-ALPHA-BETA)*Q.bar+(ALPHA+BETA)*Q.hat[,,j] 68 | } 69 | R.hat = diag(1/(diag(Q.hat[,,j+1])^0.5))%*%Q.hat[,,j+1]%*%(diag(1/diag(Q.hat[,,j+1])^0.5)) 70 | H.hat[,,j+1] = D%*%R.hat%*%D 71 | } 72 | H.hat.no_shock[,,i,] = H.hat 73 | } 74 | } 75 | for (i in 1:t) { 76 | VIRF[,,i,] = H.hat.shock[,,i,] - H.hat.no_shock[,,i,] 77 | } 78 | date = dimnames(H)[[3]] 79 | VFEVD = array(NA, c(k,k,t), dimnames=list(NAMES,NAMES,date)) 80 | for (i in 1:t) { 81 | num = apply(VIRF[,,i,]^2,1:2,sum) 82 | den = c(apply(num,1,sum)) 83 | fevd = t(num)/den 84 | VFEVD[,,i] = (fevd/apply(fevd, 1, sum)) 85 | } 86 | return = list(IRF=VIRF, FEVD=VFEVD) 87 | } 88 | -------------------------------------------------------------------------------- /R/IRF.R: -------------------------------------------------------------------------------- 1 | #' @title Impulse response functions 2 | #' @description This function calculates orthorgonalized/generalized impulse response functions of time or frequency domain. 3 | #' @param Phi VAR coefficient matrix 4 | #' @param Sigma Residual Variance-Covariance Matrix 5 | #' @param nfore H-step ahead forecast horizon 6 | #' @param orth Boolean 7 | #' @return Orthorgonal/generalized time/frequency impulse response functions 8 | #' @examples 9 | #' \donttest{ 10 | #' data("dy2012") 11 | #' fit = VAR(dy2012, configuration=list(nlag=1)) 12 | #' irf = IRF(Phi=fit$B, Sigma=fit$Q, nfore=10, orth=TRUE) 13 | #' } 14 | #' @references 15 | #' Stiassny, A. (1996). A spectral decomposition for structural VAR models. Empirical Economics, 21(4), 535-555. 16 | #' 17 | #' Koop, G., Pesaran, M. H., & Potter, S. M. (1996). Impulse response analysis in nonlinear multivariate models. Journal of Econometrics, 74(1), 119-147. 18 | #' 19 | #' Pesaran, H. H., & Shin, Y. (1998). Generalized impulse response analysis in linear multivariate models. Economics Letters, 58(1), 17-29. 20 | #' @author David Gabauer 21 | #' @export 22 | IRF = function (Phi, Sigma, nfore=10, orth=TRUE) { 23 | if (nfore<=0) { 24 | stop("nfore needs to be a positive integer") 25 | } 26 | if (length(dim(Sigma))<=1) { 27 | stop("Sigma needs to be at least a 2-dimensional matrix") 28 | } 29 | if (length(dim(Phi))<=1) { 30 | stop("Phi needs to be at least a 2-dimensional matrix") 31 | } 32 | 33 | if (length(dim(Sigma))>2) { 34 | Sigma = Sigma[,,1] 35 | } 36 | p = 0 37 | k = 0 38 | if (length(Phi) > 0) { 39 | k = dim(Phi)[1] 40 | k1 = dim(Phi)[2] 41 | p = floor(k1/k) 42 | } 43 | if (is.null(Sigma)) { 44 | Sigma = diag(rep(1, k)) 45 | } 46 | if (orth) { 47 | m1 = eigen(Sigma) 48 | v1 = sqrt(m1$values) 49 | vv = diag(v1) 50 | Pmtx = m1$vectors 51 | Sh = Pmtx %*% vv %*% t(Pmtx) 52 | } 53 | if (k < 1) { 54 | k = 1 55 | } 56 | PSI = diag(rep(1, k)) 57 | if (orth) { 58 | WGT = c(PSI %*% Sh) 59 | } else { 60 | WGT = c(PSI) 61 | } 62 | for (il in 1:nfore) { 63 | ilk = il * k 64 | tmp = matrix(0, k, k) 65 | if (p > 0) { 66 | iend = min(il, p) 67 | for (j in 1:iend) { 68 | jdx = (il - j) 69 | kdx = j * k 70 | tmp = tmp + Phi[, (kdx - k + 1):kdx] %*% PSI[,(jdx * k + 1):(jdx * k + k)] 71 | } 72 | } 73 | PSI = cbind(PSI, tmp) 74 | if (orth) { 75 | WGT = cbind(WGT, c(tmp %*% Sh)) 76 | } else { 77 | WGT = cbind(WGT, c(tmp)) 78 | } 79 | } 80 | wk1 = WGT 81 | for (i in 1:k^2) { 82 | wk1[i, ] = cumsum(WGT[i, ]) 83 | } 84 | tdx = c(1:(nfore + 1)) - 1 85 | if (orth) { 86 | gmax = max(WGT) 87 | gmin = min(WGT) 88 | cx = (gmax - gmin)/10 89 | gmax = gmax + cx 90 | gmin = gmin - cx 91 | gmax = max(wk1) 92 | gmin = min(wk1) 93 | cx = (gmax - gmin)/10 94 | gmax = gmax + cx 95 | gmin = gmin - cx 96 | } else { 97 | gmax = max(WGT) 98 | gmin = min(WGT) 99 | cx = (gmax - gmin)/10 100 | gmax = gmax + cx 101 | gmin = gmin - cx 102 | gmax = max(wk1) 103 | gmin = min(wk1) 104 | cx = (gmax - gmin)/10 105 | gmax = gmax + cx 106 | gmin = gmin - cx 107 | } 108 | k = sqrt(nrow(WGT)) 109 | irf = list() 110 | for (i in 1:k) { 111 | irf[[i]] = t(WGT[((i-1)*k+1):(i*k),]) 112 | } 113 | return = list(irf=irf) 114 | } 115 | -------------------------------------------------------------------------------- /R/EquallyWeightedPortfolio.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Equally weighted portfolio 3 | #' @description This function calculates the equality weighted portfolio 4 | #' @param x zoo return matrix (in percentage) 5 | #' @param method Cumulative sum or cumulative product 6 | #' @param statistics Hedging effectiveness statistic 7 | #' @param digit Number of decimal places 8 | #' @param metric Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR) 9 | #' @return Get portfolio weights 10 | #' @importFrom zoo zoo 11 | #' @importFrom zoo index 12 | #' @examples 13 | #' \donttest{ 14 | #' data("g2020") 15 | #' mcp = EquallyWeightedPortfolio(g2020/100, statistics="Fisher") 16 | #' mcp$TABLE 17 | #' } 18 | #' @references 19 | #' Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170. 20 | #' 21 | #' 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. 22 | #' @author David Gabauer 23 | #' @export 24 | EquallyWeightedPortfolio = function (x, method = c("cumsum", "cumprod"), statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"), metric="StdDev", digit = 2) { 25 | method = match.arg(method) 26 | statistics = match.arg(statistics) 27 | if (!is(x, "zoo")) { 28 | stop("Data needs to be of type 'zoo'") 29 | } 30 | k = ncol(x) 31 | t = nrow(x) 32 | date = as.character(rownames(x)) 33 | NAMES = colnames(x) 34 | portfolio_weights = array(1/k, c(t, k), dimnames = list(date, NAMES)) 35 | 36 | summary = NULL 37 | for (i in 1:k) { 38 | x_ = as.matrix(portfolio_weights[, i]) 39 | summary_ = matrix(NA, nrow = ncol(x_), ncol = 4) 40 | for (ij in 1:ncol(x_)) { 41 | summary_[ij, ] = matrix(c(mean(x_[, ij]), stats::sd(x_[, ij]), stats::quantile(x_[, ij], 0.05), stats::quantile(x_[, ij], 0.95)), nrow = 1) 42 | } 43 | colnames(summary_) = c("Mean", "Std.Dev.", "5%", "95%") 44 | summary = rbind(summary, summary_) 45 | } 46 | rownames(summary) = NAMES 47 | portfolio_return = array(NA, c(t, 1), dimnames = list(date)) 48 | for (i in 1:t) { 49 | portfolio_return[i, ] = sum(portfolio_weights[i, ] * 50 | as.numeric(x[i, ])) 51 | } 52 | if (method == "cumsum") { 53 | cumulative_portfolio_return = cumsum(portfolio_return) 54 | } else if (method == "cumprod") { 55 | cumulative_portfolio_return = cumprod(1 + portfolio_return) - 1 56 | } 57 | SR = HE = pvalue = array(NA, c(k, 1), dimnames = list(NAMES)) 58 | for (i in 1:k) { 59 | HE[i, ] = 1 - var(portfolio_return)/var(x[, i]) 60 | z = zoo::zoo(portfolio_return, order.by=index(x)) 61 | SR[i,] = PerformanceAnalytics::SharpeRatio(z, FUN=(metric), annualize=TRUE) 62 | df = rbind(data.frame(val = portfolio_return, group = "A"), 63 | data.frame(val = x[, i], group = "B")) 64 | pvalue[i, ] = VarianceTest(val ~ as.character(group), 65 | data = df, method = statistics)$p.value 66 | 67 | } 68 | TABLE = cbind(summary, HE, pvalue, SR) 69 | colnames(TABLE) = c("Mean", "Std.Dev.", "5%", 70 | "95%", "HE", "p-value", "SR") 71 | return = list(TABLE = format(round(TABLE, digit), nsmall = digit), 72 | portfolio_weights = portfolio_weights, HE = HE, pvalue = pvalue, 73 | portfolio_return = portfolio_return, cumulative_portfolio_return = cumulative_portfolio_return) 74 | } 75 | -------------------------------------------------------------------------------- /R/GARCHselection.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Univariate GARCH selection criterion 3 | #' @description This function estimates and evaluates a combination of GARCH models with different distributions and suggests the best GARCH models among all alternatives given some test statistics 4 | #' @param x zoo data matrix 5 | #' @param distributions Vector of distributions 6 | #' @param models Vector of GARCH models 7 | #' @param ar AR(p) 8 | #' @param ma MA(q) 9 | #' @param prob The quantile (coverage) used for the VaR. 10 | #' @param conf.level Confidence level of VaR test statistics 11 | #' @param lag Lag length of weighted Portmanteau statistics 12 | #' @return Get optimal univariate GARCH model specification 13 | #' @importFrom stats bartlett.test coef fitted fligner.test integrate qnorm quantile residuals sd sigma var.test 14 | #' @references 15 | #' Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3. 16 | #' 17 | #' 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. 18 | #' @author David Gabauer 19 | #' @export 20 | GARCHselection = function(x, distributions=c("norm","snorm","std","sstd","ged","sged"), models=c("sGARCH","eGARCH","gjrGARCH","iGARCH","TGARCH","AVGARCH","NGARCH","NAGARCH","APARCH","ALLGARCH"), prob=0.05, conf.level=0.90, lag=20, ar=0, ma=0) { 21 | if (!is(x, "zoo")) { 22 | stop("Data needs to be of type 'zoo'") 23 | } 24 | GARCH_IC = matrix(Inf, nrow=length(distributions), ncol=length(models)) 25 | colnames(GARCH_IC) = models 26 | rownames(GARCH_IC) = distributions 27 | spec_list = list() 28 | table_list = list() 29 | for (i in 1:length(models)) { 30 | spec_list[[i]] = list() 31 | table_list[[i]] = list() 32 | for (j in 1:length(distributions)) { 33 | spec_list[[i]][[j]] = list() 34 | } 35 | names(spec_list[[i]]) = distributions 36 | } 37 | names(spec_list) = names(table_list) = models 38 | 39 | for (j in 1:length(models)) { 40 | message(paste0("-",models[j])) 41 | for (i in 1:length(distributions)) { 42 | message(paste0("--",distributions[i])) 43 | if (models[j] %in% c("AVGARCH","TGARCH","APARCH","NAGARCH","NGARCH","ALLGARCH")) { 44 | ugarch.spec = rugarch::ugarchspec(mean.model=list(armaOrder=c(ar,ma)), 45 | variance.model=list(model="fGARCH", submodel=models[j], garchOrder=c(1,1)), 46 | distribution.model=distributions[i]) 47 | } else { 48 | ugarch.spec = rugarch::ugarchspec(mean.model=list(armaOrder=c(ar,ma)), 49 | variance.model=list(model=models[j], garchOrder=c(1,1)), 50 | distribution.model=distributions[i]) 51 | } 52 | ugarch.fit = rugarch::ugarchfit(ugarch.spec, data=x, solver="hybrid", solver.list=list(outer.iter=10, inner.iter=1000, eval.se=FALSE, tol=1e-12)) 53 | if (ugarch.fit@fit$convergence==0) { 54 | fit = GARCHtests(ugarch.fit, prob=prob, conf.level=conf.level, lag=lag) 55 | GARCH_IC[i,j] = fit$InformationCriterion 56 | spec_list[[models[j]]][[distributions[i]]] = ugarch.spec 57 | table_list[[j]][[distributions[i]]] = fit 58 | } 59 | } 60 | } 61 | GARCH_selection = which(GARCH_IC==min(GARCH_IC),arr.ind=TRUE) 62 | best_ugarch = spec_list[[GARCH_selection[2]]][[GARCH_selection[1]]] 63 | best_table = table_list[[GARCH_selection[2]]][[GARCH_selection[1]]] 64 | return = list(best_ugarch=best_ugarch, best_table=best_table, GARCH_IC=GARCH_IC, spec_list=spec_list, table_list=table_list) 65 | } 66 | -------------------------------------------------------------------------------- /R/TimeConnectedness.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Diebold and Yilmaz (2009, 2012) connectedness approach 3 | #' @description This function allows to calculate the Diebold and Yilmaz (2009, 2012) connectedness measures. 4 | #' @param Phi VAR coefficient matrix 5 | #' @param Sigma Residual variance-covariance matrix 6 | #' @param nfore H-step ahead forecast horizon 7 | #' @param generalized Orthorgonalized/generalized FEVD 8 | #' @param corrected Boolean value whether corrected or standard TCI should be computed 9 | #' @param FEVD Alternatively, to provide Phi and Sigma it is also possible to use FEVD directly. 10 | #' @return Get connectedness measures 11 | #' @examples 12 | #' \donttest{ 13 | #' #Replication of DY2012 14 | #' data("dy2012") 15 | #' fit = VAR(dy2012, configuration=list(nlag=4)) 16 | #' dca = TimeConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=10, generalized=TRUE) 17 | #' dca$TABLE 18 | #' } 19 | #' @references 20 | #' Diebold, F. X., & Yilmaz, K. (2009). Measuring financial asset return and volatility spillovers, with application to global equity markets. The Economic Journal, 119(534), 158-171. 21 | #' 22 | #' 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. 23 | #' @author David Gabauer 24 | #' @export 25 | TimeConnectedness = function(Phi=NULL, Sigma=NULL, nfore=10, generalized=TRUE, corrected=FALSE, FEVD=NULL) { 26 | if ((is.null(Phi) || is.null(Phi)) && is.null(FEVD)) { 27 | stop("Either Sigma and Phi need to be given or FEVD") 28 | } 29 | if (is.null(FEVD)) { 30 | if (nfore<=0) { 31 | stop("nfore needs to be a positive integer") 32 | } 33 | if (length(dim(Sigma))<=1) { 34 | stop("Sigma needs to be at least a 2-dimensional matrix") 35 | } 36 | if (length(dim(Phi))<=1) { 37 | stop("Phi needs to be at least a 2-dimensional matrix") 38 | } 39 | NAMES = colnames(Sigma) 40 | k = ncol(Sigma) 41 | if (length(dim(Phi))==2) { 42 | Phi = array(Phi, c(nrow(Phi),ncol(Phi),1)) 43 | } 44 | if (length(dim(Sigma))==2) { 45 | Sigma = array(Sigma, c(nrow(Sigma),ncol(Sigma),1)) 46 | } 47 | t = dim(Sigma)[3] 48 | 49 | if (is.null(NAMES)) { 50 | NAMES = 1:k 51 | } 52 | date = as.character(as.Date(dimnames(Sigma)[[3]])) 53 | CT = array(NA, c(k, k, t), dimnames=list(NAMES, NAMES, as.character(date))) 54 | for (i in 1:t) { 55 | CT[,,i] = FEVD(Phi=Phi[,,i], Sigma=Sigma[,,i], nfore=nfore, generalized=generalized, type="time")$FEVD 56 | } 57 | } else { 58 | CT = FEVD 59 | t = dim(CT)[3] 60 | NAMES = dimnames(CT)[[1]] 61 | k = length(NAMES) 62 | date = as.character(as.Date(dimnames(CT)[[3]])) 63 | } 64 | TCI = array(NA, c(t,1), dimnames=list(date, "TCI")) 65 | NPT = NET = FROM = TO = array(NA, c(t, k), dimnames=list(date, NAMES)) 66 | PCI = NPDC = INFLUENCE = array(NA, c(k, k, t), dimnames=list(NAMES, NAMES, date)) 67 | pb = progress::progress_bar$new(total=t) 68 | for (i in 1:t) { 69 | ct = ConnectednessTable(CT[,,i]) 70 | TO[i,] = ct$TO 71 | FROM[i,] = ct$FROM 72 | NET[i,] = ct$NET 73 | NPT[i,] = ct$NPT 74 | NPDC[,,i] = ct$NPDC 75 | INFLUENCE[,,i] = ct$INFLUENCE 76 | PCI[,,i] = ct$PCI 77 | if (corrected) { 78 | TCI[i,] = ct$cTCI 79 | } else { 80 | TCI[i,] = ct$TCI 81 | } 82 | pb$tick() 83 | } 84 | TABLE = ConnectednessTable(CT)$TABLE 85 | config = list(nfore=nfore, approach="Time", generalized=generalized, corrected=corrected) 86 | return = list(TABLE=TABLE, CT=CT, TCI=TCI, TO=TO, FROM=FROM, 87 | NET=NET, NPT=NPT, NPDC=NPDC, PCI=PCI, INFLUENCE=INFLUENCE, config=config) 88 | } 89 | -------------------------------------------------------------------------------- /NAMESPACE: -------------------------------------------------------------------------------- 1 | # Generated by roxygen2: do not edit by hand 2 | 3 | export(AggregatedConnectedness) 4 | export(BayesPrior) 5 | export(BivariateDCCGARCH) 6 | export(BivariatePortfolio) 7 | export(ConditionalConnectedness) 8 | export(ConditionalCorrelation) 9 | export(ConnectednessApproach) 10 | export(ConnectednessTable) 11 | export(DCCGARCHselection) 12 | export(ElasticNetVAR) 13 | export(EquallyWeightedPortfolio) 14 | export(ExclusiveConnectedness) 15 | export(ExtendedJointConnectedness) 16 | export(ExternalConnectedness) 17 | export(FEVD) 18 | export(FrequencyConnectedness) 19 | export(GARCHselection) 20 | export(GARCHtests) 21 | export(HedgeRatio) 22 | export(IRF) 23 | export(InclusiveConnectedness) 24 | export(InternalConnectedness) 25 | export(JointConnectedness) 26 | export(LADVAR) 27 | export(MinimumConnectednessPortfolio) 28 | export(MinnesotaPrior) 29 | export(MultivariateHedgingPortfolio) 30 | export(PartialCorrelations) 31 | export(PlotFROM) 32 | export(PlotINF) 33 | export(PlotNET) 34 | export(PlotNPDC) 35 | export(PlotNPT) 36 | export(PlotNetwork) 37 | export(PlotPCI) 38 | export(PlotTCI) 39 | export(PlotTO) 40 | export(QVAR) 41 | export(QuantileCorrelation) 42 | export(R2Connectedness) 43 | export(R2Correlations) 44 | export(RiskParityPortfolio) 45 | export(RobustCovariance) 46 | export(SummaryStatistics) 47 | export(TVPVAR) 48 | export(TimeConnectedness) 49 | export(UninformativePrior) 50 | export(VAR) 51 | export(VFEVD) 52 | export(VarianceTest) 53 | export(WeightedBoxTest) 54 | export(Wold) 55 | import(frequencyConnectedness) 56 | import(glmnet) 57 | import(grDevices) 58 | import(graphics) 59 | import(igraph) 60 | import(progress) 61 | importFrom(L1pack,lad) 62 | importFrom(MASS,ginv) 63 | importFrom(Matrix,nearPD) 64 | importFrom(PerformanceAnalytics,Return.annualized) 65 | importFrom(PerformanceAnalytics,SharpeRatio) 66 | importFrom(PerformanceAnalytics,StdDev.annualized) 67 | importFrom(car,leveneTest) 68 | importFrom(corpcor,estimate.lambda) 69 | importFrom(glmnet,cv.glmnet) 70 | importFrom(glmnet,predict.glmnet) 71 | importFrom(methods,is) 72 | importFrom(progress,progress_bar) 73 | importFrom(quantreg,rq) 74 | importFrom(riskParityPortfolio,riskParityPortfolio) 75 | importFrom(rmgarch,cgarchfit) 76 | importFrom(rmgarch,cgarchspec) 77 | importFrom(rmgarch,dccfit) 78 | importFrom(rmgarch,dccspec) 79 | importFrom(rmgarch,rcor) 80 | importFrom(rmgarch,rcov) 81 | importFrom(rrcov,CovMcd) 82 | importFrom(rrcov,CovMve) 83 | importFrom(rrcov,CovSest) 84 | importFrom(rugarch,VaRDurTest) 85 | importFrom(rugarch,multispec) 86 | importFrom(rugarch,qdist) 87 | importFrom(rugarch,ugarchspec) 88 | importFrom(stats,acf) 89 | importFrom(stats,bartlett.test) 90 | importFrom(stats,coef) 91 | importFrom(stats,complete.cases) 92 | importFrom(stats,cor) 93 | importFrom(stats,cor.test) 94 | importFrom(stats,cov) 95 | importFrom(stats,embed) 96 | importFrom(stats,fft) 97 | importFrom(stats,fitted) 98 | importFrom(stats,fligner.test) 99 | importFrom(stats,integrate) 100 | importFrom(stats,lm) 101 | importFrom(stats,model.frame) 102 | importFrom(stats,na.omit) 103 | importFrom(stats,na.pass) 104 | importFrom(stats,pchisq) 105 | importFrom(stats,pf) 106 | importFrom(stats,pgamma) 107 | importFrom(stats,predict) 108 | importFrom(stats,qnorm) 109 | importFrom(stats,quantile) 110 | importFrom(stats,residuals) 111 | importFrom(stats,sd) 112 | importFrom(stats,sigma) 113 | importFrom(stats,t.test) 114 | importFrom(stats,var) 115 | importFrom(stats,var.test) 116 | importFrom(utils,setTxtProgressBar) 117 | importFrom(utils,tail) 118 | importFrom(utils,txtProgressBar) 119 | importFrom(xts,as.xts) 120 | importFrom(zoo,as.zoo) 121 | importFrom(zoo,index) 122 | importFrom(zoo,zoo) 123 | -------------------------------------------------------------------------------- /R/PlotNPDC.R: -------------------------------------------------------------------------------- 1 | #' @title Dynamic net pairwise connectedness plot 2 | #' @description Visualize dynamic net pairwise connectedness 3 | #' @param dca Connectedness object 4 | #' @param ca Compare dca object with a single connectedness object or a list of of connectedness objects 5 | #' @param path Path where plots should be saved 6 | #' @param ylim A vector including the lower and upper limit of the y-axis 7 | #' @param selection Indicator of the illustrated series 8 | #' @param width The width of the graphics region in inches 9 | #' @param height The height of the graphics region in inches 10 | #' @param ... Arguments to be passed to methods, such as graphical parameters (see par). 11 | #' @return Return connectedness plot 12 | #' @export 13 | PlotNPDC = function(dca, ca=NULL, path=NULL, ylim=c(NULL, NULL), selection=NULL, width=10, height=7, ...) { 14 | if (!is.null(path)) { 15 | if (!dir.exists(path)) { 16 | dir.create(path) 17 | } 18 | } 19 | if (length(ca)>0 && !is.null(ca$config$approach)) { 20 | ca = list(ca) 21 | } 22 | x = dca$NPDC 23 | if (is.null(x)) { 24 | stop(paste(ca$config$approach, "has no NPDC.")) 25 | } 26 | date = as.Date(dimnames(x)[[3]]) 27 | t = length(date) 28 | k = ncol(x) 29 | NAMES = colnames(x) 30 | if (is.null(NAMES)) { 31 | NAMES = 1:k 32 | } 33 | lower = ylim[1] 34 | upper = ylim[2] 35 | 36 | kk = k*(k-1)/2 37 | oldpar = par(no.readonly=TRUE) 38 | on.exit(par(oldpar)) 39 | if (!is.null(path)) pdf(file=paste0(path, "/NPDC.pdf"), width=width, height=height) 40 | if (is.null(selection)) { 41 | k_row = ceiling(sqrt(kk)) 42 | k_col = ceiling(kk/k_row) 43 | par(mfcol=c(k_row, k_col), oma=c(0,0,0,0) + 0.5, mar = c(1,1,1,1) + .5, mgp=c(1, 0.4, 0)) 44 | } else { 45 | k_row = ceiling(sqrt(k)) 46 | k_col = ceiling(k/k_row) 47 | par(mfcol=c(k_row, k_col), oma=c(0,0,0,0) + 0.5, mar = c(1,1,1,1) + .5, mgp=c(1, 0.4, 0)) 48 | } 49 | if (length(dim(dca$NET))>2) { 50 | for (j in 1:k) { 51 | for (i in 1:k) { 52 | if (i>j) { 53 | if (i==selection || j==selection || is.null(selection)) { 54 | x_ = x[i,j,,] 55 | if (is.null(lower)) { 56 | lower = min(x) 57 | } 58 | if (is.null(upper)) { 59 | upper = max(x) 60 | } 61 | plot(date, x_[,1], type="l", main=paste(NAMES[j],"-",NAMES[i]), las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper), ...) 62 | grid(NA, NULL, lty=2) 63 | for (l in 1:ncol(x_)) { 64 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x_[,l])),col=l, border=l) 65 | } 66 | for (l in 1:ncol(x_)) { 67 | lines(date, x_[,l],col=l) 68 | } 69 | abline(h=0, lty=3) 70 | legend("topleft", colnames(x_), fill=1:ncol(x_), bty="n") 71 | box() 72 | } 73 | } 74 | } 75 | } 76 | } else { 77 | if (is.null(lower)) { 78 | lower = min(x) 79 | } 80 | if (is.null(upper)) { 81 | upper = max(x) 82 | } 83 | for (j in 1:k) { 84 | for (i in 1:k) { 85 | if (i==selection || j==selection || is.null(selection)) { 86 | if (i>j) { 87 | plot(date, x[i,j,], type="l", main=paste(NAMES[j],"-",NAMES[i]), las=1, xlab="", ylab="", xaxs="i", yaxs="i", tck=-0.02, ylim=c(lower,upper), ...) 88 | grid(NA, NULL, lty=2) 89 | polygon(c(date,rev(date)),c(c(rep(0,t)),rev(x[i,j,])),col=1, border=1) 90 | if (!is.null(ca)) { 91 | for (il in 1:length(ca)) { 92 | lines(as.Date(rownames(ca[[il]]$TCI)), ca[[il]]$NPDC[i,j,], col=il+1) 93 | } 94 | } 95 | abline(h=0, lty=3) 96 | box() 97 | } 98 | } 99 | } 100 | } 101 | } 102 | if (!is.null(path)) dev.off() 103 | } 104 | -------------------------------------------------------------------------------- /R/VarianceTest.R: -------------------------------------------------------------------------------- 1 | 2 | #' @title Variance Test 3 | #' @description VarianceTest performs variance homogeneity tests including Ftest, Bartlett, Brown-Forsythe and Fligner-Killeen tests. 4 | #' @param formula a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups. 5 | #' @param data a tibble or data frame containing the variables in the formula formula 6 | #' @param alpha the level of significance to assess variance homogeneity. Default is set to alpha = 0.05. 7 | #' @param method a character string to select one of the variance homogeneity tests: "Bartlett", "Brown-Forsythe", "Fisher" and "Fligner-Killeen". 8 | #' @param na.rm Ha logical value indicating whether NA values should be stripped before the computation proceeds. 9 | #' @return Get bivariate portfolio weights 10 | #' @importFrom stats var.test 11 | #' @importFrom stats fligner.test 12 | #' @importFrom stats bartlett.test 13 | #' @importFrom stats complete.cases 14 | #' @importFrom stats model.frame 15 | #' @importFrom stats pf 16 | #' @importFrom stats na.omit 17 | #' @importFrom car leveneTest 18 | #' @references 19 | #' 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. 20 | #' @author David Gabauer 21 | #' @export 22 | VarianceTest = function (formula, data, alpha=0.05, method=c('Bartlett', 'Brown-Forsythe', 'Fligner-Killeen', 'Fisher', 'Levene'), na.rm=TRUE) { 23 | data = model.frame(formula, data) 24 | dp = as.character(formula) 25 | DNAME = paste(dp[[2L]], "and", dp[[3L]]) 26 | if (any(colnames(data) == dp[[3L]]) == FALSE) { 27 | stop("The name of group variable does not match the variable names in the data. The group variable must be one factor.") 28 | } 29 | if (any(colnames(data) == dp[[2L]]) == FALSE) { 30 | stop("The name of response variable does not match the variable names in the data.") 31 | } 32 | y = data[[dp[[2L]]]] 33 | group = data[[dp[[3L]]]] 34 | 35 | if (!(is.factor(group) | is.character(group))) { 36 | stop("The group variable must be a factor or a character.") 37 | } 38 | if (is.character(group)) { 39 | group = as.factor(group) 40 | } 41 | if (!is.numeric(y)) { 42 | stop("The response must be a numeric variable.") 43 | } 44 | if (na.rm) { 45 | completeObs = complete.cases(y, group) 46 | y = y[completeObs] 47 | group = group[completeObs] 48 | } 49 | 50 | if (method=="Brown-Forsythe") { 51 | n = length(y) 52 | x.levels = levels(factor(group)) 53 | y.vars = y.means = m = y.n = NULL 54 | y.mean = mean(y) 55 | for (i in x.levels) { 56 | y.vars[i] = var(y[group == i]) 57 | y.means[i] = mean(y[group == i]) 58 | y.n[i] = length(y[group == i]) 59 | } 60 | for (j in x.levels) { 61 | m[j] = (1 - y.n[j]/n) * (y.vars[j])/sum((1 - y.n/n) * (y.vars)) 62 | } 63 | SSb = sum(y.n * ((y.means - y.mean)^2)) 64 | denom = sum((1 - y.n/n) * (y.vars)) 65 | df1 = length(x.levels) - 1 66 | df2 = 1/(sum(m^2/(y.n - 1))) 67 | statistic = as.numeric(SSb/denom) 68 | p.value = pf(statistic, df1, df2, lower.tail=F) 69 | } else if (method == "Bartlett") { 70 | out = stats::bartlett.test(y, group) 71 | statistic = as.numeric(out$statistic) 72 | p.value = out$p.value 73 | } else if (method == "Fligner-Killeen") { 74 | out = stats::fligner.test(y, group) 75 | statistic = as.numeric(out$statistic) 76 | p.value = out$p.value 77 | } else if (method == "Fisher") { 78 | groups = as.character(unique(group)) 79 | out = stats::var.test(y[which(group==groups[1])], y[which(group!=groups[1])]) 80 | statistic = out$statistic 81 | p.value = out$p.value 82 | } else if (method == "Levene") { 83 | out = leveneTest(y, group) 84 | statistic = na.omit(out$`F value`)[1] 85 | p.value = na.omit(out$`Pr(>F)`)[1] 86 | } else { 87 | stop("This variance test does not exist.") 88 | } 89 | result = list(statistic=statistic, p.value=p.value) 90 | } 91 | -------------------------------------------------------------------------------- /docs/2020Gabauer_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2022Adekoya_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/Rpackage_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2018GabauerGupta_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2009DieboldYilmaz_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2012DieboldYilmaz_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2018BarunikKrehlik_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2021LastrapesWiesen_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2021BalcilarGabauerUmar_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2021ChatziantoniouGabauer_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2022GabauerChatziantoniouGupta_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} -------------------------------------------------------------------------------- /docs/2020AntonakakisChatziantoniouGabauer_files/style.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:"Open Sans";font-style:normal;font-weight:400;src:local("Open Sans"),local("OpenSans"),url(fonts/open-sans-400.woff) format("woff")}@font-face{font-family:"Open Sans";font-style:normal;font-weight:700;src:local("Open Sans Bold"),local("OpenSans-Bold"),url(fonts/open-sans-700.woff) format("woff")}*{box-sizing:border-box}body{padding:0;margin:0;font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;line-height:1.5;color:#606c71}a{color:#1e6bb8;text-decoration:none}a:hover{text-decoration:underline}.page-header{color:#fff;text-align:center;background-color:#159957;background-image:linear-gradient(120deg,#155799,#159957);padding:1.5rem 2rem}.page-header :last-child{margin-bottom:.5rem}@media screen and (max-width:42em){.page-header{padding:1rem 1rem}}.project-name{margin-top:0;margin-bottom:.1rem;font-size:2rem}@media screen and (max-width:42em){.project-name{font-size:1.75rem}}.project-tagline{margin-bottom:2rem;font-weight:400;opacity:.7;font-size:1.5rem}@media screen and (max-width:42em){.project-tagline{font-size:1.2rem}}.project-author,.project-date{font-weight:400;opacity:.7;font-size:1.2rem}@media screen and (max-width:42em){.project-author,.project-date{font-size:1rem}}.main-content,.toc{max-width:64rem;padding:2rem 4rem;margin:0 auto;font-size:1.1rem}.toc{padding-bottom:0}.toc .toc-box{padding:1.5rem;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem}.toc .toc-box .toc-title{margin:0 0 .5rem;text-align:center}.toc .toc-box>ul{margin:0;padding-left:1.5rem}@media screen and (min-width:42em) and (max-width:64em){.toc{padding:2rem 2rem 0}}@media screen and (max-width:42em){.toc{padding:2rem 1rem 0;font-size:1rem}}.main-content :first-child{margin-top:0}@media screen and (min-width:42em) and (max-width:64em){.main-content{padding:2rem}}@media screen and (max-width:42em){.main-content{padding:2rem 1rem;font-size:1rem}}.main-content img{max-width:100%}.main-content h1,.main-content h2,.main-content h3,.main-content h4,.main-content h5,.main-content h6{margin-top:2rem;margin-bottom:1rem;font-weight:400;color:#159957}.main-content p{margin-bottom:1em}.main-content code{padding:2px 4px;font-family:Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;background-color:#f3f6fa;border-radius:.3rem}.main-content pre{padding:.8rem;margin-top:0;margin-bottom:1rem;font:1rem Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#567482;word-wrap:normal;background-color:#f3f6fa;border:solid 1px #dce6f0;border-radius:.3rem;line-height:1.45;overflow:auto}@media screen and (max-width:42em){.main-content pre{font-size:.9rem}}.main-content pre>code{padding:0;margin:0;color:#567482;word-break:normal;white-space:pre;background:0 0;border:0}@media screen and (max-width:42em){.main-content pre>code{font-size:.9rem}}.main-content pre code,.main-content pre tt{display:inline;max-width:initial;padding:0;margin:0;overflow:initial;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.main-content pre code:after,.main-content pre code:before,.main-content pre tt:after,.main-content pre tt:before{content:normal}.main-content ol,.main-content ul{margin-top:0}.main-content blockquote{padding:0 1rem;margin-left:0;color:#819198;border-left:.3rem solid #dce6f0;font-size:1.2rem}.main-content blockquote>:first-child{margin-top:0}.main-content blockquote>:last-child{margin-bottom:0}@media screen and (max-width:42em){.main-content blockquote{font-size:1.1rem}}.main-content table{width:100%;overflow:auto;word-break:normal;word-break:keep-all;-webkit-overflow-scrolling:touch;border-collapse:collapse;border-spacing:0;margin:1rem 0}.main-content table th{font-weight:700;background-color:#159957;color:#fff}.main-content table td,.main-content table th{padding:.5rem 1rem;border-bottom:1px solid #e9ebec;text-align:left}.main-content table tr:nth-child(odd){background-color:#f2f2f2}.main-content dl{padding:0}.main-content dl dt{padding:0;margin-top:1rem;font-size:1rem;font-weight:700}.main-content dl dd{padding:0;margin-bottom:1rem}.main-content hr{height:2px;padding:0;margin:1rem 0;background-color:#eff0f1;border:0} --------------------------------------------------------------------------------