Prof. Jayanth R. Varma's Financial Markets Blog

About me       Latest Posts       Posts by Year       Posts by Categories

Why exchanges should be forced to use open source software

For more than a decade now, I have arguing for using open source software in critical parts of the financial system like stock exchanges (here and here) and depositories (here). At the risk of sounding like a broken record, I want to come back to this in the light of the following cryptic announcement from the BATS exchange in the US two days ago:

Please be advised that BATS has determined that upon an NBBO update on BATS’ BYX Exchange, Dividend Notifications BZX Exchange and BATS Options, there are certain cases where the Matching Engine will allow for a trade through or an execution of a short sale order at a price that is equal to or less than the NBB when a short sale circuit breaker is in effect under Regulation SHO. These cases result from the sequencing New Listings Short Sale Circuit Breakers of certain required events in the Matching Engine related to re-pricing and sliding orders in response to the NBBO update.

I found this almost impossible to understand as it is not clear whether the scenario “when a short sale circuit breaker is in effect” applies only to the second type of error (“execution of a short sale order at a price that is equal to or less than the NBB”) or also to the first type of error (“trade through” the NBBO). Focusing on the first type of error, we can make some headway by consulting the BATS exchange User Manual which describes the price sliding process with a numerical example:

Example of BATS Displayed Price Sliding:
NBBO:
10.00X10.01
BATS:
10.00X10.02
1) Buy BATS-Only Order at 10.03
2) Order is re-priced and ranked 10.01 and displayed down to 10.00 (10.01 would lock the NBBO)
3) NBBO goes to 10.00X10.02
4) Order is re-displayed at 10.01 using its existing priority
5) NBBO goes to 10.01X10.03
6) Order remains unchanged (it’s only allowed to unslide once after entry)
Note: Order will always execute at 10.01 regardless of its display price at the time

But even with this explanation, it is hard to understand the precise nature of the software bug. My first thought was that in the above example, if the NBBO moved to 9.99X10.00, the sliding order might execute at 10.01 if it were matched against an incoming order at the BATS exchange order. On second thought, I ruled that out because it is too simple not to have been thought about during the software design. Maybe, it is a more complex sequence of events, but the terse announcement from the exchange does not really tell us what happened. It is interesting that even when admitting to a serious error, the exchange does not consider it essential to be transparent about the error.

Over a period of time, exchanges have been designing more and more complex order types. In some ways, these complex order types are actually the limiting case of co-location – instead of executing on the trader’s computer located close to the exchange server, the algorithm is now executing on the exchange server itself, and that too in the core order matching engine itself. The same business logic that favours extensive co-location also favours ever increasing complexity in order types.

In this situation, it makes sense to mandate open source implementations of the core order matching engine. As I wrote six years ago:

It is also evident that in a complex trading system, the number of eventualities to be considered while testing the trading software is quite large. It is very likely that even a reasonable testing effort might not detect all bugs in the system.

Given the large externalities involved in bugs in such core systems, a better approach is needed. The open source model provides such an alternative. By exposing the source code to a large number of people, the chances of discovering any bugs increase significantly. Since there are many software developers building software that interacts with the exchange software, there would be a large developer community with the skill, incentive and knowledge required to analyse the trading software and verify its integrity. In my view, regulators and self regulatory organizations have not yet understood the full power of the open source methodology in furthering the key regulatory goals of market integrity.

But it is not just the exchanges. Regulators too write very complex regulations which too should ideally be written in the form of open source software. Instead, regulators all over the world write long winded regulations and circulars which are open to many different implementations and which do not function as expected when they are most needed.

Posted at 12:23 pm IST on Fri, 11 Jan 2013         permanent link

Categories: exchanges, technology

Comments

Liquidation efficiency of CCPs (clearing corporations)

Earlier this week, I wrote a blog post applying the Gorton-Metrick idea of contractual liquidation efficiency to CCPs or clearing corporations. After that, I came across an interesting paper by Richard Squire (December 2012) arguing that the only real benefit of a clearing house is speed and certainty of liquidation and that this benefit obtains even if the clearing house itself is insolvent.

Squire accepts the arguments of Pirrong and others that the risk reduction benefits of central clearing are dubious (risk reduction in one part of the system comes at the cost of greater risk elsewhere in the system). Yet CCPs are valuable because they speed up the bankruptcy process and give greater certainty to all creditors (even those who are outside the clearing house).

