Type: | Package |
Title: | Connectedness Approach |
Version: | 1.0.4 |
Date: | 2025-02-24 |
Maintainer: | David Gabauer <david.gabauer@hotmail.com> |
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. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
RoxygenNote: | 7.2.3 |
Depends: | R (≥ 4.3) |
Imports: | frequencyConnectedness, rmgarch, rugarch, igraph, utils, quantreg, MASS, progress, glmnet, xts, zoo, urca, moments, riskParityPortfolio, methods, PerformanceAnalytics, car, L1pack |
Suggests: | rmarkdown, knitr |
NeedsCompilation: | no |
Packaged: | 2025-03-01 00:27:59 UTC; davidgabauer |
Author: | David Gabauer [aut, cre] |
Repository: | CRAN |
Date/Publication: | 2025-03-01 01:40:11 UTC |
Aggregated Connectedness Measures
Description
This function results in aggregated connectedness measures.
Usage
AggregatedConnectedness(dca, groups, start = NULL, end = NULL)
Arguments
dca |
Dynamic connectedness object |
groups |
List of at least two group vectors |
start |
Start index |
end |
End index |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
#Replication of Gabauer and Gupta (2018)
data("gg2018")
dca = ConnectednessApproach(gg2018,
nlag=1,
nfore=10,
model="VAR",
connectedness="Time")
ac = AggregatedConnectedness(dca, groups=list("US"=c(1,2,3,4), "JP"=c(5,6,7,8)))
Bayes Prior
Description
Get Bayes prior
Usage
BayesPrior(x, size = NULL, nlag)
Arguments
x |
zoo data matrix |
size |
Sample size used to calculate prior parameters |
nlag |
Lag length |
Value
Get Bayes Prior
Author(s)
David Gabauer
References
Primiceri, G. E. (2005). Time varying structural vector autoregressions and monetary policy. The Review of Economic Studies, 72(3), 821-852.
Examples
data("dy2012")
prior = BayesPrior(dy2012, nlag=1)
Bivariate DCC-GARCH
Description
This function multiple Bivariate DCC-GARCH models that captures more accurately conditional covariances and correlations
Usage
BivariateDCCGARCH(
x,
spec,
copula = "mvt",
method = "Kendall",
transformation = "parametric",
time.varying = TRUE,
asymmetric = FALSE,
eval.se = FALSE
)
Arguments
x |
zoo dataset |
spec |
A cGARCHspec A cGARCHspec object created by calling cgarchspec. |
copula |
"mvnorm" or "mvt" (see, rmgarch package) |
method |
"Kendall" or "ML" (see, rmgarch package) |
transformation |
"parametric", "empirical" or "spd" (see, rmgarch package) |
time.varying |
Boolean value to either choose DCC-GARCH or CCC-GARCH |
asymmetric |
Whether to include an asymmetry term to the DCC model (thus estimating the aDCC). |
eval.se |
Boolean value to compute standard errors |
Value
Estimate Bivariate DCC-GARCH
Author(s)
David Gabauer
References
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.
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.
Kroner and Ng (1998) optimal bivariate portfolio weights
Description
This function calculates the optimal portfolio weights according to Kroner and Ng (1998)
Usage
BivariatePortfolio(
x,
H,
method = c("cumsum", "cumprod"),
long = TRUE,
statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"),
metric = "StdDev",
digit = 2
)
Arguments
x |
zoo return matrix (in percentage) |
H |
Residual variance-covariance, correlation or pairwise connectedness matrix |
method |
Cumulative sum or cumulative product |
long |
Allow only long portfolio position |
statistics |
Hedging effectiveness statistic |
metric |
Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR) |
digit |
Number of decimal places |
Value
Get bivariate portfolio weights
Author(s)
David Gabauer
References
Kroner, K. F., & Ng, V. K. (1998). Modeling asymmetric comovements of asset returns. The Review of Financial Studies, 11(4), 817-844.
Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
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.
Examples
data("g2020")
fit = VAR(g2020, configuration=list(nlag=1))
bpw = BivariatePortfolio(g2020/100, fit$Q, method="cumsum", statistics="Fisher")
bpw$TABLE
ConditionalConnectedness
Description
This function computes the conditional connectedness measures.
Usage
ConditionalConnectedness(dca, group = c(1, 2, 3), start = NULL, end = NULL)
Arguments
dca |
Dynamic connectedness object |
group |
Group vector |
start |
Start index |
end |
End index |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
#Replication of Chatzianzoniou, Gabauer and Stenfors (2022)
data("cgs2022")
dca = ConnectednessApproach(cgs2022,
nlag=1,
nfore=10,
window.size=250,
model="VAR",
connectedness="Time")
cc = ConditionalConnectedness(dca, group=c(1,4,7,10,13,16))
Partial Conditional Correlations
Description
Compute partial conditional correlations
Usage
ConditionalCorrelation(Q)
Arguments
Q |
Variance-covariance matrix of dimension |
Value
Get partial conditional correlations
Author(s)
David Gabauer
Examples
data("dy2012")
fit = VAR(dy2012, configuration=list(nlag=1))
pcc = ConditionalCorrelation(fit$Q)
Connectedness Approach
Description
This function provides a modular framework combining various models and connectedness frameworks.
Usage
ConnectednessApproach(
x,
nlag = 1,
nfore = 10,
window.size = NULL,
corrected = FALSE,
model = c("VAR", "QVAR", "LAD", "LASSO", "Ridge", "Elastic", "TVP-VAR", "DCC-GARCH"),
connectedness = c("Time", "Frequency", "Joint", "Extended Joint", "R2"),
VAR_config = list(QVAR = list(tau = 0.5, method = "fn"), ElasticNet = list(nfolds = 10,
alpha = NULL, loss = "mae", n_alpha = 10), TVPVAR = list(kappa1 = 0.99, kappa2 =
0.99, prior = "BayesPrior", gamma = 0.01)),
DCC_config = list(standardize = FALSE),
Connectedness_config = list(TimeConnectedness = list(generalized = TRUE),
FrequencyConnectedness = list(partition = c(pi, pi/2, 0), generalized = TRUE,
scenario = "ABS"), R2Connectedness = list(method = "pearson", decomposition = TRUE,
relative = FALSE))
)
Arguments
x |
zoo data matrix |
nlag |
Lag length |
nfore |
H-step ahead forecast horizon |
window.size |
Rolling-window size or Bayes Prior sample size |
corrected |
Boolean value whether corrected or standard TCI should be computed |
model |
Estimation model |
connectedness |
Type of connectedness approach |
VAR_config |
Config for VAR model |
DCC_config |
Config for DCC-GARCH model |
Connectedness_config |
Config for connectedness approach |
Value
Get connectedness measures
Author(s)
David Gabauer
References
Adekoya, O. B., Akinseye, A. B., Antonakakis, N., Chatziantoniou, I., Gabauer, D., & Oliyide, J. (2022). Crude oil and Islamic sectoral stocks: Asymmetric TVP-VAR connectedness and investment strategies. Resources Policy.
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.
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.
Antonakakis, N., Chatziantoniou, I., & Gabauer, D. (2021). The impact of Euro through time: Exchange rate dynamics under different regimes. International Journal of Finance & Economics.
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.
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.
Barunik, J., & Krehlik, T. (2018). Measuring the frequency dynamics of financial connectedness and systemic risk. Journal of Financial Econometrics.
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: The energy sector, economic activity, financial markets and the environment. Cham: Springer International Publishing.
Chatziantoniou, I., & Gabauer, D. (2021). EMU risk-synchronisation and financial fragility through the prism of dynamic connectedness. The Quarterly Review of Economics and Finance.
Chatziantoniou, I., Gabauer, D., & Stenfors, A. (2021). Interest rate swaps and the transmission mechanism of monetary policy: A quantile connectedness approach. Economics Letters.
Chatziantoniou, I., Gabauer, D., & Gupta, R. (2023). Integration and risk transmission in the market for crude oil: New evidence from a time-varying parameter frequency connectedness approach. Resources Policy.
Chatziantoniou, I., Aikins 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. Journal of Cleaner Production.
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.
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.
Cunado, J., Chatziantoniou, I., Gabauer, D., de Gracia, F. P., & Hardik, M. (2023). Dynamic spillovers across precious metals and oil realized volatilities: Evidence from quantile extended joint connectedness measures. Journal of Commodity Markets.
Diebold, F. X., & Yilmaz, K. (2009). Measuring financial asset return and volatility spillovers, with application to global equity markets. The Economic Journal.
Diebold, F. X., & Yilmaz, K. (2012). Better to give than to receive: Predictive directional measurement of volatility spillovers. International Journal of Forecasting.
Gabauer, D. (2020). Volatility impulse response analysis for DCC-GARCH models: The role of volatility transmission mechanisms. Journal of Forecasting.
Gabauer, D. (2021). Dynamic measures of asymmetric & pairwise connectedness within an optimal currency area: Evidence from the ERM I system. Journal of Multinational Financial Management.
Gabauer, D., Chatziantoniou, I., & Stenfors, A. (2023). Model-free connectedness measures. Finance Research Letters.
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.
Gabauer, D., & Stenfors, A. (2024). Quantile-on-quantile connectedness measures: Evidence from the US treasury yield curve. Finance Research Letters, 60, 104852.
Lastrapes, W. D., & Wiesen, T. F. (2021). The joint spillover index. Economic Modelling, 94, 681-691.
Naeem, M. A., Chatziantoniou, I., Gabauer, D., & Karim, S. (2024). Measuring the G20 stock market return transmission mechanism: Evidence from the R2 connectedness approach. International Review of Financial Analysis.
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.
Zhang, Y., Gabauer, D., Gupta, R., & Ji, Q. (2024). How connected is the oil-bank network? Firm-level and high-frequency evidence. Energy Economics.
Examples
data("acg2020")
dca = ConnectednessApproach(acg2020,
nlag=1,
nfore=12,
model="VAR",
connectedness="Time",
VAR_config=list(TVPVAR=list(kappa1=0.99, kappa2=0.96,
prior="MinnesotaPrior", gamma=0.1)))
dca$TABLE
Connectedness table
Description
This function provides standard connectedness table.
Usage
ConnectednessTable(FEVD, digit = 2)
Arguments
FEVD |
Forecast error variance decomposition |
digit |
Number of decimal places |
Value
Get connectedness table
Examples
data("dy2012")
fit = VAR(dy2012, configuration=list(nlag=1))
fevd = FEVD(Phi=fit$B, Sigma=fit$Q, nfore=10, type="time", generalized=TRUE)$FEVD
dca = ConnectednessTable(fevd)
DCC-GARCH selection specification
Description
This function calculates the optimal DCC-GARCH specification
Usage
DCCGARCHselection(
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.9,
lag = 20,
ar = 0,
ma = 0
)
Arguments
x |
zoo data matrix |
distributions |
Vector of distributions |
models |
Vector of GARCH models |
prob |
The quantile (coverage) used for the VaR. |
conf.level |
Confidence level of VaR test statistics |
lag |
Lag length of weighted Portmanteau statistics |
ar |
AR(p) |
ma |
MA(q) |
Value
Get best DCC-GARCH
Author(s)
David Gabauer
References
Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3.
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.
Elastic Net vector autoregression
Description
Estimation of a VAR using equation-by-equation LASSO, Ridge or Elastic Net regressions.
Usage
ElasticNetVAR(
x,
configuration = list(nlag = 1, nfolds = 10, loss = "mae", alpha = NULL, n_alpha = 10)
)
Arguments
x |
zoo data matrix |
configuration |
Model configuration |
nlag |
Lag length |
nfolds |
N-fold cross validation |
loss |
Loss function |
alpha |
LASSO is alpha equal 1 and Ridge if alpha equal 0 |
n_alpha |
Creates n-equidistant alpha values |
Value
Estimate VAR model
Author(s)
David Gabauer
References
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.
Hoerl, A. E., & Kennard, R. W. (1970). Ridge regression: Biased estimation for nonorthogonal problems. Technometrics, 12(1), 55-67.
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.
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.
Examples
data("dy2012")
fit = ElasticNetVAR(dy2012, configuration=list(nlag=1, alpha=1, nfolds=10, loss="mae"))
Equally weighted portfolio
Description
This function calculates the equality weighted portfolio
Usage
EquallyWeightedPortfolio(
x,
method = c("cumsum", "cumprod"),
statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"),
metric = "StdDev",
digit = 2
)
Arguments
x |
zoo return matrix (in percentage) |
method |
Cumulative sum or cumulative product |
statistics |
Hedging effectiveness statistic |
metric |
Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR) |
digit |
Number of decimal places |
Value
Get portfolio weights
Author(s)
David Gabauer
References
Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
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.
Examples
data("g2020")
mcp = EquallyWeightedPortfolio(g2020/100, statistics="Fisher")
mcp$TABLE
Exclusive Connectedness Measures
Description
This function results in exclusive connectedness measures
Usage
ExclusiveConnectedness(dca, group = c(1, 2), start = NULL, end = NULL)
Arguments
dca |
Dynamic connectedness object |
group |
Vector of group indices |
start |
Start index |
end |
End index |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
#Replication of Chatziantoniou, et al. (2022)
data("cegg2022")
dca = ConnectednessApproach(cegg2022,
nlag=1,
nfore=20,
model="VAR",
connectedness="Time",
corrected=TRUE)
exc = ExclusiveConnectedness(dca, group=c(1,2,3))
Balcilar et al. (2021) extended joint connectedness approach
Description
This function provides extended joint connectedness measures.
Usage
ExtendedJointConnectedness(Phi, Sigma, nfore = 10)
Arguments
Phi |
VAR coefficient matrix |
Sigma |
Residual variance-covariance matrix |
nfore |
H-step ahead forecast horizon |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
#Replication of Balcilar et al. (2021)
data("bgu2021")
fit = VAR(bgu2021, configuration=list(nlag=1))
dca = ExtendedJointConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=20)
dca$TABLE
External Connectedness Measures
Description
This function provides external connectedness measures
Usage
ExternalConnectedness(
dca,
groups = list(c(1), c(2:ncol(dca$NET))),
start = NULL,
end = NULL
)
Arguments
dca |
Dynamic connectedness object |
groups |
List of at least two group vectors |
start |
Start index |
end |
End index |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
data("gg2018")
dca = ConnectednessApproach(gg2018, model="VAR",
connectedness="Time",
nlag=1, nfore=10, window.size=200)
ext = ExternalConnectedness(dca, groups=list("US"=c(1,2,3,4), "JP"=c(5,6,7,8)))
Forecast error variance decomposition
Description
This function computes the orthogonalized/generalized forecast error variance decomposition
Usage
FEVD(
Phi,
Sigma,
nfore = 100,
type = c("time", "frequency"),
generalized = TRUE,
range = NULL
)
Arguments
Phi |
VAR coefficient matrix |
Sigma |
Residual variance-covariance matrix |
nfore |
H-step ahead forecast horizon |
type |
Time or Frequency connectedness approach |
generalized |
Generalized or orthogonalized FEVD |
range |
Partition range for frequency approach only. |
Value
Orthogonalized/generalized time/frequency forecast error variance decomposition
References
Stiassny, A. (1996). A spectral decomposition for structural VAR models. Empirical Economics, 21(4), 535-555.
Koop, G., Pesaran, M. H., & Potter, S. M. (1996). Impulse response analysis in nonlinear multivariate models. Journal of Econometrics, 74(1), 119-147.
Pesaran, H. H., & Shin, Y. (1998). Generalized impulse response analysis in linear multivariate models. Economics Letters, 58(1), 17-29.
Examples
data("dy2012")
fit = VAR(dy2012, configuration=list(nlag=1))
fevd = FEVD(Phi=fit$B, Sigma=fit$Q, nfore=10, type="time", generalized=TRUE)$FEVD
Baruník and Křehlík (2018) frequency connectedness approach
Description
This function calculates the Baruník and Křehlík (2018) frequency connectedness measures.
Usage
FrequencyConnectedness(
Phi,
Sigma,
nfore = 100,
partition = c(pi, pi/2, 0),
generalized = TRUE,
orth = FALSE,
scenario = "ABS",
corrected = FALSE
)
Arguments
Phi |
VAR coefficient matrix |
Sigma |
Residual variance-covariance matrix |
nfore |
H-step ahead forecast horizon |
partition |
Frequency spectrum |
generalized |
Orthorgonalized/generalized FEVD |
orth |
Orthorgonalized shocks |
scenario |
ABS or WTH |
corrected |
Boolean value whether corrected or standard TCI should be computed |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
data("dy2012")
partition = c(pi+0.00001, pi/4, 0)
fit = VAR(dy2012, configuration=list(nlag=4))
dca = FrequencyConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=100, partition=partition)
Univariate GARCH selection criterion
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
Usage
GARCHselection(
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.9,
lag = 20,
ar = 0,
ma = 0
)
Arguments
x |
zoo data matrix |
distributions |
Vector of distributions |
models |
Vector of GARCH models |
prob |
The quantile (coverage) used for the VaR. |
conf.level |
Confidence level of VaR test statistics |
lag |
Lag length of weighted Portmanteau statistics |
ar |
AR(p) |
ma |
MA(q) |
Value
Get optimal univariate GARCH model specification
Author(s)
David Gabauer
References
Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3.
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.
Univariate GARCH test statistics
Description
This function provides the results of multiple univariate GARCH test statistics
Usage
GARCHtests(fit, lag = 20, prob = 0.05, conf.level = 0.9)
Arguments
fit |
Fitted univariate GARCH |
lag |
Lag length of weighted Portmanteau statistics |
prob |
The quantile (coverage) used for the VaR. |
conf.level |
Confidence level of VaR test statistics |
Value
Get best univariate GARCH
Author(s)
David Gabauer
References
Ghalanos, A. (2014). rugarch: Univariate GARCH models, R package version 1.3-3.
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.
Kroner and Sultan (1993) hedge ratios
Description
This function calculates the hedge ratios of Kroner and Sultan (1993)
Usage
HedgeRatio(
x,
H,
method = c("cumsum", "cumprod"),
statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"),
metric = "StdDev",
digit = 2
)
Arguments
x |
zoo return matrix (in percentage) |
H |
Residual variance-covariance, correlation or pairwise connectedness matrix |
method |
Cumulative sum or cumulative product |
statistics |
Hedging effectiveness statistic |
metric |
Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR) |
digit |
Number of decimal places |
Value
Get hedge ratios
Author(s)
David Gabauer
References
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.
Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
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.
Examples
data("g2020")
fit = VAR(g2020, configuration=list(nlag=1))
hr = HedgeRatio(g2020/100, fit$Q)
hr$TABLE
Impulse response functions
Description
This function calculates orthorgonalized/generalized impulse response functions of time or frequency domain.
Usage
IRF(Phi, Sigma, nfore = 10, orth = TRUE)
Arguments
Phi |
VAR coefficient matrix |
Sigma |
Residual Variance-Covariance Matrix |
nfore |
H-step ahead forecast horizon |
orth |
Boolean |
Value
Orthorgonal/generalized time/frequency impulse response functions
Author(s)
David Gabauer
References
Stiassny, A. (1996). A spectral decomposition for structural VAR models. Empirical Economics, 21(4), 535-555.
Koop, G., Pesaran, M. H., & Potter, S. M. (1996). Impulse response analysis in nonlinear multivariate models. Journal of Econometrics, 74(1), 119-147.
Pesaran, H. H., & Shin, Y. (1998). Generalized impulse response analysis in linear multivariate models. Economics Letters, 58(1), 17-29.
Examples
data("dy2012")
fit = VAR(dy2012, configuration=list(nlag=1))
irf = IRF(Phi=fit$B, Sigma=fit$Q, nfore=10, orth=TRUE)
Inclusive Connectedness Measures
Description
This function results in inclusive connectedness measures
Usage
InclusiveConnectedness(dca, group = c(1, 2), start = NULL, end = NULL)
Arguments
dca |
Dynamic connectedness object |
group |
Vector of group indices |
start |
Start index |
end |
End index |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
data("cegg2022")
dca = ConnectednessApproach(cegg2022,
model="VAR",
connectedness="Time",
nlag=1,
nfore=20,
corrected=TRUE)
inc = InclusiveConnectedness(dca, group=c(1,2,3))
Internal Connectedness Measures
Description
This function provides internal connectedness measures
Usage
InternalConnectedness(
dca,
groups = list(c(1), c(2:ncol(dca$NET))),
start = NULL,
end = NULL
)
Arguments
dca |
Dynamic connectedness object |
groups |
List of at least two group vectors |
start |
Start index |
end |
End index |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
Examples
data("gg2018")
dca = ConnectednessApproach(gg2018,
nlag=1,
nfore=10,
window.size=200,
model="VAR",
connectedness="Time")
int = InternalConnectedness(dca, groups=list("US"=c(1,2,3,4), "JP"=c(5,6,7,8)))
Lastrapes and Wiesen (2021) joint connectedness approach
Description
This function calculates the Lastrapes and Wiesen (2021) joint connectedness measures.
Usage
JointConnectedness(Phi, Sigma, nfore)
Arguments
Phi |
VAR coefficient matrix |
Sigma |
Residual variance-covariance matrix |
nfore |
H-step ahead forecast horizon |
Value
Get connectedness measures
Author(s)
David Gabauer
References
Lastrapes, W. D., & Wiesen, T. F. (2021). The joint spillover index. Economic Modelling, 94, 681-691.
Examples
data("lw2021")
fit = VAR(lw2021, configuration=list(nlag=2))
dca = JointConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=30)
dca$TABLE
Least absolute deviation vector autoregression
Description
Estimation of a LAD VAR using equation-by-equation LAD regressions.
Usage
LADVAR(x, configuration = list(nlag = 1))
Arguments
x |
zoo data matrix |
configuration |
model configuration |
nlag |
Lag length |
Value
Estimate LAD VAR model
Author(s)
David Gabauer
Examples
data("dy2012")
fit = LADVAR(dy2012, configuration=list(nlag=1))
Minimum connectedness portfolio
Description
This function calculates the minimum connectedness portfolio
Usage
MinimumConnectednessPortfolio(
x,
H,
method = c("cumsum", "cumprod"),
statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"),
long = TRUE,
metric = "StdDev",
digit = 2
)
Arguments
x |
zoo return matrix (in percentage) |
H |
Pairwise connectedness matrix or alternatively variance-covariance or correlation matrix |
method |
Cumulative sum or cumulative product |
statistics |
Hedging effectiveness statistic |
long |
Allow only long portfolio position |
metric |
Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR) |
digit |
Number of decimal places |
Value
Get portfolio weights
Author(s)
David Gabauer
References
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.
Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
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.
Examples
data("g2020")
fit = VAR(g2020, configuration=list(nlag=1))
dca = TimeConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=10, generalized=TRUE)
mcp = MinimumConnectednessPortfolio(g2020/100, dca$PCI, statistics="Fisher")
mcp$TABLE
Minnesota Prior
Description
Get Minnesota Prior
Usage
MinnesotaPrior(gamma = 0.1, k, nlag)
Arguments
gamma |
Diagonal value of variance-covariance matrix |
k |
Number of series |
nlag |
Lag length |
Value
Get Minnesota Prior
Author(s)
David Gabauer
References
Koop, G., & Korobilis, D. (2010). Bayesian multivariate time series methods for empirical macroeconomics. Now Publishers Inc.
Examples
prior = MinnesotaPrior(0.1, k=4, nlag=1)
Multivariate Hedging Portfolio
Description
This function calculates the multivariate hedging portfolio of Cocca et al. (2024)
Usage
MultivariateHedgingPortfolio(
x,
H,
method = c("cumsum", "cumprod"),
statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"),
metric = "StdDev",
digit = 2
)
Arguments
x |
zoo return matrix (in percentage) |
H |
Residual variance-covariance, correlation or pairwise connectedness matrix |
method |
Cumulative sum or cumulative product |
statistics |
Hedging effectiveness statistic |
metric |
Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR) |
digit |
Number of decimal places |
Value
Get hedge ratios
Author(s)
David Gabauer
References
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.
Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
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.
Examples
data("g2020")
fit = VAR(g2020, configuration=list(nlag=1))
mhp = MultivariateHedgingPortfolio(g2020/100, fit$Q)
mhp$TABLE
Partial Contemporaneous Correlations
Description
Get partial contemporaneous correlations
Usage
PartialCorrelations(Q)
Arguments
Q |
variance-covariance matrix |
Value
Get partial contemporaneous correlations
Author(s)
David Gabauer
References
Dahlhaus, R., & Eichler, M. (2003). Causality and graphical models in time series analysis. Oxford Statistical Science Series, 115-137.
Examples
data(dy2012)
fit = VAR(dy2012, configuration=list(nlag=1))
pcc = PartialCorrelations(fit$Q)
Dynamic from total directional connectedness plot
Description
Visualize dynamic from total directional connectedness
Usage
PlotFROM(
dca,
ca = NULL,
path = NULL,
ylim = c(NULL, NULL),
width = 10,
height = 7,
...
)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
ylim |
A vector including the lower and upper limit of the y-axis |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphical parameters (see par). |
Value
Return connectedness plot
Dynamic influence connectedness plot
Description
Visualize dynamic influence connectedness
Usage
PlotINF(
dca,
ca = NULL,
path = NULL,
ylim = c(NULL, NULL),
selection = NULL,
width = 10,
height = 7,
...
)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
ylim |
A vector including the lower and upper limit of the y-axis |
selection |
Indidcator of the illustrated series |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphidcal parameters (see par). |
Value
Return connectedness plot
Dynamic net total directional connectedness plot
Description
Visualize dynamic net total directional connectedness
Usage
PlotNET(
dca,
ca = NULL,
path = NULL,
ylim = c(NULL, NULL),
width = 10,
height = 7,
...
)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
ylim |
A vector including the lower and upper limit of the y-axis |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphical parameters (see par). |
Value
Return connectedness plot
Dynamic net pairwise connectedness plot
Description
Visualize dynamic net pairwise connectedness
Usage
PlotNPDC(
dca,
ca = NULL,
path = NULL,
ylim = c(NULL, NULL),
selection = NULL,
width = 10,
height = 7,
...
)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
ylim |
A vector including the lower and upper limit of the y-axis |
selection |
Indicator of the illustrated series |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphical parameters (see par). |
Value
Return connectedness plot
Dynamic net pairwise transmission plot
Description
Visualize dynamic net total directional connectedness
Usage
PlotNPT(dca, ca = NULL, path = NULL, width = 10, height = 7, ...)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphidcal parameters (see par). |
Value
Return connectedness plot
Network plot
Description
Visualize net pairwise or pairwise connectedness measures
Usage
PlotNetwork(
dca,
method = "NPDC",
path = NULL,
name_length = NULL,
threshold = 0,
width = 10,
height = 10,
...
)
Arguments
dca |
Connectedness object |
method |
Either visualizing NPDC or PCI |
path |
Path where plots should be saved |
name_length |
Length of variable names in the network plot |
threshold |
Threshold for bivariate connections between 0 and 1 |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphical parameters (see par). |
Value
Return connectedness plot
Dynamic pairwise connectedness plot
Description
Visualize dynamic pairwise connectedness
Usage
PlotPCI(
dca,
ca = NULL,
path = NULL,
ylim = c(NULL, NULL),
selection = NULL,
width = 10,
height = 7,
...
)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
ylim |
A vector including the lower and upper limit of the y-axis |
selection |
Indidcator of the illustrated series |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphidcal parameters (see par). |
Value
Return connectedness plot
Dynamic total connectedness plot
Description
Visualize dynamic total connectedness
Usage
PlotTCI(
dca,
ca = NULL,
path = NULL,
ylim = c(NULL, NULL),
width = 10,
height = 5,
...
)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
ylim |
A vector including the lower and upper limit of the y-axis |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphical parameters (see par). |
Value
Return connectedness plot
Dynamic to total directional connectedness plot
Description
Visualize dynamic to total directional connectedness
Usage
PlotTO(
dca,
ca = NULL,
path = NULL,
ylim = c(NULL, NULL),
width = 10,
height = 7,
...
)
Arguments
dca |
Connectedness object |
ca |
Compare dca object with a single connectedness object or a list of of connectedness objects |
path |
Path where plots should be saved |
ylim |
A vector including the lower and upper limit of the y-axis |
width |
The width of the graphics region in inches |
height |
The height of the graphics region in inches |
... |
Arguments to be passed to methods, such as graphical parameters (see par). |
Value
Return connectedness plot
Quantile vector autoregression
Description
Estimation of a QVAR using equation-by-equation quantile regressions.
Usage
QVAR(x, configuration = list(nlag = 1, tau = 0.5, method = "fn"))
Arguments
x |
zoo data matrix |
configuration |
model configuration |
nlag |
Lag length |
tau |
quantile between 0 and 1 |
method |
See methods for rq in quantreg package. Default is "fn". |
Value
Estimate QVAR model
Author(s)
David Gabauer
References
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.
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.
Examples
data("dy2012")
fit = QVAR(dy2012, configuration=list(nlag=1, tau=0.5))
R2 connectedness approach
Description
This function computes the R2 connectedness measures
Usage
R2Connectedness(
x,
window.size = NULL,
nlag = 0,
method = "pearson",
relative = FALSE,
corrected = FALSE
)
Arguments
x |
zoo data matrix |
window.size |
Rolling-window size or Bayes Prior sample size |
nlag |
Lag length |
method |
"pearson", "spearman", or "kendall". "pearson" is default. |
relative |
Boolean whether relative or absolute R2 should be used |
corrected |
Boolean value whether corrected or standard TCI should be computed |
Value
Get R2 connectedness measures
Author(s)
David Gabauer
References
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.
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.
Examples
data("dy2012")
dca = R2Connectedness(dy2012, window.size=NULL, nlag=0, method="pearson")
dca$TABLE
R2 decomposed connectedness from correlations
Description
This function computes the R2 decomposed connectedness measures from correlations
Usage
R2Correlations(R)
Arguments
R |
zoo correlation data matrix |
Value
Get R2 connectedness measures from correlation matrix
Author(s)
David Gabauer
References
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.
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.
Minimum connectedness portfolio
Description
This function calculates the minimum connectedness portfolio
Usage
RiskParityPortfolio(
x,
H,
method = c("cumsum", "cumprod"),
statistics = c("Fisher", "Bartlett", "Fligner-Killeen", "Levene", "Brown-Forsythe"),
long = TRUE,
metric = "StdDev",
digit = 2
)
Arguments
x |
zoo return matrix (in percentage) |
H |
Pairwise connectedness matrix or alternatively variance-covariance or correlation matrix |
method |
Cumulative sum or cumulative product |
statistics |
Hedging effectiveness statistic |
long |
Allow only long portfolio position |
metric |
Risk measure of Sharpe Ratio (StdDev, VaR, or CVaR) |
digit |
Number of decimal places |
Value
Get portfolio weights
Author(s)
David Gabauer
References
Ederington, L. H. (1979). The hedging performance of the new futures markets. The Journal of Finance, 34(1), 157-170.
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.
Examples
data("g2020")
fit = VAR(g2020, configuration=list(nlag=1))
mcp = RiskParityPortfolio(g2020/100, fit$Q, statistics="Fisher")
mcp$TABLE
Summary Statistics
Description
Get comprehensive summary statistics
Usage
SummaryStatistics(
x,
portmanteau = c("Ljung-Box", "Box-Pierce", "Monti"),
correlation = c("kendall", "spearman", "pearson"),
nlag = 20,
digit = 3
)
Arguments
x |
zoo data matrix |
portmanteau |
portmanteau statistics: "Box-Pierce", "Ljung-Box", "Monti" |
correlation |
correlation coefficient: "pearson", "kendall", "spearman". |
nlag |
number of lags for Weighted Portmanteau statistics |
digit |
digit Number of decimal places |
Value
Get summary statistics
Author(s)
David Gabauer
Examples
data(dy2012)
SummaryStatistics(dy2012)
Time-varying parameter vector autoregression
Description
Estimate TVP-VAR model
Usage
TVPVAR(x, configuration = list(l = c(0.99, 0.99), nlag = 1, prior = NULL))
Arguments
x |
zoo data matrix |
configuration |
model configuration |
nlag |
Lag length |
prior |
List of prior VAR coefficients and variance-covariance matrix |
l |
forgetting factors (kappa1, kappa2) |
Value
Estimate TVP-VAR model
Author(s)
David Gabauer
References
Koop, G., & Korobilis, D. (2014). A new index of financial conditions. European Economic Review, 71, 101-116.
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.
Examples
data("dy2012")
prior = BayesPrior(dy2012, nlag=1)
fit = TVPVAR(dy2012, configuration=list(nlag=1, prior=prior, l=c(0.99,0.99)))
Diebold and Yilmaz (2009, 2012) connectedness approach
Description
This function allows to calculate the Diebold and Yilmaz (2009, 2012) connectedness measures.
Usage
TimeConnectedness(
Phi = NULL,
Sigma = NULL,
nfore = 10,
generalized = TRUE,
corrected = FALSE,
FEVD = NULL
)
Arguments
Phi |
VAR coefficient matrix |
Sigma |
Residual variance-covariance matrix |
nfore |
H-step ahead forecast horizon |
generalized |
Orthorgonalized/generalized FEVD |
corrected |
Boolean value whether corrected or standard TCI should be computed |
FEVD |
Alternatively, to provide Phi and Sigma it is also possible to use FEVD directly. |
Value
Get connectedness measures
Author(s)
David Gabauer
References
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.
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.
Examples
#Replication of DY2012
data("dy2012")
fit = VAR(dy2012, configuration=list(nlag=4))
dca = TimeConnectedness(Phi=fit$B, Sigma=fit$Q, nfore=10, generalized=TRUE)
dca$TABLE
Uninformative Prior
Description
Get Uninformative Prior
Usage
UninformativePrior(k, nlag)
Arguments
k |
Number of series |
nlag |
Lag length |
Value
Get Uninformative Prior
Author(s)
David Gabauer
References
Koop, G., & Korobilis, D. (2010). Bayesian multivariate time series methods for empirical macroeconomics. Now Publishers Inc.
Examples
prior = UninformativePrior(k=4, nlag=1)
Vector autoregression
Description
Estimation of a VAR using equation-by-equation OLS regressions.
Usage
VAR(x, configuration = list(nlag = 1))
Arguments
x |
zoo data matrix |
configuration |
model configuration |
nlag |
Lag length |
Value
Estimate VAR model
Author(s)
David Gabauer
References
Sims, C. A. (1980). Macroeconomics and reality. Econometrica, 1-48.
Examples
data("dy2012")
fit = VAR(dy2012, configuration=list(nlag=1))
Generalized volatility forecast error variance decomposition and volatility impulse response functions
Description
This function provides the volatility impulse responses and the forecast error variance decomposition of DCC-GARCH models.
Usage
VFEVD(fit, nfore = 100, standardize = FALSE)
Arguments
fit |
Fitted DCC-GARCH model |
nfore |
H-step ahead forecast horizon |
standardize |
Boolean value whether GIRF should be standardized |
Value
Get volatility impulse response functions and forecast error variance decomposition
Author(s)
David Gabauer
References
Gabauer, D. (2020). Volatility impulse response analysis for DCC‐GARCH models: The role of volatility transmission mechanisms. Journal of Forecasting, 39(5), 788-796.
Variance Test
Description
VarianceTest performs variance homogeneity tests including Ftest, Bartlett, Brown-Forsythe and Fligner-Killeen tests.
Usage
VarianceTest(
formula,
data,
alpha = 0.05,
method = c("Bartlett", "Brown-Forsythe", "Fligner-Killeen", "Fisher", "Levene"),
na.rm = TRUE
)
Arguments
formula |
a formula of the form lhs ~ rhs where lhs gives the sample values and rhs the corresponding groups. |
data |
a tibble or data frame containing the variables in the formula formula |
alpha |
the level of significance to assess variance homogeneity. Default is set to alpha = 0.05. |
method |
a character string to select one of the variance homogeneity tests: "Bartlett", "Brown-Forsythe", "Fisher" and "Fligner-Killeen". |
na.rm |
Ha logical value indicating whether NA values should be stripped before the computation proceeds. |
Value
Get bivariate portfolio weights
Author(s)
David Gabauer
References
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.
WeightedBoxTest
Description
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.
Usage
WeightedBoxTest(
x,
lag = 1,
type = c("Box-Pierce", "Ljung-Box", "Monti"),
fitdf = 0,
sqrd.res = FALSE,
log.sqrd.res = FALSE,
abs.res = FALSE,
weighted = TRUE
)
Arguments
x |
a numeric vector or univariate time series, or residuals of a fitted time series |
lag |
the statistic will be based on lag autocorrelation coefficients. lag=1 by default |
type |
test to be performed, partial matching is used. "Box-Pierce" by default |
fitdf |
number of degrees of freedom to be subtracted if x is a series of residuals, set at 0 by default |
sqrd.res |
A flag, should the series/residuals be squared to detect for nonlinear effects?, FALSE by default |
log.sqrd.res |
A flag, should a log of the squared series/residuals be used to detect for nonlinear effects? FALSE by default |
abs.res |
A flag, should the absolute series or residuals be used to detect for nonlinear effects? FALSE by default |
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 |
Value
Get Uninformative Prior
Author(s)
David Gabauer
References
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.
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.
Ljung, G. M. and Box, G. E. P. (1978), On a measure of lack of fit in time series models. Biometrika 65, 297-303.
Mahdi, E. and McLeod, A. I. (2012), Improved multivariate portmanteau test. Journal of Time Series Analysis 65(2), 297-303.
Monti, A. C. (1994), A proposal for a residual autocorrelation test in linear models. Biometrika 81(4), 776-780.
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.
Wold representation theorem
Description
Transform VAR to VMA coefficients
Usage
Wold(x, nfore = 10)
Arguments
x |
VAR coefficients |
nfore |
H-step ahead forecast horizon |
Value
Get VMA coefficients
Author(s)
David Gabauer
Examples
data("dy2012")
fit = VAR(dy2012, configuration=list(nlag=1))
wold = Wold(fit$B, nfore=10)
Dataset of Adekoya, Akinseye, Antonakakis, Chatziantoniou, Gabauer and Oliyide (2022)
Description
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.
Usage
data(aaacgo2022)
Format
zoo data.frame
Dataset of Antonakakis, Chatziantoniou and Gabauer (2020)
Description
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.
Usage
data(acg2020)
Format
zoo data.frame
Dataset of Broadstock, Chatziantoniou and Gabauer (2022)
Description
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.
Usage
data(bcg2022)
Format
zoo data.frame
Dataset of Balcilar, Gabauer and Umar (2021)
Description
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.
Usage
data(bgu2021)
Format
zoo data.frame
Dataset of Chatziantoniou, Elsayed, Gabauer and Gozgor (2022)
Description
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
Usage
data(cegg2022)
Format
zoo data.frame
Dataset of Chatziantoniou and Gabauer (2021)
Description
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.
Usage
data(cg2021)
Format
zoo data.frame
Dataset of Chatziantoniou, Gabauer and Gupta (2022)
Description
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.
Usage
data(cgg2022)
Format
zoo data.frame
Dataset of Cocca, Gabauer, and Pomberger (2024)
Description
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.
Usage
data(cgp2024)
Format
zoo data.frame
Dataset of Chatziantoniou, Gabauer and Stenfors (2021)
Description
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.
Usage
data(cgs2021)
Format
zoo data.frame
Dataset of Chatziantoniou, Gabauer and Stenfors (2022)
Description
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.
Usage
data(cgs2022)
Format
zoo data.frame
Dataset of Diebold and Yilmaz (2009)
Description
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.
Usage
data(dy2009)
Format
A zoo data.frame containing 30x1141 observations.
Source
Yahoo Finance
Dataset of Diebold and Yilmaz (2012)
Description
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.
Usage
data(dy2012)
Format
A zoo data.frame containing 30x1141 observations.
Source
Yahoo Finance
Dataset of Gabauer (2020)
Description
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.
Usage
data(g2020)
Format
zoo data.frame
Dataset of Chatziantoniou, Abakah, Gabauer & Tiwari (2022)
Description
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.
Usage
data(gcat2022)
Format
zoo data.frame
Dataset of Gabauer and Gupta (2018)
Description
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.
Usage
data(gg2018)
Format
zoo data.frame
Dataset of Gabauer, Gupta, Haradik and Miller (2020)
Description
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.
Usage
data(gghm2022)
Format
zoo data.frame
Dataset of Juncal, Chatziantoniou, Gabauer, Garcia & Hardik (2022)
Description
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.
Usage
data(jcggh2022)
Format
zoo data.frame
Dataset of Lastrapes and Wiesen (2021)
Description
For detailed information see: Lastrapes, W. D., & Wiesen, T. F. (2021). The joint spillover index. Economic Modelling, 94, 681-691.
Usage
data(lw2021)
Format
zoo data.frame