Hello and welcome to module six of Stanford GSB Gen 544 how software eight finance and today we're going to talk about clearing settlement and regulation. So let me start by acknowledging the central flaw or the central failure in the design and execution of sec DB which was also maybe not surprisingly part of its success. Early on in the design and implementation of sec DB we decided we were not going to boil the ocean. We were going to start with the least complicated trading business which was foreign exchange, doesn't take very many parameters to completely identify a foreign exchange spot and forward trade the two counterparties to the trade, the two currencies, the exchange rate and the delivery date. That's all you need to know. We also said, we're going to just worry about what most firms would call the front and the middle office. Which at Goldman Sachs we just called the front office, which is trade execution and risk management. If we were correctly calculating the net present value of every position, and we were correctly calculating the Greeks, so that we could correctly hedge, and we had correct Profit and Loss reports. And we fed all of the important trade details to the downstream, back office or trade processing systems. We considered ourselves to have done our job and everything that happened. Once we pass the trades off to the back office with someone else's problem, and we simply didn't worry about it, didn't think about it. Now, there was a very early suggestion that there was something missing in this approach. And the early suggestion to me arose when I was looking deep inside the database structure. Of the first trading book that I worked on, it was called LDN 1 or London in New York. And it was no mosh to the fact that with sec dp and its global distributed, transactionally, protected and synchronized database. We were able for the first time to trade and risk manage the same book simultaneously out of two different trading locations, London and New York. So when I was looking in the book, I was looking and reconciling all the derivatives trading positions. And then I thought, well, I'm going to look at the cash position as well. There's a US dollar cash position, and it had a number in it like minus $42 trillion. And I remember thinking, well, that can't possibly be right. And of course, I knew what happened, which is we never reconciled that entry in the trading book. We never did anything with it. We would add trades ,delete trades ,rebook trades that number would just accumulate. And it was someone else's problem, namely controllers, treasury, back office operations to reconcile that number, and so it was no surprise that over the passage of time, that number became nonsensical. And nevertheless, it troubled me to see a nonsensical number. It looked like a punch. It looked like a hack. And indeed, it was. I wish that I paid more attention to those things. Because in extreme and tail events, you really care about those things being exactly right. So central failure and the design and implementation of sec DB is we didn't draw our purview, our boundary, broadly enough, and in those days, there was no API encapsulation. And because there was no encapsulation information, hiding and abstraction, we in the front office, really ought to have known and understood a lot more about what was going on. In the back office, and we ought to have helped our colleagues in the back office with their jobs. But instead we thought of all of those things such as trade reporting, to be a detail left to others. And so, we were impeccable about everything we needed, to value the book and risk manage the book. And we paid no attention at all to essentially everything else. And over time, we learned the hard way. And I will talk about that a little bit that we needed to care about all of it. And all of the business needed to be reflected in sec DB, the business and the software needed to converge across the entirety of our business. So observe two things. First, people who took the trouble to understand all of these processes, through the front office to the middle in the back office, through the sell side and out to the buy side and into all of the industry, utilities. Those people had time and opportunity to generate immense value for clients as well as for the firm, because they understood the totality of the system. And they also were able to mitigate risks that other stepped into. So, I recognize some of you may be rolling your eyes and wondering why I'm dedicating an entire lecture to this topic. And I'm doing so because it's commercial, because it's critical, because there's woefully too little understanding. How clearing and settlement work among the execution people in the front office, there're immense opportunities for making the industry more capital efficient for creating two returns on equity, and it's almost completely of white space opportunity. And I also want to give you a healthy respect, for the processes and the workflows of the back office. Which I've discovered the hard way, are at least as complex to understand and model in software and maybe more complex and more subtle and more existential than the risk that we took on and well understood. In the front office in some sense, well, one would generally argue that we started in the front office, because that's where most of the risk was. I could just as easily say, we started in the front office, because the problems were easier and better understood in the front office than in the back office. And I'm still working to understand all of those processes in the back office and identify the opportunities. So let's jump in Clearing and settlement, and then we'll go on to talk about regulation. So what is clearing and settlement in the first place? Well, let's start by looking at the entire workflow. So we spent most of our time talking about trade execution. What is execution? It is when the buyer and the seller. Enter into a legally binding agreement to transfer securities from the seller to the buyer in exchange for money from the buyer to the seller. Of course, it can be a little bit more complicated than that, when we're talking about derivatives. What is clearing? What clearing is that great big complicated middle ground is performing all of the necessary steps. Wheeling to the settlement that includes for instance, posting sufficient margin and recording the transaction. Extremely complicated set of business processes, settlement at the very end think of it as the period of punctuation sentence. It's the actual exchange of securities for money, that's when the securities are titled to the buyer, and the money is transferred to the seller. There's other kinds of settlements of course, physical oil will have a different settlement process, derivatives, foreign exchange, spot, and forward transactions. They're not actually exchanging securities, you're exchanging cash in one currency for cash in another currency in derivatives. You're computing how much party A proposed party B, and in what currency, and then you're doing the same how much this party B voted party A. And then, generally you're netting the two when someone is making a cash payment to the other. So, what is settlement, settlement is the business process of delivering securities, making payments, and fulfillment of a trade or contract. The main case of settlement, is something that we call delivery versus payment or DVP, it's really the most common form of settlement. And DVP, one counterparty party A, delivers to party B, all the documents needed to effect a transfer securities. And the other counterparty simultaneously, makes a payment and I want to emphasize that word simultaneous. We know from general and special relativity that choose simultaneity, doesn't exist and it's worth paying attention to that. I'll note that, the processes that we take for granted today in settlement generally arose after the Black Monday stock market crash in October of 1987, which revealed major flaws in the settlement process. The settlement process, even back then had been substantially revised because earlier in the history of the securities industry. There was so much paperwork and so much complexity in the settlements of trades, that the exchanges and the market participants actually took a holiday on Wednesday. And Wednesday was really just there to catch up on all the settlement processing. And so, lest you think that settlement is just the back office detail. There's multiple instances in history where settlement if especially when ineffectively or poorly handled got in the way of execution in the first place. I will also note that there was a 1989 report, after the 1987 crash. It was produced by the so called group of 30 think tank, and that report outlines the systems that exists today. And there have been changes, but not much and I would argue the entire process can benefit from a complete and global rethink. So, as I mentioned we got execution, spent most of our time in these lecture series talking about execution, clearing, and then all the way at the end we've got settlement. So, what is clearing? Clearing is that great middle ground, it is all business processes executed by anybody which could be party A, usually the sell side party B, usually the buy side and all of the intermediaries. All the business processes, after the making of the commitment to trade, which is execution up to and including settlement. Some people include settlement as part of clearing, others say clearing and settlement doesn't really matter to me. I think of clearing and settlement as one thing, with settlement as I mentioned the punctuation or the endpoint of the clearing process. An important fact to note, is that a third party clearinghouse, often these days called a Central Counter Party or CCP, often stands in the middle between two counterparties to a trade. And by doing so mitigates many kinds of risk, and I'm going to leave you with the sense of why CCPs are so important. Ultimately of course, the two parties to a trade can bilaterally clear, which simply means that the two parties handle all of the clearing processes between themselves, sometimes with the help of industry utilities of various kinds. Now, as market prices move, one counterparty gains and the other loses. That notion of marking trades to market every day was actually just something that is deeply built into golden sacks and as part of the culture and part of the thought process. But I'll note that for others, that process can be controversial. The golden view is always that the past is gone, sunk cost is a fallacy, all that matters is today and going forward. So every single day, we're going to recognize in our financial accounting all of our losses and all of our games. Now, this process of mark-to-market accounting is built into the way that central counter parties or CCPs work, it's in very many cases increasingly so after the Dodd Frank reform built into bilateral query. So, whether it's bilaterally or centrally cleared when a trade is margined that means that we mark-to-market every day. And the gainer receives cash collateral, usualyl cash could be securities from the party that is making a loss. So, let's talk a little bit about what clearing houses actually do. I think of three important activities of the clearing house, and there are many, many others, I just mentioned margining. But broadly speaking, the clearing house guarantees atomic DVP transactions, it also provides a mobilization/dematerialization. So, what do I mean by an atomic DVP transaction? Well, when atomic transactions actually a term from computer science from databases, and it means I'm doing a bunch of things. And those things even though I can subdivide them, are to be treated as a single thing, either they all happen or none of them happen. So there's no state of the world in which part of this transaction has occurred, but another part has not. All the parts occur together or all the parts are together rescinded and roll back, and there's no intermediate, or messy, or half done state of the world. And so, in the specific case of clearing houses, the clearing house guarantees that one of the following two things happen either A or B. Case A, the clearinghouse releases both the security and the payment simultaneously. Or case B the clearinghouse releases neither the security nor the payment and then says this trade has failed or failed to settle. Either A happens or B happens and there is never a state of the world and, Which for instance, one side receives the security but the other side does not receive the cash payment. Obviously a super important function. Immobilization, what is that? So immobilization is the first step on the way to dematerialization. Immobilization was pioneered by the DTCC or really a subsidiary of DTCC, which is called the Depository Trust Company or DTC. And so what DTC did, President built an electronic settlement system that referenced securities that were represented in paper form, but the securities never actually had to leave the DTCC. One of the things that people discovered in Wall Street in the times up to 1987 and after is there was a lot of pointless shuffling of paper stock certificates that would go from one broker to another broker and back and forth. And then someone had the bright idea, why don't we just leave all the share certificates in one place so you don't need couriers, moving them around, and then we'll have an electronic system that just references who owns which of those paper securities, but the paper securities never actually go anywhere. I will know that after Hurricane Sandy, many people became aware when the DTC vault flooded, but there were still a surprising number of stock certificates and bond certificates represented in paper form in this DTC vaults. Which, if they were flooded, were now turned into mush. And that really propelled the last step, which is the dematerialization. Someone figured out, well, if these paper stock certificates are just sitting in a vault and nobody ever sees them or touches them, why not just make them completely imaginary? In other words, why not just record electronically the shares and who owns them in the first place, and so paper securities simply vanish. And securities only exist in electronic form sometimes called book entry form. And I hope you can hear in there all of the echoes of the blockchain, the blockchain of course introduced the extra innovation that everybody can simultaneously see the ledger. It isn't held by a central entity and then revealed ad hoc others but everybody has access to the ledger. But this concept of dematerialization has been in progress for a long time. I mentioned other important roles of the clearing house including novation and margining. Those are technical sounding terms. They're actually pretty simple. So novation is a legal and contractual process. So we've got all these banks, we've got banks, A, B, C, D, E, and they're doing all kinds of trades. Novation is the legal process by which we cancel all of those trades and we replace them by two trades per bank. And those traits are with the CCP, so here go. We take all of those trades and instead of that complex net, we just have the flow between Bank A and CCP, Bank B and the CCP, and so on, and typically there'll be flow of cash and there'll be a flow of securities. In the case of derivatives, they'll just be a net flow of cash. So we've taken a complicated web of trades, and we've replaced them with a much smaller number of trades. And so novation takes a lot of the complexity out of that multilateral process by introducing a set of bilateral processes and Central Counterparty or CCP. I've already mentioned margining, which is a process that grows out of the concept of mark to market accounting, where the clearinghouse marks assets to market on a regular basis. It calls collateral from the loss-makers and moves collateral to the counts of the gainers important point to note in volatile markets, clearinghouses reserve the right to call margin intraday. This kind of margin is called variation margin. For separate reasons, it's often important at the outset of a trade to have some trade copies at some margin called initial margin and that's to compensate people in case one side of the trade, especially derivatives trades fails, and then the trade itself has to be replaced. And so that search costs, that breakage costs, needs some compensation and that's what initial margin is for. But for our purposes, we would put most of our attention into the daily mark to market or variation margin. So, how does a clearinghouse do its magic? Well, the first thing it does is it performs netting. And so we take imagine a bunch of these trades, I did it in pounds so Bank A owes Bank C eight million pounds, C owes B 10 million and B owns A six million, so if you add those up, you'll see it's a total of £24 million of flows across this non cleared bilateral system. And then if we add the CCP, we can take all of those flows for instance the eight million going out of Bank A and the six million going in and we have the six million coming in from the Central Counterparty and the eight million going out to the Central Counterparty. We take the other two flows accordingly for the other banks and then we have a simple net trade, one per bank. And so you haven't changed the number of flows. There were three flows before, but if you look at the total amount of money moving around the system, you'll see in the last case that there's only four million pounds, I'm sorry, eight million pounds in total moving across the system when there was 24 before. So the process of the CCP stepping in and netting those trades down reduces the gross risk in the system. And that is what we mean by the netting of gross exposures. It's a hugely important tool in risk management. And generally as a rule of thumb, the more participants in the system you have, who are all trading to a Central Counterparty, the more you're likely to reduce those gross numbers to much smaller net numbers, making the system more stable. Of course, as long as the Central Counterparty has strong operational risk management. Of course there has been a debate. While we're using an important tool of risk management by introducing a CCP, if the CCPs themselves have flaws that were just duffing vast amounts of risk into the CCPs which generally points up an important principle, which is that you can transform risk but it's extremely difficult. Simply to make risk go away. But in the case of the CCP, we make gross settlement risk, go away and become a much smaller net settlement risk. But of course, the cost is the operational risk of the CCP itself and all the processes around it. So let me step back and look at all of this. So back office, you've heard the term back office, how would you define it? Well, I would say and I made up this definition, but I don't think it's too controversial. That the back office includes all the people who make settlement and clearing happen across the system, together with their systems and their business processes. There's an analogy here it's as with plumbing and electricity or internet in your home, you often know nothing about how it works. But you care immensely when it fails. And those failures can be catastrophic for the system. For a long time on wall street, people in the front office used to think that really only execution matter, you gave your clients great service, liquidity in large size that was reliable, well, that was enough. And if there were fails or complexities or costs in the back office. Or your back office was different from everybody else's back office. Well, that was an unfortunate detail. I can tell you that roughly over the last five years, that has begun to change. And sell-side firms increasingly discovered that clients move away their execution business to a competitor. When they're unhappy and unhappy, unhappiness can take many forms unhappy with the back office. And so, problems in the back office, complexity, manual interventions, breaks, fails. Expensive, IT processes all of these can manifest in business going away. In revenue going away. But this is important discovery for firms to realize that back office wasn't just part of their cost function. It was importantly part of the revenue function as well. In response, Goldman Sachs massively reorganized itself in 2019. To bring front office and back office people together into single global markets division. This is something I've been passionate about going all the way back to the early days of my career in 1993. And so my lesson learned there is that if you're willing to be credibly patient and credibly tenacious. And take on, a bunch of roles you never planned to take on, including Chief Information Officer and Chief Financial Officer. You might eventually get a transformational reorganization done, and when the reorganization is done. In many respects when it comes to the software and the processes, it's still a work in process as I will work in progress, as I will shortly take you through. So I'll pause there for a moment and we'll pick up shortly.