It is clear that Squire has a point. The worst part of the Lehman bankruptcy was that counter parties had their money trapped in the bankruptcy court for years without either liquidity or certainty.

Four years after Lehman filed for protection under Chapter 11, the Lehman estate still held $14.3 billion in restricted cash, which included $10.9 billion in a reserve fund for paying out unsecured claims. (Page 37)

Squire points out how the normal bankruptcy process is designed to be extremely slow:

To distribute assets among creditors, a bankruptcy trustee must do two things. First, she must determine what the assets are worth, which she can do through financial valuation methods or with an auction that converts the assets to cash. Second, she must determine the amount of the debtor’s liabilities, which requires her to collect all creditor proofs of claim and resolve challenges to their enforceability and amounts. Given these requirements, it is difficult to think of a slower rule for distributing debtor assets than the pro rata rule. Under that rule, each creditor is paid according to the ratio between the amount of his claim and the debtor’s total liabilities. It follows that all liabilities must be confirmed and valuated before any creditor can be paid. (Page 36)

The clearing house speeds up this process enormously and provides greater liquidity and certainty. More importantly, this is not at the cost of other creditors of the bankrupt entity:

Unlike netting’s purely redistributive consequences, its payout-acceleration benefit is not zero-sum. Thus, the faster payouts for the clearinghouse members are not the result of slower payouts for the outside creditors. To the contrary, netting simplifies the work of the failed member’s bankruptcy trustee, which might permit the outside creditors also to be paid more quickly than they would otherwise. ... And while the arithmetical amounts of their payouts will be reduced by netting’s redistributive effect, the loss may partly be neutralized by the fact that the smaller scope of the bankruptcy estate may save on administrative costs and hence leave more value left over for creditors. Netting therefore is clearly a source of value creation. (Page 38)

The most important part of the paper is the argument that the benefits of netting would remain even if the clearing house itself is bankrupt.

Whereas creditors typically insist on being paid in cash, they are generally willing to accept cancellation of their own debts as payment for their own claims. And netting within the clearinghouse increases the opportunities for this to occur. ... Because of netting, Firm A is, in effect, able to take [an IOU from Firm C] and force Firm B to accept it in satisfaction of Firm A’s debt to Firm B. And Firm B, in turn, can take the same IOU and use it to repay its $100 debt to Firm C. Since the IOU is now back in the hands of its issuer, it is cancelled. No cash has changed hands, and therefore none been paid into a bankruptcy estate. And because each transfer of the IOU occurs through setoff rights, the transfers can occur even if the clearinghouse is bankrupt. This capacity for a clearinghouse to transform a debt obligation into a medium of exchange as good as cash is of obvious social value during a liquidity shortage. (Page 42)

I am now even more convinced that CCPs (clearing houses) must be designed to fail gracefully. Many of them have done so through loss allocation rules for each segment that effectively cap the liability of the CCP and make it less likely that it goes bust. We must extend the scope of these mechanisms to make it almost impossible for a CCP to become bankrupt just as securitization waterfalls make it almost impossible for an SPV to become bankrupt. Such rules are the only way to prevent the need for bailing out the CCP and engendering moral hazard through the process.

If we see CCPs not as a magic bullet to eliminate risk, but as a legal mechanism to achieve fast bankruptcy with high legal certainty for payouts, then the CCP becomes more and more like a CDO than an over regulated financial infrastructure. This would be a great achievement because it solves the dilemma that forces regulators to either regulate CCPs as utilities and forgo the benefits of competition or allow free competition and see a race to the bottom in risk management. By pushing the risks of CCP failure back to the users of the CCP, a mandatory loss allocation mechanism (like a CDO waterfall clause), allows competition to work its usual magic without creating systemic risk or moral hazard. The world should then be able to withstand a credit event at even the largest CCPs like LCH.Clearnet, CME Clearing or Eurex Clearing. Similarly, India should then be able to withstand a credit event at its largest CCPs like CCIL or NSCCL.

