Multi-Period Liability Clearing via Convex Optimal Control
MMulti-Period Liability Clearingvia Convex Optimal Control
Shane Barratt Stephen BoydMay 20, 2020
Abstract
We consider the problem of determining a sequence of payments among a set ofentities that clear (if possible) the liabilities among them. We formulate this as anoptimal control problem, which is convex when the objective function is, and thereforereadily solved. For this optimal control problem, we give a number of useful andinteresting convex costs and constraints that can be combined in any way for differentapplications. We describe a number of extensions, for example to handle unknownchanges in cash and liabilities, to allow bailouts, to find the minimum time to clear theliabilities, or to minimize the number of non-cleared liabilities, when fully clearing theliabilities is impossible.
Large, complex networks of liabilities are the foundation of modern financial systems. Ac-cording to the FDIC, there were on the order of five thousand FDIC-insured banks in theUnited States at the end of 2019 [Fed19]. Each of these banks owe each other money as aresult of bank transfers, loans, and securities issued. Inter-bank settlement is handled todayby simple payment systems like Fedwire and CHIPS [BH12, § a r X i v : . [ q -f i n . C P ] M a y ach entity to other entities. This formulation has several benefits. First, we can naturallyincorporate the goals and constraints in liability clearing in the stage cost function of ouroptimal control problem. Second, we can efficiently (globally) solve the problem since it isconvex. Third, domain specific languages for convex optimization make it easy to prototypenew liability clearing mechanisms.We also extend our formulation to the case where there are exogenous unknown inputsto the dynamics, which represent uncertain future liabilities or cash flows. We propose asolution method based on model predictive control, or shrinking horizon control, which, ateach time step, predicts the future unknown inputs, plans a sequences of payments, and thenuses just the first of those payments for the next time period. We then illustrate our methodon several simulated numerical examples, comparing to a simple pro-rata payment baseline.At the end of the paper, we discuss extensions and variations of our problem, e.g. , allowingbailouts, finding the minimum time to clear a set of liabilities, non-time-separable costs,infinite time liability control, and how to minimize the number of non-cleared liabilities. Outline. In § § § § § § The liability clearing problem was originally proposed by Eisenberg and Noe in 2001 [EN01].Their formulation involves determining a single set of payments to be made between theentities, in contrast to ours, which assumes a sequence of payments are made. Their for-mulation assumes that these payments can be financed immediately by payments received,whereas we make the realistic financing constraint that entities cannot pay other entitiesmore than the cash they have on hand. (This means that it may take multiple steps to clearliabilities.) In this way, our formulation can be viewed as a supply chain with cash as thecommodity [BV18, § § i.e. ,each entity makes payments proportional to its liabilities to the other entities (we call thisa pro-rata constraint; see § § e.g. , default costs and rescue [RV13], cross-holdings [Els09, § § §
7, The sensitivity of clearing vectors to liabilities has also been analyzed, using implicitdifferentiation [FPR +
18] and the Farkas lemma [KP19]. Using the techniques of differentiableconvex optimization solution maps [AAB + e.g. , [GY15, §
4] for a survey).Eisenberg and Noe’s formulation has also been extended to multiple periods. Capponi andChen proposed a multi-period clearing framework with a lender of last resort ( i.e. , bailouts,see § § In this section we set out our notation, and describe the dynamics equations and constraints.
Entities and cash held.
We consider a financial system with n financial entities or agents,such as banks, which we refer to as entities 1 , . . . , n . These entities make payments to eachother over discrete time periods t = 1 , . . . , T , where T is the time horizon. The time periodscould be any length of time, e.g. , each time period could represent a business day. We let c t ∈ R n + denote the cash held by each of the entities, with ( c t ) i being the amount held byentity i in dollars at time period t . If the entities are banks, then the cash held is the bank’sreserves, i.e. , physical cash and deposits at the central bank. If the entities are individualsor corporations, then the cash held is the amount of deposits at their bank. Liability matrix.
Each entity has liabilities or obligations to the other entities, whichrepresent promised future payments. We represent these liabilities by the liability matrix L t ∈ R n × n + , where, at time period t , ( L t ) ij is the amount in dollars that entity i owes entity j [EN01, § L t ) ii = 0, i.e. , the entities do not owe anything tothemselves. Note that L t ∈ R n + is the vector of total liabilities of the entities, i.e. , ( L t ) i isthe total amount that entity i owes the other entities, in time period t , where is the vector3ith all entries one. Similarly, L Tt ∈ R n + is the vector of total amounts owed to the entitiesby others, i.e. , ( L Tt ) i is the total amount owed to entity i by the others. The net liability of the entities at time period t is L t − L Tt , i.e. , ( L t − L Tt ) i is the net liability of entity i .When ( L t ) ij = 0, we say that the liability between entity i and j is cleared (in time period t ). The scalar quantity T L t is the total gross liability between all the entities. When it iszero, which occurs only when L t = 0, all liabilities between the entities have been cleared. Payment matrix.
At each time step, each entity makes cash payments to other entities.We represent these payments by the payment matrix P t ∈ R n × n + , t = 1 , . . . , T −
1, where( P t ) ij is the amount in dollars that entity i pays entity j in time period t . We assumethat ( P t ) ii = 0, i.e. , entities do not pay themselves. Thus P t ∈ R n + is the vector of totalpayments made by the entities to others in time period t , i.e. , ( P t ) i is the total cash paidby entity i to the others. The vector P Tt ∈ R n + is the vector of total payments received bythe entities from others in time period t , i.e. , ( P Tt ) i is the total payment received by entity i from the others. Each entity can pay others no more than the cash that it has on hand, sowe have the constraint P t ≤ c t , t = 1 , . . . , T − , (1)where the inequality is meant elementwise. Dynamics.
The liability and cash follow the linear dynamics L t +1 = L t − P t , t = 1 , . . . , T − , (2) c t +1 = c t − P t + P Tt , t = 1 , . . . , T − . (3)The first equation says that the liability is reduced by the payments made, and the secondsays that the cash is reduced by the total payments and increased by the total paymentsreceived.These dynamics can be extended to include an interest rate for cash, as well as additionalcash flows into and out of the entities, and additional liabilities among the entities. Forsimplicity, we continue with the simple dynamics (2) and (3) above, and describe some ofthese extensions in § Monotonicity of liabilities.
Since L t ≥
0, these dynamics imply that P t ≤ L t , t = 1 , . . . , T − , (4) i.e. , each entity cannot pay another entity more than its liability. We also observe that L t +1 ≤ L t , t = 1 , . . . , T − , (5)where the inequality is elementwise, which means that each liability is non-increasing intime. We conclude that if the liability of entity i to entity j is cleared in time period t , it willremain cleared for all future time periods. In other words, the sparsity pattern ( i.e. , whichentries are nonzero) of L t can only not increase over time. The inequality (4) implies thatonce a liability between entries has cleared, no further payments will be made. This tells usthat the sparsity patterns of P t and L t are no larger than the sparsity pattern of L .4 et worth. The net worth of each entity at the beginning of time period t is the cash itholds minus the total amount it owes others, plus the total amount owed to it by others, or w t = c t − L t + L Tt , where w t ∈ R n + is the vector of net worth of the entities. (The second and third terms arethe negative net liability.) The net worth is an invariant under the dynamics, since w t +1 = c t +1 − L t +1 + L Tt +1 , = c t − P t + P Tt − ( L t − P t ) + ( L t − P t ) T , = c t − L t + L Tt , = w t . Default.
If ( w ) i < i.e. , the initial net worth of entity i is negative, then it will have todefault; it cannot reduce its net liability to zero. If an entity defaults, then it will find itselfunable to fully pay the entities it owes money to, which might cause those entities to defaultas well. Such a situation is called a default cascade [EN01, § Graph interpretation.
The liabilities between the entities can be interpreted as a weighteddirected graph, where the nodes represent the entities, and the directed edges represent li-abilities between entities, with weights given by the liabilities. In this interpretation, theliability matrix is simply the weighted adjacency matrix.
Liability cycle removal.
Some of the liabilities between entities can be reduced or re-moved without the need to make payments between them. This happens when there areone or more liability cycles . A liability cycle is a cycle in the graph described above, or asequence of positive liabilities that starts and ends at the same entity and does not visitan entity more than once. If there is a liability cycle, then each liability in the cycle canbe reduced by the smallest liability present in the cycle, which reduces at least one of theliabilities in the cycle to zero (which therefore breaks the cycle). Removing a liability cyclein this manner keeps the net liabilities of each entity, L t − L Tt , constant. The simplestcase occurs with a cycle of length two: If ( L t ) ij and ( L t ) ji are both positive, i.e. , entities i and j each owe the other some positive amount, then we can replace these liabilities with( L t ) ij − min { ( L t ) ij , ( L t ) ji } , ( L t ) ji − min { ( L t ) ij , ( L t ) ji } , which will reduce one of the two liabilities (the one that was originally smaller) to zero.Given a liability matrix L , we give two ways to remove liability cycles, a greedy algorithmand a formulation of the problem as a linear program. This problem is referred to in theliterature as portfolio compression [DR17, SS19, Ver19] and payment netting [Sha78, O’K14,O’K17]. 5 reedy cycle clearing algorithm. The greedy cycle clearing algorithm begins by search-ing for a liability cycle, which can be done using a topological sort [Kah62]. If there are noliability cycles, the algorithm terminates. On the other hand, if there is a liability cycle, thealgorithm reduces each liability in the cycle by the smallest liability present in the cycle,thus removing the cycle. This process is repeated until there are no more liability cycles.This algorithm was first proposed in 2009 in a patent filed by TriOptima [Bro09], a portfoliocompression company owned by the CME group that has reported clearing over 1000 trilliondollars of liabilities through 2017.
Optimal cycle clearing via linear programming.
The greedy algorithm describedabove can be improved upon if our goal is not to just remove cycles, but also to remove asmuch total gross liability as possible. The problem is to find a new liability matrix ˜ L ≤ L with the smallest total gross liability, subject to the constraint that the net liabilities remainsthe same. This can be accomplished by solving the linear programminimize T ˜ L subject to L − L T = ˜ L − ˜ L T , ≤ ˜ L ≤ L. (6)with variable ˜ L .To the best knowledge of the authors, the linear programming formulation of this problemwas first proposed by Shapiro in 1978 [Sha78]. In his formulation, he incorporated transactioncosts by making the objective Tr ( C T ( L − ˜ L )) for a given transaction cost matrix C ∈ R n × n + .Other objectives are possible, e.g. , the sum of the squared liabilities [O’K14, § L t would contain no cycles for t = 1 , . . . , T .We note however that the methods described in this paper work regardless of whether thereare cycles, or whether liability cycle removal has been carried out; that is, liability cycleremoval is optional for the methods described in this paper. We now formulate the problem of finding a suitable sequence of payments that clear (or atleast reduce) the liabilities among the entities as a convex optimal control problem. Given aninitial liability matrix L init and cash c init , the liability control problem is to choose a sequenceof payments P , . . . , P T − so as to minimize a sum of stage costs, T − (cid:88) t =1 g t ( c t , L t , P t ) + g T ( c T , L T ) , (7)6here the function g t : R n + × R n × n + × R n × n + → R ∪ { + ∞} is the (possibly time-varying) stagecost, and g T : R n + × R n × n + → R ∪ { + ∞} is the terminal stage cost.Infinite values of the stage cost g t (or g T ) are used to express constraints on c t , L t , or P t .To impose the constraint ( c t , L t , P t ) ∈ C t , we define g t ( c t , L t , P t ) = + ∞ for ( c t , L t , P t ) (cid:54)∈ C t .As a simple example, the final stage cost g T ( c T , L T ) = (cid:26) L T = 0 , ∞ L T (cid:54) = 0 , imposes the constraint that the sequence of payments must result in all liabilities clearedat the end of the time horizon. Here g T is the indicator function of the constraint L T = 0.(The indicator function of a constraint has the value 0 when the constraint is satisfied, and+ ∞ when it is violated.)The liability control problem has the formminimize (cid:80) T − t =1 g t ( c t , L t , P t ) + g T ( c T , L T )subject to L t +1 = L t − P t , t = 1 , . . . , T − ,c t +1 = c t − P t + P Tt , t = 1 , . . . , T − ,P t ≤ c t , t = 1 , . . . , T − ,P t ≥ , t = 1 , . . . , T − ,L t ≥ , t = 1 , . . . , T,c = c init , L = L init , c T ≥ , (8)with variables c t , L t , t = 1 , . . . , T , and P t , t = 1 , . . . , T −
1. (The constraint c t ≥ P t ≤ c t .) We refer to this as the liability clearing control problem . It is specified by thestage cost functions g , . . . , g T , the initial liability matrix L init , and the initial cash vector c init . We observe that the last four sets of inequality constraints could be absorbed into thestage cost functions g t and g T ; for clarity we include them in (8) explicitly. Convexity.
We will make the assumption that the stage cost functions g t and g T areconvex, which implies that the liability control problem (8) is a convex optimization prob-lem [BV04]. This implies that it can be (globally) solved efficiently, even at large scale; thisis discussed further in § § In this section we describe some examples of useful constraints, which can be combined witheach other or any of the cost functions described below. They are all convex.7 iability clearance.
We can constrain the liabilities to be fully cleared at time T withthe constraint L T = 0 . If w (cid:54)≥ Pro-rata constraint.
The proportional liability of each entity is the proportion of itstotal liability that it owes to the other entities, which for entity i is ( L t ) i / ( L t ) i . We canconstrain the final proportional liability of each entity to be equal to the initial proportionalliability with the linear constraint diag ( L ) L T = diag ( L T ) L , where diag ( x ) is the diagonal matrix with x on its diagonal. This constraint also holds if L T = 0, i.e. , the sequence of payments clears all liabilities. Cash minimums.
Cash minimums, represented by the vector c min ∈ R n + , where ( c min ) i isthe minimum cash that the entity i is allowed to hold, can be enforced with the constraint c t ≥ c min , t = 1 , . . . , T. Cash minimums can arise for a number of reasons, one of them being reserve requirementsfor banks [Boa20].
Payment maximums.
We can constrain the payment between entities to be below somemaximum payment P max ∈ R n × n + , where ( P max ) ij is the maximum allowable payment fromentity i to entity j , with the constraint P t ≤ P max , t = 1 , . . . , T − . We can impose a limit on how much cash each entity uses for payments with the constraint P t ≤ βc t , t = 1 , . . . , T − , where 0 < β ≤ Payment deadlines.
Deadlines on payments are represented by the setΩ ⊆ { , . . . , T } × { , . . . , n } × { , . . . , n } . If ( t, i, j ) ∈ Ω, we require that the liability between entities i and j becomes zero at time t .This results in the constraints ( L t ) ij = 0 for all ( t, i, j ) ∈ Ω.8 rogress milestones.
We can impose the constraint that the liabilities are reduced bythe fraction η ∈ (0 ,
1) in τ time periods, with L τ ≤ ηL . In this section we list some interesting and useful convex stage costs. We note that anycombination of the constraints above can be included with any combination of the costslisted below, by adding their indicator functions to the cost.
Weighted total gross liability.
A simple and useful stage cost is a weighted total grossliability, g t ( c t , L t , P t ) = Tr ( C T L t ) = n (cid:88) i =1 n (cid:88) j =1 C ij ( L t ) ij , (9)where the matrix C ∈ R n × n + represents the (marginal) cost of each liability. When C = T ( i.e. , C ij = 1 for all i and j ), this stage cost is simply the total gross liability T L t at time t .When C is not the all ones matrix, it encourages reducing liabilities L ij with higher weights C ij . Total squared gross payment.
Another simple and useful stage cost is the total squaredgross payment, g t ( c t , L t , P t ) = Tr ( D T P t ) = n (cid:88) i =1 n (cid:88) j =1 D ij ( P t ) ij , where D ∈ R n × n + represents the cost of each squared payment, and the square is takenelementwise. This stage cost is meant to reduce the size of payments made between entities.As a result of the super-linearity of the square function, it is more sensitive to large paymentsbetween the entities than smaller ones. In control terms, the sum of squared payments is our control effort , which we would like to be small. It is a traditional term in optimal control. Distance from cash to net worth.
If the liability is cleared, i.e. , L t = 0, then the cashheld by each entity will be equal to its net worth, or c t = w t . We can penalize the distancefrom the cash held by each entity to its net worth with, e.g. , the cost function g t ( c t , L t , P t ) = (cid:107) c t − w (cid:107) . If we want to make c t exactly equal to w in as many entries as possible as quickly as possible,we can replace the cost above with the (cid:96) norm (cid:107) c t − w (cid:107) . Time-weighted stage cost.
Any of these stage costs can be time-weighted. That is, ifthe stage cost is time-invariant, i.e. , g t = g for some stage cost g , the time-weighted stagecost is g t ( c t , L t , P t ) = γ t − g ( c t , L t , P t ) , γ >
0. For γ >
1, this stage cost preferentially rewards the stage cost being decreasedlater ( i.e. , for large t ); for γ <
1, it represents a traditional discount factor, which preferen-tially rewards the stage cost being decreased earlier ( i.e. , for small t ). With γ = 1, we treatstage costs at different time periods the same. Since problem (8) is a convex optimization problem, it can be solved efficiently [BV04], evenfor very large problem sizes. The number of variables and constraints in the problem is on theorder
T n . However, this convex optimization problem is often very sparse. The inequalities(4) and (5) imply that L t and P t can only have nonzero entries where L init does. This meansthat the number of variables can be reduced to order T nnz ( L init ) variables, where nnz ( L init )is the number of nonzero entries in the initial liability matrix. (In appendix A, we give analternative formulation of the liability clearing control problem that exploits this sparsitypreserving property.) Due to the block-banded nature of the optimal control problem, thecomputational complexity grows linearly in T ; see, e.g. , [BV04, § A.3].As a practical matter, we can easily solve the liability clearing problem with n = 1000entities, nnz ( L init ) = 5000, and T = 20, using generic methods running on an Intel i7-8700KCPU, in under a minute. Small problems, with say n = 10 entities, nnz ( L init ) = 30, and T = 20 can be solved in under a millisecond, using techniques of code generation such asCVXGEN [MB09, MB12].It is very easy to express the liability clearing control problem using domain specificlanguages for convex optimization, such as CVX [GB08, GB14], YALMIP [Lof04], CVXPY[DB16, AVDB18], Convex.jl [UMZ + We describe here a simple and intuitive scheme for determining cash payments P , . . . , P T − .We will use this as a baseline method to compare against the optimal control method de-scribed above.The payment P t is determined as follows. At each time step, each entity pays as muchas possible pro-rata, i.e. , in proportion to how much it owes the other entities, up to itsliability. Define the liability proportion matrix asΠ = diag (1 / ( L init )) L init , so (Π) ij is the fraction of entity i ’s total liability that it owes to entity j . The pro-ratabaseline has the form P t = min( diag ( c t )Π , L t ) , (10)where min is taken elementwise. We will see that the (seemingly sensible) pro-rata baselineis not an efficient strategy for optimally clearing liabilities.10 Liability control with exogenous unknown inputs
In this section we extend the optimal control formulation in § + +
07, BAS10], andenergy management [MBH +
11, SWBB11, MBBW19]. It has been observed to work welleven when the forecasts are not particularly good [WB09, § We replace the dynamics equations (2) and (3) with L t +1 = L t − P t + W t , t = 1 , . . . , T − , (11) c t +1 = c t − P t + P Tt + w t , t = 1 , . . . , T − , (12)where W t ∈ R n × n is the liability adjustment at time t , and w t ∈ R n is the exogenous cashflow at time t . The liability adjustment W t can originate from entities creating new liabilityagreements; the cash flow w t can originate from payments received or made by an entity,unrelated to clearing liabilities. The terms W t and w t are exogenous inputs in our dynamics, i.e. , additional terms that affect the liabilities and cash, but are outside our control (at least,for the problem of clearing liabilities). The cash on hand constraint (1) is modified to be P t ≤ c t + w t , t = 1 , . . . , T − , (13)where c t + w t is the cash on hand after the exogenous cash flow.When the exogenous inputs are known (which might occur, for example, when all theexogenous cash flows and liability updates are planned or scheduled), we obtain a straight-forward generalization of the liability clearing control problem,minimize (cid:80) T − t =1 g t ( c t , L t , P t ) + g T ( c T , L T )subject to L t +1 = L t − P t + W t , t = 1 , . . . , T − ,c t +1 = c t − P t + P Tt + w t , t = 1 , . . . , T − ,P t ≤ c t + w t , t = 1 , . . . , T − ,P t ≥ , t = 1 , . . . , T − ,c t ≥ , L t ≥ , t = 1 , . . . , T,c = c init , L = L init , (14)with variables c t , L t , and P t . 11 .2 Optimal control with unknown exogenous inputs We now consider a more common case, where w t and W t are not known, or not fully known,when the sequence of payments is chosen. It would be impossible to choose the paymentin time period t without knowing w t ; otherwise we cannot be sure to satisfy (13). For thisreason we assume that W t and w t are known at time period t , and therefore can be usedwhen we choose the payment P t . (An alternative interpretation is that the exogenous casharrives before we make payments in period t .) Thus at time period t , when P t is chosen, weassume that w , . . . , w t and W , . . . , W t are all known. Forecasts.
At time period t , we do not know w t +1 , . . . , w T − or W t +1 , . . . , W T − . Insteadwe use forecasts of these quantities, which we denote byˆ w τ | t , ˆ W τ | t , τ = t + 1 , . . . , T − . We interpret the subscript τ | t as meaning our forecast of the quantity at time period τ ,made at time period t . These forecasts can range from sophisticated ones based on machinelearning to very simple ones, like ˆ w τ | t = 0, ˆ W τ | t = 0, i.e. , we predict that there will be nofuture adjustments to the cash or liabilities. We will take ˆ w τ | t = w τ and ˆ W τ | t = W τ for τ ≤ t ; that is, our ‘forecasts’ for the current and earlier times are simply the values thatwere observed. Shrinking horizon policy.
We now describe a common heuristic for choosing P t at timeperiod t , called MPC. The idea is very simple: we solve the problem (14), over the remaininghorizon from time periods t to T , replacing the unknown quantities with forecasts. That is,we solve the problemminimize (cid:80) T − τ = t g τ ( c τ , L τ , P τ ) + g T ( c T , L T )subject to L τ +1 = L τ − P τ + ˆ W τ | t , τ = t, . . . , T − ,c τ +1 = c τ − P τ + P Tτ + ˆ w τ | t , τ = t, . . . , T − ,P τ ≤ c τ + w τ , τ = t, . . . , T − ,P τ ≥ , τ = t, . . . , T − ,c τ ≥ , L τ ≥ , τ = t, . . . , T, (15)with variables c t +1 , . . . , c T , L t +1 , . . . , L T , and P t , . . . , P T − . In (15), c t and L t are known;they are not variables, and we take ˆ W t | t = W t and ˆ w t | t = w t , which are known. We caninterpret the solution of (15) as a plan of action from time period t to T .We choose P t as the value of P t that is a solution of (15). Thus, at time period t we plan a sequence of payments (by solving (15)); then we act by actually making the payments inthe first step of our plan. MPC has been observed to perform well in many applications,even when the forecasts are not particularly good, or simplistic ( e.g. , zero).12 ro-rata baseline policy. We observe that the pro-rata baseline payments (10) are read-ily extended to the case when we have exogenous inputs, with w t and W t known at timeperiod t . First, we define the liability proportion matrix at time t asΠ t = diag (1 /L run t ) L run t , where L run t = L init + (cid:80) tτ =1 W τ is the running sum of liabilities. The pro-rata baseline policythen has the form P t = min( diag ( c t + w t )Π t , L t + W t ) . (16) The code for all of these examples has been made available online at . We use CVXPY [DB16, AVDB18] to formulate the problems and solve them with MOSEK[aps20].
Initial liability matrix.
We use the same initial liability matrix L init for each example,with n = 200 entities. We choose the sparsity pattern of L init as 2000 random off-diagonalentries (so on average, each entity has an initial liability to 10 others). The nonzero entriesof L init are then sampled independently from a standard log-normal distribution. While wereport results below for this one problem instance, numerical experiments with a wide varietyof other instances show that the results are qualitatively similar. We note that our exampleis purely illustrative, and that further experimentation needs to be performed on probleminstances that bear more structural similarity to real world financial networks [BEST04]. We consider the problem of clearing liabilities over T = 10 time steps, i.e. , we have theconstraint that the final liabilities are cleared, L T = 0. We set the initial cash to theminimum nonnegative cash required so each entity has nonnegative net worth, or c init = max( L init − ( L init ) T , , where max is meant elementwise. Total gross liability.
The first stage cost function we consider is g t ( c t , L t , P t ) = T L t , the total gross liability at each time t . We compare the solution to the liability controlproblem (8) using this stage cost function with the pro-rata baseline method described in § t = 5, while the baseline clears them by t = 8.13 t T L t optimalbaseline (a) Total gross liability. t nn z ( L t ) optimalbaseline (b) Number of non-cleared liabilities. Figure 1: Minimizing the sum of total gross liabilities. The solid line is the optimal paymentschedule. The dashed line is the pro-rata baseline method. t T L t r optimalbaseline (a) Risk-weighted liability. t nn z ( L t ) optimalbaseline (b) Number of non-cleared liabilities. Figure 2: Minimizing the sum of risk-weighted liabilities. The solid line is the optimalpayment schedule. The dashed line is the pro-rata baseline method.
Risk-weighted liability.
Suppose we believe that the risk of each entity is proportionalto r = exp( − w ), where exp is taken elementwise, i.e. , higher net worth implies lower risk.A reasonable stage cost function is then risk-weighted liability g t ( c t , L t , P t ) = T L t r. This stage cost encourages clearing the liabilities for high risk entities before low risk entities.We compare the solution to the liability control problem (8) using this stage cost functionwith the pro-rata baseline method in § t = 5, but the liabilities are much sparser,since the liabilities of high risk entities are cleared before those of low risk entities. We alsonote that the optimal payment sequence is much faster at reducing risk than the baseline.14 t T L t λ = 0 λ = 1 λ = 10 λ = 100 (a) Total gross liability. t T P t λ = 0 λ = 1 λ = 10 λ = 100 (b) Total squared gross payment. Figure 3: Minimizing the sum of total gross liability plus total squared gross payment forvarious values of λ . t T L t optimalbaseline (a) Total gross liability. t nn z ( L t ) optimalbaseline (b) Number of non-cleared liabilities. Figure 4: Liability reduction example.
Total squared gross payment.
To the total gross liability stage cost above, we add thetotal squared payments, resulting in the stage cost g t ( c t , L t , P t ) = T L t + λ T P t , where λ > L T = 0.) We plot the optimal total gross liability and the total squared grosspayment for various values of λ in figure 3. (We do not compare to the pro-rata baselinebecause it does not seek to make payments small.) Suppose that some entities have negative initial net worth. This means that we will not beable to clear all of the liabilities; our goal is then to reduce the liabilities as much as possible,subject to the pro-rata constraint diag ( L init ) L T = diag ( L T ) L init . We consider the same15 t T L t MPCbaseline
Figure 5: Liability control with exogenous inputs.liability matrix as § c = max( L init − ( L init ) T + z, , z i ∼ U ( − , , i = 1 , . . . , n, (17)where U ( − ,
5) is the uniform distribution on [ − , g t ( c t , L t , P t ) = (cid:40) T L t P t ≤ c t / , + ∞ otherwise , g T ( c T , L T ) = T L T . The stage cost is the total gross liability, plus the indicator function of the constraint thateach entity pays out no more than half of its available cash in each time period. We adjustthe pro-rata baseline to P t = min( diag ( c t / , L t ) , so that each entity pays no more than half its available cash, and increase the time horizonto T = 20. The results are displayed in figure 4. The optimal scheme is able to reduce theliabilities faster than the baseline; both methods clear all but around 350 of the original 2000liabilities. (In § Next we consider the case where there are exogenous unknown inputs to the dynamics. Thecash flows and change in liabilities are sampled according to w t = z , ( W t ) ij = (cid:40) z /
10 ( L init ) ij > , , t = 1 , . . . , T − , z ) ∼ N (0 , I ) and log( z ) ∼ N (0 , t , we use the mean of thefuture inputs as the forecast, orˆ w τ | t = e / , ˆ W τ | t = (cid:40) e / /
10 ( L init ) ij > , , τ = t + 1 , . . . , T − . We sample the initial cash vector according to c = max( L init − ( L init ) T + z, , z i ∼ U ( − , , i = 1 , . . . , n. We use the stage cost function g t ( c t , L t , P t ) = T L t and the MPC policy described in § § In this section we mention some extensions and variations on the formulations describedabove.
We can add an additional term to the dynamics that injects cash into the entities at varioustimes, with presumably very high cost in the objective. With a linear objective term withsufficiently high weight, the bailout cash injections are zero, if it is possible to clear theliabilities without cash injection. We note that bailouts have been considered in [CC15, § Instead of the time-separable cost function given in (8), we take as the objective the numberof steps needed to clear all liabilities. That is, our objective is T clr , defined as the minimumvalue of t for which L t = 0 is feasible. It is easily shown that T clr is a quasi-convex functionof the liability sequence L , . . . , L T [BV04, § T convex problems. If the liabilities cannot be clearedin up to T steps then we can find a T such that they can be cleared using the techniquesdescribed in [AB20, § The cost function in our basic formulation (8) is separable, i.e. , a sum of terms for each t = 1 , . . . , T . This can be extended to include non-separable cost functions. We describe afew of these below. They are convex, but non-convex versions of the same objectives canalso be employed, at the cost of computational efficiency to solve the problem globally.17 mooth payments. Adding the term (cid:80) T − t =2 (cid:107) P t − P t − (cid:107) F to the cost, where (cid:107) A (cid:107) F is theFrobenius norm, i.e. , the square root of the sum of the squared entries of A , causes smoothtransitions in the payment matrix. This cost is sometimes called the Dirichlet energy [BV18, § Piecewise constant payments.
Adding the term (cid:80) T − t =2 (cid:107) P t − P t − (cid:107) , where (cid:107) A (cid:107) is thesum of absolute values of the entries of A , to the cost encourages the payment matrix tochange in as few entries as possible between time steps. This cost is sometimes called thetotal variation penalty [ROF92]. Global payment restructuring.
Adding the term (cid:80) T − t =2 (cid:107) P t − P t − (cid:107) F to the cost en-courages the entire payment matrix to change at as few time steps as possible [DWW14]. Per-entity payment restructuring.
Adding the term (cid:80) T − t =2 (cid:80) ni =1 (cid:107) P Tt e i − P Tt − e i (cid:107) , where e i is the i th unit vector, to the cost encourages the rows of the payment matrix, i.e. , thepayments made by each entity, to change at as few time steps as possible. This penalty issometimes called a group lasso penalty [YL06]. In § t , we solve for a sequence of payments P t , . . . , P T − over the remaining horizon; the numberof payments we optimize over ( i.e. , T − t ) shrinks as t increases. This formulation assumesthere is a fixed horizon T .It is also possible to consider a formulation with no fixed horizon T ; the liability clearingis done over periods t = 1 , , . . . without end. The exogenous inputs w t and W t also con-tinue without end. Since we have exogenous inputs, we will generally not be able to clearthe liabilities; our goal is only to keep the liabilities small, while making if possible smallpayments. In this case we have a traditional infinite horizon control or regulator problem.In economics terms, this is an equilibrium payment scheme.The MPC formulation is readily extended to this case, and is sometimes called recedinghorizon control (RHC), since we are always planning out T steps from the current time t . It is common to add a clearing constraint at the horizon in infinite time MPC or RHCformulations [RM09, § Another reasonable objective to consider is the number of non-cleared ( i.e. , remaining)liabilities. In this case, the only cost is the number of nonzero entries in L T . This problemis non-convex, but it can be readily formulated as a mixed-integer convex program (MICP),and solved, albeit slowly, using standard MICP techniques such as branch-and-bound [LD60].18t can also be approximately solved much quicker using heuristics, such as iterative weighted (cid:96) -minimization [CWB08].As a numerical example, we consider a smaller version of the initial liability matrix usedin §
6, with n = 40 and 400 nonzero initial liabilities. We sample the initial cash accordingto (17), so that the liabilities cannot be fully cleared, and use a time horizon T = 10.Minimizing the sum of total gross liabilities takes 0.05 seconds, resulting in 46 non-clearedliabilities and a final total gross liability of 22.52. By contrast, minimizing the number ofnon-cleared liabilities takes 22.93 seconds, resulting in only 10 non-cleared liabilities and afinal total gross liability of 29.78. (The increase in computation time of a mixed-integerconvex optimal control problem, compared to a convex optimal control problem of the samesize, increases rapidly with problem size.)As an extension of minimizing the number of non-cleared liabilities, we can considerminimizing the number of non-cleared entities. If the i th row of L t is zero, it means thatentity i does not owe anything to the others, and we say this entity is cleared. We caneasily add the number of non-cleared entities to our stage cost, using a mixed-integer convexformulation. As stated, the liability control problem (8) requires global coordination, i.e. , full knowledge ofthe cash held and the liabilities between the entities throughout the optimization procedure.In many settings where cash, liabilities, or payments cannot be publicly disclosed, this is notpossible.It is possible to solve the liability control problem in a distributed manner where eachentity only knows its cash and the payments and liabilities it is involved in during theoptimization procedure. That is, entity i only needs to know ( c t ) i , the i th row and columnof L t , and the i th row and column of P t .We can do this by adding a variable ˜ P t ∈ R n × n + , the constraint ˜ P t = P Tt , t = 1 , . . . , T ,and replacing the cash dynamics (3) with c t +1 = c t − P t + ˜ P t , t = 1 , . . . , T − . Then, by applying the alternating direction method of multipliers (ADMM) to the splitting( c t , L t , P t ) and ˜ P t , we arrive at a distributed algorithm for the problem [BPC + +
11, Appendix A]. Each step of thealgorithm only requires coordination between entities connected in the liability graph, andhence preserves some level of privacy. Similar ideas have been used to develop distributedprivacy-preserving implementations of predictive patient models across hospitals [JDVS + cknowledgements The authors would like to thank Zachary Feinstein for his helpful discussion and comments, inparticular for providing many useful references and coming up with the idea of a distributedimplementation. The authors would also like to thank Daniel Saedi for general discussionsabout banking. Shane Barratt is supported by the National Science Foundation GraduateResearch Fellowship under Grant No. DGE-1656518.20 eferences [AAB +
19] Akshay Agrawal, Brandon Amos, Shane Barratt, Stephen Boyd, Steven Dia-mond, and J Zico Kolter. Differentiable convex optimization layers. In
Advancesin Neural Information Processing Systems , pages 9558–9570, 2019.[AB20] Akshay Agrawal and Stephen Boyd. Disciplined quasiconvex programming.
Op-timization Letters , pages 1–15, 2020.[AG00] Franklin Allen and Douglas Gale. Financial contagion.
Journal of PoliticalEconomy , 108(1):1–33, 2000.[aps20] MOSEK optimization suite. , 2020.[AVDB18] Akshay Agrawal, Robin Verschueren, Steven Diamond, and Stephen Boyd. Arewriting system for convex optimization problems.
Journal of Control and De-cision , 5(1):42–60, 2018.[BAS10] Lars Blackmore, Beh¸cet A¸cikme¸se, and Daniel Scharf. Minimum-landing-errorpowered-descent guidance for Mars landing using convex optimization.
Journalof Guidance, Control, and Dynamics , 33(4):1161–1171, 2010.[BBD +
17] Stephen Boyd, Enzo Busseti, Steven Diamond, Ronald Kahn, Kwangmoo Koh,Peter Nystrup, and Jan Speth. Multi-period trading via convex optimization.
Foundations and Trends R (cid:13) in Optimization , 3(1):1–76, 2017.[BBF18] Tathagata Banerjee, Alex Bernstein, and Zachary Feinstein. Dynamic clearingand contagion in financial networks. arXiv preprint arXiv:1801.02091 , 2018.[Bem06] Alberto Bemporad. Model predictive control design: New trends and tools. In IEEE Conference on Decision and Control , pages 6678–6683, 2006.[BEST04] Michael Boss, Helmut Elsinger, Martin Summer, and Stefan Thurner. Networktopology of the interbank market.
Quantitative Finance , 4(6):677–684, 2004.[BF19] Tathagata Banerjee and Zachary Feinstein. Impact of contingent payments onsystemic risk in financial networks.
Mathematics and Financial Economics ,13(4):617–636, 2019.[BFVY19] Marco Bardoscia, Gerardo Ferrara, Nicholas Vause, and Michael Yoganayagam.Full payment algorithm.
Available at SSRN , 2019.[BH12] Geert Bekaert and Robert Hodrick.
International Financial Management . Pear-son Education, 2 edition, 2012.[BLM90] Jan Biemond, Reginald Lagendijk, and Russell Mersereau. Iterative methods forimage deblurring.
Proceedings of the IEEE , 78(5):856–883, 1990.21Boa20] Board of Governors of the Federal Reserve System. Reserve requirements. , March 2020.[BPC +
11] Stephen Boyd, Neal Parikh, Eric Chu, Borja Peleato, Jonathan Eckstein, et al.Distributed optimization and statistical learning via the alternating directionmethod of multipliers.
Foundations and Trends R (cid:13) in Machine learning , 3(1):1–122, 2011.[Bro09] Derk Brouwer. System and method of implementing massive early terminationsof long term financial contracts, 2009. US Patent 7,613,649.[BV04] Stephen Boyd and Lieven Vandenberghe. Convex Optimization . CambridgeUniversity Press, 2004.[BV18] Stephen Boyd and Lieven Vandenberghe.
Introduction to Applied Linear Algebra:Vectors, Matrices, and Least Squares . Cambridge University Press, 2018.[CC15] Agostino Capponi and Peng-Chu Chen. Systemic risk mitigation in financialnetworks.
Journal of Economic Dynamics and Control , 58:152–166, 2015.[CFS05] Rodrigo Cifuentes, Gianluigi Ferrucci, and Hyun Song Shin. Liquidity risk andcontagion.
Journal of the European Economic Association , 3(2-3):556–566, 2005.[CTHK03] Eunkyoung Cho, Kristin Thoney, Thom Hodgson, and Russell King. Supplychain planning: Rolling horizon scheduling of multi-factory supply chains. In
Proc. Conference on Winter Simulation: Driving Innovation , pages 1409–1416,2003.[CWB08] Emmanuel Candes, Michael Wakin, and Stephen Boyd. Enhancing sparsity byreweighted (cid:96) minimization. Journal of Fourier Analysis and Applications , 14(5-6):877–905, 2008.[DB16] Steven Diamond and Stephen Boyd. CVXPY: A Python-embedded model-ing language for convex optimization.
Journal of Machine Learning Research ,17(83):1–5, 2016.[DD83] Douglas Diamond and Philip Dybvig. Bank runs, deposit insurance, and liquid-ity.
Journal of Political Economy , 91(3):401–419, 1983.[DR17] Marco D’Errico and Tarik Roukny. Compressing over-the-counter markets. Tech-nical report, European Systemic Risk Board, 2017.[DWW14] Patrick Danaher, Pei Wang, and Daniela Witten. The joint graphical lassofor inverse covariance estimation across multiple classes.
Journal of the RoyalStatistical Society: Series B (Statistical Methodology) , 76(2):373–397, 2014.22Els09] Helmut Elsinger. Financial networks, cross holdings, and limited liability.
Work-ing Papers, Oesterreichische Nationalbank (Austrian Central Bank) , (156), 2009.[EN01] Larry Eisenberg and Thomas Noe. Systemic risk in financial systems.
Manage-ment Science , 47(2):236–249, 2001.[FBA +
07] Paolo Falcone, Francesco Borrelli, Jahan Asgari, Hongtei Tseng, and DavorHrovat. Predictive active steering control for autonomous vehicle systems.
IEEETransactions on Control Systems Technology , 15(3):566–580, 2007.[Fed19] Federal Deposit Insurance Corporation. Statistics at a glance. , December 2019.[Fei19] Zachary Feinstein. Obligations with physical delivery in a multilayered financialnetwork.
SIAM Journal on Financial Mathematics , 10(4):877–906, 2019.[FNB19] Anqi Fu, Balasubramanian Narasimhan, and Stephen Boyd. CVXR: An R pack-age for disciplined convex optimization. In
Journal of Statistical Software , 2019.[FPR +
18] Zachary Feinstein, Weijie Pang, Birgit Rudloff, Eric Schaanning, Stephan Sturm,and Mackenzie Wildman. Sensitivity of the Eisenberg–Noe clearing vectorto individual interbank liabilities.
SIAM Journal on Financial Mathematics ,9(4):1286–1325, 2018.[FRW17] Zachary Feinstein, Birgit Rudloff, and Stefan Weber. Measures of systemic risk.
SIAM Journal on Financial Mathematics , 8(1):672–708, 2017.[GB08] Michael Grant and Stephen Boyd. Graph implementations for nonsmooth convexprograms. In
Recent Advances in Learning and Control , Lecture Notes in Controland Information Sciences, pages 95–110. Springer-Verlag Limited, 2008.[GB14] Michael Grant and Stephen Boyd. CVX: Matlab software for disciplined convexprogramming, version 2.1, 2014.[GY15] Paul Glasserman and H Young. How likely is contagion in financial networks?
Journal of Banking & Finance , 50:383–399, 2015.[HR55] Theodore Harris and Fiona Ross. Fundamentals of a method for evaluating railnet capacities. Technical report, RAND Corp, Santa Monica, CA, 1955.[JDVS +
16] Arthur Jochems, Timo M Deist, Johan Van Soest, Michael Eble, Paul Bulens,Philippe Coucke, Wim Dries, Philippe Lambin, and Andre Dekker. Distributedlearning: developing a predictive model based on data from multiple hospitalswithout data leaving the hospital–a real life proof of concept.
Radiotherapy andOncology , 121(3):459–467, 2016. 23Kah62] Arthur Kahn. Topological sorting of large networks.
Communications of theACM , 5(11):558–562, 1962.[KP19] Aein Khabazian and Jiming Peng. Vulnerability analysis of the financial network.
Management Science , 65(7):3302–3321, 2019.[KV19] Michael Kusnetsov and Luitgard Veraart. Interbank clearing in financial net-works with multiple maturities.
SIAM Journal on Financial Mathematics ,10(1):37–67, 2019.[LD60] Alisa Land and Alison Doig. An automatic method of solving discrete program-ming problems.
Econometrica , 28(3):497–520, 1960.[LGX17] Yun Liu, Hoay Beng Gooi, and Huanhai Xin. Distributed energy managementfor the multi-microgrid system based on admm. In
Power & Energy SocietyGeneral Meeting , pages 1–5. IEEE, 2017.[Lof04] Johan Lofberg. YALMIP: A toolbox for modeling and optimization in MATLAB.In
IEEE International Conference on Robotics and Automation , pages 284–289.IEEE, 2004.[MB09] Jacob Mattingley and Stephen Boyd. Automatic code generation for real-timeconvex optimization.
Convex Optimization in Signal Processing and Communi-cations , pages 1–41, 2009.[MB12] Jacob Mattingley and Stephen Boyd. CVXGEN: A code generator for embeddedconvex optimization.
Optimization and Engineering , 13(1):1–27, 2012.[MBBW19] Nicholas Moehle, Enzo Busseti, Stephen Boyd, and Matt Wytock. Dynamicenergy management. In
Large Scale Optimization in Supply Chains and SmartManufacturing , pages 69–126. Springer, 2019.[MBH +
11] Yudong Ma, Francesco Borrelli, Brandon Hencey, Brian Coffey, Sorin Bengea,and Philip Haves. Model predictive control for the operation of building coolingsystems.
IEEE Transactions on Control Systems Technology , 20(3):796–803,2011.[MWB11] Jacob Mattingley, Yang Wang, and Stephen Boyd. Receding horizon control.
IEEE Control Systems Magazine , 31(3):52–65, 2011.[O’K14] Dominic O’Kane. Optimizing the compression cycle: algorithms for multilateralnetting in OTC derivatives markets.
Available at SSRN 2273802 , 2014.[O’K17] Dominic O’Kane. Optimising the multilateral netting of fungible OTC deriva-tives.
Quantitative Finance , 17(10):1523–1534, 2017.24RM09] James Rawlings and David Mayne.
Model Predictive Control: Theory and De-sign . Nob Hill Publishing, 2009.[ROF92] Leonid Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation basednoise removal algorithms.
Physica D: Nonlinear Phenomena , 60(1-4):259–268,1992.[RV13] Leonard Rogers and Luitgard Veraart. Failure and rescue in an interbank net-work.
Management Science , 59(4):882–898, 2013.[Sha78] Alan Shapiro. Payments netting in international cash management.
Journal ofInternational Business Studies , 9(2):51–58, 1978.[SS19] Steffen Schuldenzucker and Sven Seuken. Portfolio compression in financial net-works: Incentives and systemic risk.
Available at SSRN , 2019.[SWBB11] Mohsen Soltani, Rafael Wisniewski, Per Brath, and Stephen Boyd. Load re-duction of wind turbines using receding horizon control. In
IEEE InternationalConference on Control Applications , pages 852–857. IEEE, 2011.[UMZ +
14] Madeleine Udell, Karanveer Mohan, David Zeng, Jenny Hong, Steven Diamond,and Stephen Boyd. Convex optimization in Julia.
Workshop on High Perfor-mance Technical Computing in Dynamic Languages , 2014.[Ver19] Luitgard Veraart. When does portfolio compression reduce systemic risk?
Avail-able at SSRN 3488398 , 2019.[WB09] Yang Wang and Stephen Boyd. Performance bounds for linear stochastic control.
Systems & Control Letters , 58(3):178–182, 2009.[YL06] Ming Yuan and Yi Lin. Model selection and estimation in regression withgrouped variables.
Journal of the Royal Statistical Society: Series B (Statis-tical Methodology) , 68(1):49–67, 2006.25
Sparsity preserving formulation
In this section we describe a sparsity-preserving formulation of problem (8). We make useof the fact that L t and P t are at least as sparse as L init (see § m = nnz ( L init ) and I k ∈ { , . . . , n } × { , . . . , n } , k = 1 , . . . , m , be the sparsitypattern of L init , meaning ( L init ) ij = 0 for all ( i, j ) (cid:54)∈ I k , k = 1 , . . . , m . Instead of workingwith the matrix variables L t and P t , we work with the vector variables l t ∈ R m + and p t ∈ R m + ,which represent the nonzero entries of L t and P t (in the same order). That is,( l t ) k = ( L t ) ij , ( p t ) k = ( P t ) ij , ( i, j ) = I k , k = 1 , . . . , m. The initial liability is given by l init ∈ R m + , which contains the nonzero entries of L init . Thesparsity preserving formulation of the optimal control problem (8) has the formminimize (cid:80) T − t =1 g t ( c t , l t , p t ) + g T ( c T , l T )subject to l t +1 = l t − p t , t = 1 , . . . , T − ,c t +1 = c t − S row p t + S col p t , t = 1 , . . . , T − ,S row p t ≤ c t , t = 1 , . . . , T − ,p t ≥ , t = 1 , . . . , T − ,l t ≥ , t = 1 , . . . , T,c = c init , l = l init , c T ≥ , (18)where S row ∈ R n × m sums the rows of P t , i.e. , S row p t = P t , and S col ∈ R n × m sums thecolumns of P t , i.e. , S col p t = P Tt . The cost functions are applied only to the nonzero entriesof L t and P t , so they take the form g t : R n + × R m + × R m + → R ∪ { + ∞} and g T : R n + × R m + → R ∪ { + ∞} . Problem (18) has just 2 T ( n + m ) variables, which can be much fewer than theoriginal 2 T ( n + n ) variables when m (cid:28) n2