The codes/scripts in the 'FinNetIndicators' repository can be used to filter cross-correlation matrices to construct network based on two methods:
(a) Minimum spanning tree (MST) + Threshold
(b) Planar Maximally Filtered Graph (PMFG)
Thereafter, the filtered network in the form of edge list or file can be characterized by computing several network measures including edge-based measures.
The codes/scripts require input file in the form of edge lists.
FormanUndirected.cpp also requires an input file containing the list of nodes in the network.
[1] A. Samal* #, H. K. Pharasi#, S. J. Ramaia, H. Kannan, E. Saucan, J. Jost, and A. Chakraborti*, Network geometry and market instability, R. Soc. Open Sci. 8(2): 201734 (2021).
[2] A. Samal*, S. Kumar, Y. Yadav, and A. Chakraborti*, Network-centric indicators for fragility in global financial indices, Front. Phys. 8: 624373 (2021).
[3] S. Venkatesan#, R.P. Vivek-Ananth#, R.P. Sreejith, P. Mangalapandi, A.A. Hassanali*, and A. Samal*, Network approach towards understanding the crazing in glassy amorphous polymers, Journal of Statistical Mechanics: Theory and Experiment 2018(4):043305 (2018).
[4] A. Samal#, R.P. Sreejith#, J. Gu, S. Liu, E. Saucan* & J. Jost*, Comparative analysis of two discretizations of Ricci curvature for complex networks, Scientific Reports 8(1):8650 (2018).
[5] R.P. Sreejith, K. Mohanraj, J. Jost*, E. Saucan* & A. Samal*, Forman curvature for complex networks, Journal of Statistical Mechanics: Theory and Experiment 2016(6):063206 (2016).
( # Equal contribution, * Corresponding authors)
Please cite the above manuscripts if you use the codes in this repository for your work.
The following two scripts can be used to filter the cross-correlation matrices and generate edge files and node files of the filtered networks:
- mst_wt.py : Python script to generate a weighted or unweighted filtered minimum spanning tree + thresholded network from the weighted network of cross-correlation values. The weights are interpreted as distances (costs).
- PMFG_wt.py: Python script to generate a weighted PMFG from the weighted network of cross-correlation values. The weights are interpreted as distances (costs).
The following scripts can be used to compute the different network measures for the filtered networks:
- clique_number.py : Clique number
- diameter_wt.py : Diameter of a weighted network
- eigenvector_centality.py : Eigenvector centrality for all the nodes of a weighted network
- FormanUndirected.cpp : Forman-Ricci curvature for all the edges of a weighted/unweighted network
- ga_wt: Global assortativity of a weighted network
- graph_measures.py : Number of edges, Average degree, Average Weighted Degree, Edge Density, Average Clustering coefficient
- grc_wt_undir.py : Global Reaching Centrality of a weighted network
- network_entropy.py : Entropy of an unweighted network
- comm_eff.py : Communication efficiency of a weighted network
- OR-UnDir.py : Ollivier-Ricci curvature for all the edges of a weighted/unweighted but undirected network
- MengerHaantjesUnweighted.py : Menger-curvature and Haantjes-curvature for all the edges of an unweighted network
The Example folder contains an already filtered example network which can be used to compute the different network measures. Details of files:
- example_distance.txt : Edge file with weights as distances
Note that we use this edge file to compute the diameter, global reaching centrality, communication efficiency, Forman-Ricci curvature, Ollivier-Ricci curvature, Menger-Ricci and Haantjes-Ricci curvature.
- example_strength.txt : Edge file with weights as strengths
Note that we use this edge file to compute the eigenvector centrality, global assortativity and average weighted degree.
Any of the above two edge files can be used to compute clique number, average degree, edge density, average clustering coefficient and network entropy.
- example_nodes.txt : Node file
The outputs of the computation of eigenvector centrality, Forman-Ricci curvature and Ollivier-Ricci curvature are also provided in the Example folder for replication.