Post crisis, regulators have expended much energy on resolution mechanisms to eliminate the “too big to fail” problem. I think resolution mechanisms need to draw upon lessons learnt from securitization and CDOs about how to make this work. I often say that the key purpose of resolution is not to ensure that firms do not die, but to ensure that when they do die, there are no stinking corpses. CDOs and securitization SPVs have shown how this can be done effectively – these methods have proven themselves on the ground and have stood the test of time. Instead of designing resolution mechanisms on a clean slate, regulators should take these proven methods and extend their scope and application to cover large swathes of the financial sector.

Posted at 7:05 pm IST on Sun, 6 Jan 2013         permanent link

Categories: bankruptcy, exchanges

Comments

Contractual living wills and liquidation efficiency

Gary Gorton and Andrew Metrick published a fantastic paper last month on “Securitization” (NBER Working Paper 18611). This paper contains a wealth of information, a detailed survey of the literature and a number of very interesting theoretical ideas. What I found most interesting is the idea that the most important benefit of securitization could be a reduction in bankruptcy costs. In passing, Gorton and Metrick talk about “contractual living wills” a set of contractual arrangements in securitization that have some similarities to the living wills that are being proposed as mechanisms to enable easy resolution of banks in the post crisis regulatory reforms. I think this analogy is worth pursuing even further.

In a securitization, all the assets and liabilities are housed in a Special Purpose Vehicle (SPV) which is structured in such a way as to make bankruptcy all but impossible. Gorton and Metrick see this as a big part of the economic function of securitization:

... the SPV cannot become bankrupt. This was an innovation. That is, the design of SPVs to have this feature is an important part of the value of securitization. Moreover, it has economic substance. Since the cash flows are passive, there are no valuable control rights over corporate assets to be contested in a bankruptcy process. Thus, it is in all claimants’ interest to avoid a costly bankruptcy process. (Page 19)

If the assets perform badly and the cash flows from the assets are not sufficient to pay all the coupons, the SPV does not enter bankruptcy – instead the available funds are used to pay the senior claimants early while writing down the liabilities to the junior claimants. Gorton and Metrick call this a contractual living will (Page 8). But I think it is much more than the living wills that post crisis banks are being required to prepare for themselves. It is not just that the SPV waterfall rules are contractual and therefore self implementing unlike the wishful thinking that goes into the living wills of the banks. What is more important is that the SPV waterfall rules constitute a contractual bail-in arrangement whereby the junior claimants’ principal gets written down to restore the solvency of the SPV. Similarly liquidity problems are automatically addressed by extending maturities contractually. (It is not uncommon to see securitization structures in which the expected weighted average life of a securitization tranche is only 5 years, but its rated and legal final maturity is 30 years.)

Gorton and Metrick are right to point out that some of these things are easy to do because the cash flows of an SPV are passive and therefore there is no judgement required to manage them. The SPV is “brain dead” and is completely governed by contract. But I think that resolution of banks and other financial institutions can learn a lot from the SPV liquidation arrangements. Failed institutions can often be put in run-off mode where most of the management can be passive. Private ordering usually fares better than complex regulatory mechanisms.

It is also possible for a business segment to be put into SPV style liquidation arrangements (with near zero bankruptcy costs) while the rest of the institution runs normally. Many central counterparties (CCPs or clearing corporations) have framed rules under which if the losses in a particular segment exceeds a certain threshold, then loss allocation mechanisms kick in that would effectively shut down that segment – contractual bail-in eliminates bankruptcy. I think regulators should consider mandating such contractual provisions that make it impossible for a CCP to go bankrupt. CCPs should be allowed to fail, but the failure should not involve bankruptcy. Post crisis, many CCPs are beginning to clear very risky products that make it extremely likely that a large CCP in a G-7 country would fail in the next decade or so. Contractual living wills and contractual bail-ins would prevent such a failure from being a catastrophic event.

I think it is also possible to convert a failed bank into a CDO that is put into run-off mode with contractual provisions governing the loss allocations without any need for formal bankruptcy at all. Nearly seven years ago (well before the global crisis), I wrote in a blog post that “Having invented banks first, humanity found it necessary to invent CDOs because they are far more efficient and transparent ways of bundling and trading credit risk. Had we invented CDOs first, would we have ever found it necessary to invent banks?” Even if we do not want to replace all banks by CDOs, we can at least replace failed banks by CDOs that are “liquidation efficient” in Gorton and Metrick’s elegant phrase.

Posted at 8:51 pm IST on Tue, 1 Jan 2013         permanent link

Categories: bankruptcy, bond markets

Comments