knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options( rmarkdown.html_vignette.check_title = FALSE ) library(FinNet) library(markdown)
This vignette illustrates how to:
The experiments use these two datasets:
# Create a list of the desired firms data('firms_BKB') # Check a weakly connected subset of the network FF_uncnnctd <- FF(firms_BKB[20:23], who = 'own', ties = 'naive', Matrix = TRUE) g_uncnnctd <- FF.graph(FF_uncnnctd, 'simple') # Check a strongly connected subset of the network FF_cnnctd <- FF(firms_BKB[5:10], who = 'own', ties = 'naive', Matrix = TRUE) g_cnnctd <- FF.graph(FF_cnnctd, 'simple') # Plot to compare layout(matrix(1:2, nrow = 1));{ plot_igraph(g_uncnnctd, asp = .75) text(0, 1.3, 'Weakly connected') plot_igraph(g_cnnctd, asp = .75) text(0, 1.3, 'Better connected') }
The algebraic connectivity can be computed to determine the connectivity and robustness of a network. The fiedler()
takes as inputs either a \code{financial_matrix} object produced by \code{FF} or, if the relevant package is installed, a \code{network_financial}/\code{igraph_financial} (respectively \code{network}/\code{igraph}) object.
As expected, the better-connected network has higher Fiedler value ($\approx$r round(fiedler(FF_cnnctd), 2)
) than the other one ($\approx$r round(fiedler(FF_uncnnctd), 2)
).
Network efficiency quantifies how efficiently information and/or money capital flow through a network. It is essential in systemic-risk identification, resilience assessment, and crisis-propagation analysis.
As expected, the larger network has lower efficiency ($\approx$r round(network.efficiency(FF_cnnctd), 2)
) than the smaller one ($\approx$r round(network.efficiency(FF_uncnnctd), 2)
).
Cascade failure analysis (CFA) involves understanding how failures in one part of the network might cascade to other parts. Networks capable of isolating such failures or minimizing their effects demonstrate higher robustness.
cfa(FF_uncnnctd)|> knitr::kable()
cfa(FF_cnnctd)|> knitr::kable()
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.