File
network_measures.m
Name
network_measures
Synopsis
network_measures - Using the adjacency matrix of inter-institutional Granger causal relationships, network measures of interconnectedness are calculated for all nodes based on Billio et al. (2010)
Introduction
NOTE: PART OF A SET OF 8 RELATED FILES:
To investigate the dynamic propagation of systemic risk, the authors measure the direction of the relationship between institutions using Granger causality. Specifically, the authors analyze the pairwise Granger causalities between the t and t + 1 monthly returns of 4 indexes [monthly returns of hedge funds, banks, brokers, and insurance companies]; see discussion in Bisias et al. (2012), section B.5.3, specifically around equations (A.16), for detailed discussion of how Granger causality is estimated.
The authors take a step further and apply the dynamic Granger-causality methodology to individual institutions. For a given 36-month window, they select the 25 largest institutions from each of the four categories as determined by average market capitalization over the period for banks, insurers, and brokers, and by average AUM for hedge funds. They then compute the "directional" network of these 100 institutions using Granger causalities. The following set of risk measures can then be computed for each institution:
Number of "In" Connections: The number of financial institutions that significantly Granger-cause this financial institution.
Number of "Out" Connections: The number of financial institutions that are significantly Granger-caused by this financial institution.
Number of "In+Out" Connections: The sum of In and Out connections.
Number of "In-from-Other" Connections: The number of other types of financial institutions that significantly Granger-cause this financial institution. For example, for a hedge fund, "other types" are banks, brokers, and insurers.
Number of "Out-to-Other" Connections: The number of other types of financial institutions that are significantly Granger-caused by this financial institution.
Number of "In+Out Other" Connections: The sum of "In-from-Other" and "Out-to-Other" connections.
Closeness: The shortest path between a financial institution and all other financial institutions reachable from it, averaged across all other financial institutions.
Eigenvector Centrality: For a network with n nodes, let A be the adjacency matrix, the (n x n) matrix of 0's and 1's in which the (i, j) element is 1 if there is a connection between nodes i and j, and 0 otherwise. The eigenvector centrality measure is the eigenvector corresponding to the largest eigenvalue of A.
License
=============================================================================
Copyright 2011, Dimitrios Bisias, Andrew W. Lo, and Stavros Valavanis
COPYRIGHT STATUS: This work was funded in whole or in part by the Office of
Financial Research under U.S. Government contract TOSOFR-11-C-0001, and is,
therefore, subject to the following license: The Government is granted for
itself and others acting on its behalf a paid-up, nonexclusive, irrevocable,
worldwide license to reproduce, prepare derivative works,
distribute copies to the public, perform and display the work.
All other rights are reserved by the copyright owner.
THIS SOFTWARE IS PROVIDED "AS IS". YOU ARE USING THIS SOFTWARE AT YOUR OWN RISK. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS, CONTRIBUTORS, OR THE UNITED STATES GOVERNMENT BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
=============================================================================
Inputs
Outputs
Code
% Run warning message
warning('OFRwp0001:UntestedCode', ...
['This version of the source code is very preliminary, ' ...
'and has not been thoroughly tested. Users should not rely on ' ...
'these calculations.']);
num_nodes = size(adjacency_matrix,1);
in_connections = zeros(num_nodes,1);
out_connections = zeros(num_nodes,1);
in_out_connections = zeros(num_nodes,1);
in_from_other = zeros(num_nodes,1);
out_to_other = zeros(num_nodes,1);
in_out_other = zeros(num_nodes,1);
closeness = zeros(num_nodes,1);
eigenvector_centrality = zeros(num_nodes,1);
for j = 1:num_nodes
in_connections(j) = sum(adjacency_matrix(:,j));
out_connections(j) = sum(adjacency_matrix(j,:));
end
in_out_connections = in_connections + out_connections;
for j=1:num_nodes
% Find the begin index and the end index where node j belongs to
[begin_group end_group] = find_group_node(j,groups, num_nodes);
in_from_other = in_connections(j) - sum(adjacency_matrix( ...
begin_group:end_group, j));
out_to_other = out_connections(j) - sum(adjacency_matrix( ...
j,begin_group:end_group));
end
in_out_other = in_from_other + out_to_other;
for j=1:num_nodes
closeness(j) = calc_closeness(adjacency_matrix, j);
end
[eigenvectors, eigenvalues] = eig(adjacency_matrix);
[vals ind] = sort(diag(eigenvalues))
eigenvector_centrality = eigenvectors(:,ind);
Examples
NOTE: Numbers used in the examples are arbitrary valid values.
They do not necessarily represent a realistic or plausible scenario.
adjacency_matrix = ...
[0, 0, 1, 0, 0;
1, 0, 1, 0, 1;
0, 0, 0, 1, 1;
0, 0, 1, 0, 1;
1, 1, 0, 1, 0];
groups = [2,4];
[in_connections, out_connections, in_out_connections, ...
in_from_other, out_to_other, in_out_other, closeness, ...
eigenvector_centrality] = network_measures(adjacency_matrix, groups);
References