Ray O'Brien, HSBC
At first glance, financial risk management might appear to have little in common with engineering Model-Based Design. Financial risk management is data-centric, highly dimensional, and deployed into software systems. Engineering models typically draw on fewer, highly coupled inputs, often embedded in physical and electronic hardware.
In both cases, validated, verified fit-for-purpose models are key, extending product lifecycles amidst extreme scenarios, albeit across different time horizons. Good processes mitigate against risks such as costly trading errors or compliance charges in finance, while high integrity requirements have long dominated engineering. Fit-for-purpose models also increase functionality and drive progress, enabling more differentiating features on a car, device, or plane, and facilitating new investment, lending, and liquidity-creating products.
In this talk, Ray discusses how financial risk technology stacks are evolving in response to regulatory and geopolitical change, bigger datasets, new modelling techniques, and rapidly changing development cultures. He also assesses the critical importance of good model development and implementation, and what insights he has taken from Model-Based Design in other industries.
Recorded: 4 Oct 2017
Hi, I'm from finance.
Nice to meet you. What can I say? I don't have any robots. I don't have these autonomous vehicles. Wow, man. Some really cool stuff. That's really wonderful stuff. What I am going to do is I'm kind of try and entertain you with a little bit about what modeling means in finance. We do Model-Based Design in finance because we have to actually try and predict possibilities into the future. And it's all about how we manage our money, how we are actually trying to make sure that we're doing the right decisions.
So a little spiel about HSBC—wow. I can read it down there. We're in 67 countries around the world. We have about 38 million customers. What other little fact could I give you? We speak 144 languages. I personally don't. So we're a very large financial institution. You might hear of HSBC here in the UK. But actually, if you think about it, whenever you get off a plane, you'll see those HSBC signs. We're in an awful lot of countries around the world. So we're very, very large outside of the UK.
We're split into four kind of areas. RBWM, that's our retail bank. That's what you probably see on the high street and what you probably know and love or hate. Don't know. CMB, that's our corporate bank where we lend money to companies like MathWorks. Have we lend to any money recently? I don't know. GB&M, that's our investment bank. That's like all the trading floors you see on the telly where all these people are shouting and looking at screens and watching things go up and down. They do it, actually, on purpose, to shout, you know. Normally, when the cameras aren't there, they're just quite—not much happening at all, really. And then our private bank for all those very rich kids around the world who need that personal service.
So let me explain it a little bit of it at wholesale and try and explain it. So you might understand finance in terms of yourselves and, basically, your own financial lifecycle. So there you are. You start interacting with finance in terms of maybe you might get an account when you were a kid. Then you basically, you know, get married and have a child yourself. You need to buy a house. You basically start thinking about retirement, savings, all those type of things. That's a normal life cycle of a person. The same can be plotted for a company.
A company starts. It's small. It's doing domestic market. Then it has aspirations to go international, so it goes regional. And then it starts going international around the world. So let me pick an example. Anybody know Eli's Cheesecakes? Are there any Americans in the audience? Eli's Cheesecakes make really nice cheesecakes. So they started in 1940 in Chicago. There they are back there. And as you can see, they started their life cycle in terms of getting bigger and bigger in Chicago. You see they built a bakery. They went into retail. Then they started going international in the early ’90s. They needed to raise more money to do that. It took them 66 years to actually invent the Skinny Eli, which is pretty unfortunate. You know, it would be nice to have the diet one before that. And then eventually, they got all the way to serving Eli's Cheesecake to Obama in the White House. What more could you ask? Beautiful life cycle of a company.
Each stage of those lifestyles, financing is needed. And that's what our corporate bank does, is get involved, help the life cycle of these companies. So we offer services all the way through that life cycle in terms of starting a new business, raising initial monies, to beginning your operations, to optimizing it, to expansion, et cetera. And that's basically how the financial services work. Now I'm going to skip this. I like skipping. How does analytics get involved in all this? Well, a little bit of background.
We've got about 600, 700 people—650 people, there we go—in analytics in HSBC around the world. And what we do is we try and look and build models to predict what's going to happen with cash flows and monies for both our clients and our businesses. And we do predictive modeling. So you might have seen on the right-hand side, the v-shaped model about Model-Based Design. And I'm sure you must have seen that somewhere in a diagram, somewhere in one of your engineering areas.
On the left-hand side is how we actually build models in finance. They are actually very, very similar. It's just we do a circle where you guys do a v. But you can see, what we do is we start with a definition of what we're trying to do, go into a model development, implementation, validation, reviewing the models, approval, the implementation then, and then continuous validation of the model in production, which then feeds back in a life cycle back into the creation of the next generation of the models, et cetera. So it's a kind of continuous loop, very similar to your v shape on the right-hand side.
What kind of models we're building? A lot of them is trying to predict what will happen if. So here is an example of where we're taking all our trading book, all our positions around the world. And what we have to do is simulate the future going out 70 years, looking at all the outcomes that could potentially happen. Lots of shocks—looking at black swan events, all those type of things you might have heard of. And then trying to predict what would happen with enormous amounts of calculations and huge volumes of data.
Our journey with MathWorks. The biggest issue we face, which I think nearly everybody faces, is data. We spend most of our time trying to access the data, manipulate the data, and put the data into a good enough state that we can then use for modeling. The actual model build itself is actually the shortest part of a life cycle. That's the data manipulation that actually takes the longest amount of time—getting it into a clean state, getting it to a state that you can then use for your modeling. I think a lot of people will find that in common with what we have.
So the first thing we did with MATLAB is look at the lifecycle of a model and see how they could help us on both accessing, exploring the data, processing it, building and validating models, and then deploying those models into production—all four steps of the lifecycle. We started to use a number of the standard tools and we built our own kind of toolbox. So you'll see there we built a thing called MDE, which is our toolbox for our building a model. And then we build an execution environment, called MEE, for actually running these models using MATLAB. So the MDE is the development environment where we actually do the modeling. The model also includes all the data to do the model and the documentation. We then run that model through into an executionable area. So all stages of the life cycle using the MATLAB toolbox.
And here's a lovely screen with some graphs on it. Isn't it nice? I've been told that I always should show a graph, Josh. Yes. So here we got is a nice data analysis looking at, I think, some kind of factor values of that data and what the predictive thing you could do with some of that data. And that's our modeling development environment. So what we're doing is we're using the MATLAB tools, interacting with our data, and then adding our own elements on top of that to allow us to build a standard developing environment for a lot of these financial models, and then storing them all in the same place, and then using those models for multiple purposes.
So the production side of it, the MEE, is running these in production. And then we build APIs for people to call these models and to actually use them. Why do we do this is we're trying to reduce the amount of recoding of the models by a separate technology department actually in our production systems. So what we're trying to do is have a seamless flow from our model development into an environment that can be used by, actually, our production systems. So if you think of the paradigm of creating pseudocode and then handing that over to a tech department who then rewrites it and actually implements it in a production system, we're trying to get rid of that step. We're trying to actually go straight into a model something that can actually run in production. I'm sure that must ring a bell somewhere.
Here is an example of our execution environment. Put some front-end screens on, a bit of browser web-based front-end screens, and all of a sudden, you can run these models. You can then have a proper API calls. You can glue them into your production systems and into your processors of what you do in every day. In this case, here we are doing a credit analysis around customers, looking at what their default potential could be on their default rating.
Now I like this slide because there's little people running around with their head on fire. I do like that icon. So we're very much on the left-hand side of this slide at the moment, trying to get to the right-hand side of this slide. And our biggest issue is our data, where we have a lot of data across many, many different geographies, across many different locations, trying to bring it all into one place, and then clean it up in a consistent way where it can be used for our modeling environments. So our biggest issue is trying to actually build an environment where we can have consistent data, and then run standard tools against it in terms of modeling.
So let me talk to you about where we're moving towards—the cloud. We always like the cloud. If you think about the cloud and about what's happening in the world, and if you think about predictive analytics, and you think about machine learning. And you think about where we were 10, 20, 30 years ago. If you think about machine learning, the mathematics hasn't really changed that much. It's not like somebody went out and invented machine learning. It was actually around, I think, in the ’70s. So what actually has changed? What's actually changed is, all of a sudden, you're able to run these things in an environment where the price point of running these things is reasonable.
So where before, the actual running a deep learning or a machine learning process, the cost would be so prohibitive. You just wouldn't do it. All of sudden, along comes the cloud to enable you to actually start doing some of these newer predictive techniques. They're not new. It's just you're able to do them. And with that, you can all of a sudden start coming up with whole new ideas of what you want to do next, which I'll talk about in a second. But what is the cloud? What's this big panacea all of a sudden . A major cloud just come overhead and all of a sudden, there's cheap CPUs?
And the best parallel I can give you is if you think back to 1880 and before, whenever you built a factory, you'd build a boiler. And the boiler would sit beside your factory and it would generate electricity for the factory. And that's actually how you run your factory, which was fine. Everybody did that. But the problem was when the factory was down at the weekend or whatever, the boiler would have to be down. And it actually was kind of inefficient. And if actually you were producing too much electricity, there was nowhere else you can actually get the electricity to. And it was all coupled on a one-on-one basis, boiler to a factory. But everybody did that.
And then along came a guy, I think it was Edison, at about 1884 or 5 or 6. And he invented a thing called the power station. And all of a sudden, having individual boilers attached to factories actually didn't make sense anymore. Why don't we all draw power from the grid? Nowadays, thinking about building your own boiler beside a factory, you'd be kind of thought of as kind of mad. You'd want to get the power from the grid. And if you really want to be conservative, maybe you'll get it from two grids. You're not going to build your own power station, unless you're very, very, very, very, very, very, very, very big. The same is happening in computing.
So HSBC, like many other companies, have huge data centers with enormous amounts of hardware and equipment in them that we've built over the years. And we're all proud of these big data centers with all our own computers and things running there, but lots of different types. But actually, what the cloud is is the power station. And all of a sudden, the paradigm shift is you no longer need to have your own boiler and your own data center, you can start using this cloud. And the price point for the cloud is an order of magnitude cheaper to what you actually have in-house.
Now all of a sudden, you have the CPU power. You have the memory. You have the disk space to actually do proper predictive analytical projects with machine learning with deep learning. All of a sudden, all these projects start making sense. Where before, the price point was just too prohibitive. You'd never start. You'd have one look and go, God, it's going to cost us a million quid. We'd need 1,000 CPUs just sitting there. And nobody else would use them when they're idle. Now all of a sudden, the cloud is there. That's what's all of a sudden happened over the last, what? Five years. And that's why you're seeing such a huge boom in machine learning. We're embracing that as well.
Because what am I trying to do? I'm trying to do predictive analytics. I'm trying to forecast the future, which of course, is impossible. So I do lots of statistics trying to figure out where markets will go, what will happen with companies. But I also want to use better techniques. I want to use machine learning. I want to use deep learning. I want to bring in more and more data—not just my own data, but then external data to actually do better predictive analytics. All of a sudden, I can start using social media data. I can start using internet data to help me actually figure out what's going to happen with a company in the future, as well as today. And that's where you need the power of the cloud.
So we are going to adopt the cloud to HSBC. We're going to reduce our own data center footprint. And we're going to start using some of these new cloud-based offerings. You know, the big ones, like Google or Amazon or Microsoft—you will have your preference, but they're the three really biggest ones out there. And they all offer different services and techniques. But at the end of the day, you've got to look at this as—it's a power station. All of a sudden, you're going to hook yourself to the grid. Where before, you had your own data centers.
Why do I do this speech to you guys now? It’s because it's the biggest revolution that's happening in analytics. Right now, all of a sudden, by doing this, it's going to allow you to do modeling techniques that you never could do before. All of a sudden, it's going to open a door to you guys in terms of what you can do. Once you get onto the cloud, then, you know, standard tools will be there—bit of Python, bit of [? OR, ?] bit of MATLAB. Hello, MATLAB. But it's going to open the door for allowing you to do a much bigger set of analytics than what you have today. That's my vision of the future. That's where we're heading towards. And that's why we're working with MATLAB to get MATLAB running on the cloud with all the different cloud services and make sure that what we've built internally today is going to work for the future as well. I think I'm done. Thank you very, very much.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.