Trading networks and Hodge theory

The problem of analyzing interconnectedness is one of today’s premier challenges in understanding systemic risk. Connections can both stabilize networks and provide pathways for contagion. The central problem in such networks is establishing global behavior from local interactions. Jiang-Lim-Yao-Ye (Jiang et al 2011 Mathematical Programming 127 1 203–244) recently introduced the use of the Hodge decomposition (see Lim 2020 SIAM Review 62 685–715 for a review), a fundamental tool from algebraic geometry, to construct global rankings from local interactions (see Barbarossa et al 2018 (2018 IEEE Data Science Workshop (DSW), IEEE) pp 51–5; Haruna and Fujiki 2016 Frontiers in Neural Circuits 10 77; Jia et al 2019 (Proc. of the XXV ACM SIGKDD International Conf. on Knowledge Discovery & Data Mining, pp 761–71 for other applications). We apply this to a study of financial networks, starting from the Eisenberg-Noe (Eisenberg and Noe 2001 Management Science 47 236–249) setup of liabilities and endowments, and construct a network of defaults. We then use Jiang-Lim-Yao-Ye to construct a global ranking from the defaults, which yields one way of quantifying ‘systemic importance’.


Introduction
The global financial crisis of 2008 highlighted the importance of connectivity in understanding financial stability. Although linkages can diffuse risk, they can also provide pathways for emergent behavior and contagion. Network theory provides insight into how to think about the structure and stability of the financial system.
The financial network is an inherently complex network. It is strongly heterogeneous [1]. As of 2019, there are thirty Global Systemically Important Banks [2], and over 5000 FDIC-insured commercial banks and savings institutions [3]. There is no large-scale statistical regularity over which to coarse-grain the system. Our goal is to provide a data-driven way to rank nodes in a financial network from a standpoint of risk.
measures must be adapted with care in a statistically heterogeneous system [11]. Building on theories of financial contagion, a number of related questions of optimal control of financial networks [12,13] were proposed, particularly in the presence of a central risk manager [14]. See also [15].

Contribution
We study the financial network as a data-driven ranking problem. In particular, we use the Eisenberg-Noe [16] model of clearing to compare counterparties, both locally and globally. Eisenberg and Noe provide a global calculation which combines endowments and liabilities to fairly clear a network and identify defaults. We then apply the methods of Jiang-Lim-Yao-Ye [17] to a network of financial defaults as given by the Eisenberg-Noe clearing mechanism. The insight of [17] is that the Hodge decomposition of algebraic geometry allows one to extract global comparisons from local interactions; this gives an algorithmic way to distinguish between systemic defaults and a local collection of interacting defaults. See Lim [18] for an overview of the role of the Hodge Laplacian in a wide variety of settings. Some applications related to networks include work on learning theory [19,20] and on diffusion processes and community detection [21]; other applications range from video quality [23] to electron microscopy [24].
The results of this paper serve, essentially, as a case study. We have chosen to use a stylized and deterministic mechanism for clearing a network. Firesales [25][26][27] may also occur, and randomness is often intrinsic in those models. Another way to understand contagion is through sensitivity of the Eisenberg-Noe calculations [28,29]. Our model is static, in contrast to [30], and we do not address priorities of claims [31].
We believe that a focus on relative ranking (rather than absolute quantification) of risk provides a useful framework for intrinsically understanding and quantifying how intervention might be targeted towards groups of financial counterparties, rather than individual ones.
Combining [16] and [17] provides a framework that unifies some of the complexities of financial networks. Financial interactions are almost always based on leverage; a small amount of capital is used as collateral for a larger trade. Leverage is intrinsic to Eisenberg-Noe. Secondly, both Eisenberg-Noe and Jiang-Lim-Yao-Ye depend on global calculations which use local interactions as input data.
Our calculation is entirely deterministic. One way to interpret our results is that they capture average values of liabilites, endowments, and defaults. In a followup paper, we will use variational equations to understand the effect of perturbative noise.

Organization
In section 2 we review the Eisenberg-Noe clearing calculations. Section 3 provides an overview of simplicial complexes and the algebro-geometric tool of Hodge theory, applied by Jiang-Lim-Yau-Ye in [17] to ranking questions. In section 4 we combine these two tools, and examine the implications of this formulation on a sample dataset from the Bank of International Settlements.

The Eisenberg-Noe algorithm
We begin with a short review of the Eisenberg If A n <ℓ n , then counterparty n pays its debts proportionally. Define The shortfall in payment from node n to ¢ n is In other words, B, C and D have endowments of $1, while A has an endowment of $3. A has a liability of $10 to B, which in turn has a liability of $10 to C, which in turn has a liability of $10 to A. Additionally, A has a liability of $15 to D, which has no liabilities, as in Here, the first three nodes have defaults to each other, and the 'loop' defaults to the fourth, as in figure 2 and 3. From a network perspective, counterparties A, B, and C might be left to sort things out among themselves and, if necessary, inject capital directly into D 4 ; the default to D is external to this loop, which is somehow more macroscopic. A ranking system which appropriately nets such loops of shortfalls would allow us to identify those counterparties which are global. Quantitatively, the defaults between A, B, and C are 3.33, 4.33, and 5.33; one would expect the difference in rank between A, B, and C to be at most 2. The language of algebraic topology [32] provides a systematic way to formalize this structure.
Example 2.2. We next consider an example with 5 agents, labelled 1 through 5. Assume that we have a liability matrix given by , is the liability of agent n to agent ¢ n ; in other words agent 1 owes $6 to agent 2 (L 1,2 =6). Assume that we also have an endowment vector where E n is the endowment of agent n; for example, agent 1 has endowment $11.      If we were to net these shortfalls, we would combine the shortfall coming into each node with the shortfall going out. We can define an operator d 1 which maps the shortfalls into capital. Namely, δ 1 should map 6

Simplicial complexes and Hodge theory
in other words, perfect loops are in the null space of d 1 . This suggests that linear algebra can be used to extract global information from pairwise comparisons. Let's now look try to think of circular loops of shortfalls a the range of yet another operator. Let [A,B,C] represent a shortfall of $1 from A to B, a shortfall of $1 from B to C, and a shortfall of $1 from C to A (and similarly 5[A,B,C] represents these defaults, but in the amount of $5). Enumerating all of the directions yields = - We can interpret the vector space as the space of (2-dimensional) triangles in the graph, and define the linear operator a a a a and the tools of chain complexes allow us to more precisely decompose V 1 into linear subspaces. In the general setup, these subspaces will allow us to extract a ranking of the counterparties. We can think of [A,B,C] as an abstract object; its only value is that allows us to write circular loops of shortfalls as the range of d 2 .

Simplicial complexes
We can encode the data of example 2.1 using the framework of simplicial complexes. For additional background, see [33].
One example of a choice of orientation is The introduction of orientation is natural in many physical contexts involving network flow. Note that σ 2 and σ 1 are joined at a common vertex [A].
2. An oriented simplicial complex Σ on a vertex set V is a collection of of oriented simplexes such that every element of V is in at least one oriented simplex. The dimension of Σ is the maximum dimension of all simplices contained in Σ.

Homology
With the concept of an oriented simplicial complex in hand, we're ready to set up the machinery that will allow us to distinguish (in certain cases) between objects.
Definition 3.4. A chain complex  is a sequence of vector spaces V i and linear transformations d i : is the ith homology of .
In our case, we have The main idea is to use an oriented simplicial complex to define a chain complex. The key point is to define the boundary map: Next we define a chain complex, where the object V i has a basis consisting of the oriented i-simplices, modulo an equivalence relation t t -  Example 3.6. We carry this out for example 3.3. With the choice of oriented basis above, The first column of the matrix representation of d 2 captures the first line of (3.6). The first column of the matrix representation of d 1 corresponds to . We can write the chain complex A calculation shows that for this example, (3.3) becomes What information do the  H i ( ) encode? An easy exercise shows that  H dim 0 ( ) is the number of connected components of the underlying simplex Σ, and for i>0, the dimension of  H i ( ) is essentially a count of the number of i-dimensional holes in Σ. We close with an example to illustrate this: ( ) ( ), which agrees with the intuition above: a hollow triangle is topologically ;S 1 , which has one connected component and a single one dimensional hole.

Hodge theory and Hodge decomposition
Hodge theory is a fundamental tool used to study a smooth manifold M, and we give a brief sketch of the general theory below (when applied in the context of ranking, the manifold M is replaced, in some sense, with network connectivity). For a smooth manifold M, the chain complex of interest has as the k-th term the sheaf Ω k (M) of differential k-forms on M, with differential d k . In the setting studied by Hodge, the underlying geometry gives additional structure to the problem. This allows a canonical choice of generators for H k (Ω(M)), consisting of harmonic forms; see Voisin [34] for details. We included the background above as a matter of general mathematical interest. In the setting of ranking, we can avoid the heavy machinery, and work in the setting of real vector spaces. This allows us to give an elementary proof of the Hodge decomposition, as in, for example, [22].
Let V,W be finite dimensional real vector spaces, and V W A ⟶ a linear transformation. V and W are inner product spaces, with inner product the familiar dot product. Choose bases so that A is a matrix. The adjoint operator A * is defined via , . * So in this setting, we have , .
be a complex of vector spaces, with rank(V i )=a i . Then . Choose bases so that where 0 represents a zero matrix of the appropriate size. For example, since the matrix d 1 is a 2 ×a 1 =a 2 ×(r 1 +k 1 ), the top right zero in d 1 has r 1 rows and k 1 columns. Then we have that d d T 1 1 and d d The zero in the middle represents a square matrix of size yielding the Hodge decomposition. ,

Hodge theory and ranking
In [17], Jiang-Lim-Yao-Ye introduced the use of Hodge theory in the study of rank aggregation. The idea is as follows: a collection of voters is asked to compare a group of alternatives (paradigm: Netflix problem). Voters need not compare all alternatives, and are not constrained to respect transitivity. In particular, cyclic rankings like a>b>c>d>a are possible. In practice, often there are a myriad of alternatives, but each voter only ranks a few. How can the data be aggregated in a coherent fashion to produce a global ranking? The first step is to consolidate the votes into a weighted directed graph G. A directed graph is an oriented one dimensional simplicial complex Δ G ; an assignment of weights to each edge corresponds to a choice of a linear functional C 1 (Δ G ), hence an element of The fundamental insight of Jiang-Lim-Yao-Ye is that Hodge theory yields a way to rank the data. We paraphrase their main result below.
Theorem 3.1. [17] For a weighted directed graph G, let F G be the two dimensional simplicial complex obtained by filling any triangle whose edges are all in G. Then the decomposition has the following interpretation 1. d im 1* ( )consists of locally inconsistent rankings: rankings v i >v j >v k >v i .

2.
L ker( ) consists of globally inconsistent rankings: rankings v i >v j >v k >L>v i .

3.
d im 0 ( )consists of consistent rankings: rankings with no cycle.
In particular, the consistent ranking which is the best approximation to G is obtained by orthogonal projection onto d im 0 ( ). By duality,d d 0 1 *, and below we work with d 1 *.   Figure 7, the vector b closest to d in the column space of X is simply the projection of d onto the subspace spanned by the columns of X, so is given by the formula

Pictured in
which in the case at hand yields the vector 19,11, 39,12 T Notice that v 4 has net default of 2+4+6=12 and defaults to three different creditors, whereas v 0 has net default of 3+8=11 and defaults to two creditors. Nevertheless, in terms of global ranking, v 0 is of more importance than v 4 . So while the example by and large agrees with our intuition, there are interesting subtleties. An important aspect in assessing the accuracy of the ranking involves the distance between the default vector d and the best approximation b. In the case at hand, |d|;13.4, |b|;13.2, and |d−b|;2.2, so the approximation is reasonably good.
Example 3.10. Consider the system in figure 8, where all agents have endowment $1, and liabilities of $20; note that there are liabilities to and from external counterparties. Applying Eisenberg-Noe, the defaults are as in figure 9.
The Hodge decomposition can be applied to a clearing network to give a global ranking of the nodes inside. To do this, following [17], we build a skew symmetric matrix whose entries reflect the directed edge weights. Thus the default matrix is      ) , which reflects the fact that our network has a loop of length five. In particular, Choosing as a basis for d = X im 0 ( ) the transpose of the first eight rows of d 1 , we find that after scaling Since d= [ The extreme values agree with our intuition-the worst offender at −234 is node 9, and with values 210 and 246, nodes 7 and 8 are owed the most. However, s(2)=32 and s(3)=36. Netting defaults shows that node 2 has a surplus of 21, while node 3 has a surplus of 1, but the Hodge rank of node 3 is greater than that of node 2. This will also occur with real data, as we'll see in the next section.

Application of Hodge Decomposition to Clearing Networks
In this section, we analyze the liability network formed by twenty countries of the EU.
Example 4.1. We close by examining data from [18] 5 ; country codes are given in table 1. Liabilities are given in tables 2-3. Countries in row n have liabilities towards countries in columns ¢ n ; for example Austria has a liability towards Belgium of $3.13B (see table 9B, p. A74 of [18]). The 'endowments' are estimated by combining the balance sheets of monetary financial institutions (MFI's), using that information as a representative of the entire banking sector of a country. The endowments were estimated as the sum of (OA standing for Outstanding Amounts) This is only a test case; we believe that this data is not complete. We might rank the counterparties of tables 2, 3 and 4 by dividing the sum of liabilities by the endowment (note that liabilities are broken into two displays (tables 2 and 3) due to space constraints).
For example, Austria has a total of 211.9 $B, and an endowment of 530.56 $B. Dividing, we get a score of .40. Naively, a higher score means more debt per unit of endowment, and thus more risk. The results are in table 5. 5 Thanks to Alysa Shcherbakova and Kevin Liu for help with this data.  - In the skew-symmetric default matrix, column 6 (EE) defaults to rows {1,2,4,5,7,9,10,11,13,18}; these defaults correspond to the first 10 columns of the d 1 matrix below. The default graph in figure 10 indicates the orientation, from the defaulter to the defaultee. There are several interesting points to make: five countries (CY, FI, IE, LU, MT, corresponding to nodes 3,8,12,14,15) are inactive, in the sense that they default to no other country, and no other country defaults to them.
The corresponding d 1 differential is  Figure 10. Directed defaults.
The rank of the zeroth homology is exactly the number of connected components of our network, so we see that d 1 has rank 14. In particular, when we run the Hodge rank algorithm, there will be only 15 countries to rank. When we rank according to the Liabilities/Endowment ratio as in table 6, the 5 countries which are inactive in terms of default have ranks ranging from 2 (MT) to 16 (FI). On the other hand, when using Hodge rank, as isolated vertices, they are incomparable to the other components, so they do not appear in table 6. The scores below have been translated and rounded off; this is unimportant for ranking.
What is noteworthy about this example is that while the biggest defaulter SK appears at the bottom, and the biggest defaultee AT appears at the top, the expectation might be that since 12 countries have no defaults at all, and 3 countries default in multiple directions, there would be a clear split, with the defaulting countries EE, SL, SK the bottom three in the ranking, and the remaining 12 countries above. We next explore why this is not the case.

Bipartite graphs
The graph in figure 10 is bipartite, with a clear division between defaulters and defaultees. In this section, we consider default graphs that are bipartite. Example 4.2 below seems to confirm the intuition that a bipartite default graph partitioning defaulters and defaultees will have a corresponding split in the Hodge rank. However, example 4.3 shows that this intuition is incorrect, as is also illustrated by the previous example.
Example 4.2. Consider four parties, where node 1 defaults in amount 1 to nodes 3 and 4, and node 2 defaults in amount 10 to nodes 3 and 4, as in Figure 11.  Therefore the default vector is [1,10,1,10]. Computing, we find the Hodge rank vector is [−1, −10, 0, 0], so that the top ranked nodes are nodes 3 and 4, which are defaulted to in the same amount. Node 1 defaults in total amount 2 and is ranked 3, and node 2 defaults in total amount 20, and is ranked last. This is in accordance with our intuition. Example 4.3. Our last example shows that the behavior in the Hodge ranks for example 4.1-that the defaulter EE was ranked more highly than defaultee NL-is not an anomaly. Consider a bipartite default graph, where there are 3 parties which are defaulters, and 3 parties which are defaultees. Node 1 defaults in amounts (2,4) to nodes 4 and 5, node 2 defaults in amounts (8,16) to nodes 5 and 6, and node 3 defaults in amounts (32,64) to nodes 6 and 4, as depicted in Figure 12. Hence, the default matrix is [ ] Therefore, the Hodge rank of the nodes is as in Table 7. Node 1 appears second in the Hodge ranking, and yet is one of the three nodes that defaults! Figure 12. Directed defaults.

Conclusions
In this paper, we have combined the Hodge decomposition introduced in [17] to extract global rankings from local data with the Eisenberg-Noe algorithm for fair clearing of a trading network. The results can be surprising: as illustrated by the Bank of International Settlements [18] data in §4, even when the default graph is bipartite, with counterparties partitioned into distinct sets of defaulters and defaultees, the corresponding Hodge rank may not rank all of the defaulting counterparties below the non-defaulting counterparties.