This method is based on the papers Systemic risk analysis in reconstructed economic and financial networks
Giulio Cimini,
Tiziano Squartini,
Diego Garlaschelli,
Andrea Gabrielli
Stock markets reconstruction via entropy maximization driven by fitness and density INPUT (Partial) information represented by two vectors with N elements each. The first vector represents the banks' assets a(i), i=1...N. The second vector represents the banks' liabilities l(i), i=1...N. Assets and liabilities are the banks marginals. Each vector contains N real numbers and can be provided as a *.txt, *.dat, *.csv file. As a check, the sum of assets, W, matches the sum of liabilities: a_1+a_2+...a_N=l_1+l_2+...l_N=W.As an additional input, our method requires the knowledge of the total number of connections, L. If this parameter is not known for the network under analysis, an estimate of it can be provided as well.
STEPS OF THE METHODOur method has been called " Max&Sam" since it is based on two subsequent steps. The first step prescribes to Maximize the likelihood of observing a particular configuration: as a result, a connection probability p(i,j) can be defined for each pair of nodes. The second step Samples the ensemble of matrices induced by the probability coefficients obtained from the first step.[1] choose a pair of nodes (e.g. nodes i and j);
In other words, we are assuming that banks connect with a probability depending on their marginals (notice that this is often the only available information);
which represents the likelihood condition associated to our model (the symbol
draw 0 with probability 1-p(i,j) draw p(i,j)defining an expected weight equal to <l(j)>=∑(i) ;
<w(i,j)>=l(j)
The output of our algorithm thus consists of a weighted, directed network (defined by an [1] download the *.rar file at the bottom of the page;[2] put the Matlab routines and the *.txt files inside the same folder;[3] run the code line: E=Reconstruction(Assets,Liabilities,Links);[4] as output, one matrix is obtained. Please notice that our method requires the constraints the be satisfied on average. Thus, an entire ensemble of matrices can, in principle, be explored. By tuning the parameter "EnsembleCardinality" within the code as many matrices as wanted can be generated (the default value is 1).Here we show the binary and weighted observed structure of our test-matrix. White dots represents 0s, black dots represent 1s, colored dots represent (positive) weights:Here we show the binary and weighted Here we explicitly show the scatter plot of observed VS reconstructed weights: |

Downloadable Files >