Reader small image

You're reading from  Hands-On Artificial Intelligence for Banking

Product typeBook
Published inJul 2020
Reading LevelIntermediate
PublisherPackt
ISBN-139781788830782
Edition1st Edition
Languages
Right arrow
Authors (2):
Jeffrey Ng
Jeffrey Ng
author image
Jeffrey Ng

Jeffrey Ng, CFA, works at Ping An OneConnect Bank (Hong Kong) Limited as Head of FinTech Solutions. His mandate is to advance the use of AI in banking and financial ecosystems. Prior to this, he headed up the data lab of BNP Paribas Asia Pacific, which constructed an AI and data analytics solution for business, and was the vice-chair of the French Chamber of Commerce's FinTech Committee in Hong Kong. In 2010, as one of the pioneers in applying client analytics to investment banking, he built the analytics team for the bank. He has undertaken AI projects in retail and commercial banks with PwC Consulting and GE Money. He graduated from Hong Kong Polytechnic University in computing and management and holds an MBA in finance from the Chinese University of Hong Kong.
Read more about Jeffrey Ng

Subhash Shah
Subhash Shah
author image
Subhash Shah

Subhash Shah is an experienced solution architect. With 14 years of experience in software development, he works as an independent technical consultant now. He is an advocate of open source development and its utilization in solving critical business problems. His interests include Microservices architecture, Enterprise solutions, Machine Learning, Integrations and Databases. He is an admirer of quality code and test-driven development (TDD). His technical skills include translating business requirements into scalable architecture and designing sustainable solutions. He is a co-author of Hands-On High Performance with Spring 5, Hands-On AI for Banking and MySQL 8 Administrator's Guide. He has also been a technical reviewer for other books.
Read more about Subhash Shah

View More author details
Right arrow
Using Features and Reinforcement Learning to Automate Bank Financing

Commercial banks make money by earning interest on money that was loaned to borrowers. In many cases, the loan becomes a Non-Performing Asset (NPA) for the bank. There are instances where the borrower could go bankrupt, leaving the bank with a loss. In such situations, it becomes critical for commercial banks to assess the borrower's ability to repay the loan in a timely manner.

Now, if we look at this scenario closely, we realize that every loan is funded by the money deposited by other customers. Thus, the commercial bank owes interest to the depositor for the money deposited for a time period. This is usually the interest on the depositor's money that is credited by the banks on a quarterly basis. The bank also profits if it charges the borrower more interest and pays a low interest to the depositor.

In this chapter, we will derive...

Breaking down the functions of a bank

Within a bank, as an intermediary between those with excess money (the depositors) and those who need money (the borrowers), there are two important questions that need to be answered:

  • How risky is a borrower?
  • What is the funding cost of money?

These are the two important questions that need to be considered before we look at the profit required for sustaining the business operations in order to cover its running costs.

When these decisions are not made properly, it threatens the viability of a bank. There could be two possible outcomes in such instances:

  • If the bank does not make enough profit to cover the cost of risk and operations when a risky event occurs, the bank could collapse.
  • If the bank fails to meet the depositor's requirements or fails to honor its borrower's agreements to lend, it hurts the credibility of the bank, thus driving potential...

AI modeling techniques

Now that we've understood the functions of a business, it's time to move onto some technical concepts. In this section, we will learn about AI modeling techniques, including Monte Carlo simulation, the logistic regression model, decision trees, and neural networks.

Monte Carlo simulation

Monte Carlo simulation uses heavy computation to predict the behavior of objects by assuming random movements that can be described by probability. This approach is a standard tool that's used to study the movements of molecules in physics, which can only be predicted with a certainty of the movement pattern, which is described by probability.

Finance professionals adopt this method to describe the pricing movement of securities. We will use it to simulate pricing in the Funding the loan using reinforcement learning section, later in this chapter.

The logistic regression model

The logistic regression model is one of...

Metrics of model performance

When we build an AI model, the most important aspect of the process is to define a way to measure the performance of a model. This enables the data scientist to decide how to improve and pick the best model.

In this section, we will learn about three common metrics that are commonly used in the industry to assess the performance of the AI model.

Metric 1 – ROC curve

The Receiver Operating Characteristic (ROC) metric measures how well the classifier performs its classification job versus a randomized classifier. The classifier that's used in this metric is a binary classifier. The binary classifier classifies the given set of data into two groups on the basis of a predefined classification rule.

This is linked to a situation where, say, we compare this model against flipping a fair coin to classify the company as being default or non-default, with heads indicating default and tails indicating non-default....

Building a bankruptcy risk prediction model

The bank, as the lender, needs to dictate the interest rates that will cover the cost of lending. The bank provides the interest rate by considering its cost of borrowing from others, plus the risk that the company might file for bankruptcy after taking the loan from the bank.

In this example, we shall assume the role of a banker to assess the probability of the borrowers becoming bankrupt. The data for this has been obtained from data.world (https://data.world), which provides us with the data for the bankruptcy predictions for different companies. The data available at this link was collected from the Emerging Markets Information Services (EMIS). The EMIS database has information about the emerging markets in the world.

EMIS analyzed bankrupt companies for the period 2000-2012 and operating companies for the period 2007-2013. After the data was collected, five classifications were made based on the forecasting period...

Funding a loan using reinforcement learning

Assuming that our role is the head of the bank, it becomes important to figure out the cost of funding the loan. The problem we are solving is comprised of three parties (or as we call them, agents)—the bank, depositors, and borrowers. To begin with, we assume that there is only one bank but many depositors and borrowers. The depositors and borrowers will be created through randomized generated data.

When it comes to simulating different behaviors for these parties in machine learning, each of these is called an agent or an instance of an object. We need to create thousands of agents, with some being depositors, some being borrowers, one being a bank, and one being a market. These represent the collective behavior of competing banks. Next, we will describe the behavior of each type of agent.

Let's say we assume the role of treasurer of the bank or head of the treasury. The job of the head of the treasury is...

Summary

In this chapter, we learned about different AI modeling techniques through two examples—the first with regard to predicting the chances of the borrower going bankrupt and the other with regard to figuring out the funding for the loan. We also learned about reinforcement learning in this chapter. Other artificial intelligence techniques, including deep learning, neural networks, the logistic regression model, decision trees, and Monte Carlo simulation were also covered. We also learned about the business functions of the bank in the context of the examples provided in this chapter.

In the next chapter, we will continue to learn about more AI modeling techniques. We will learn about the linear optimization and linear regression models and use them to solve problems regarding investment banking. We will also learn how AI techniques can become instrumental in mechanizing capital market decisions.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Artificial Intelligence for Banking
Published in: Jul 2020Publisher: PacktISBN-13: 9781788830782
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Jeffrey Ng

Jeffrey Ng, CFA, works at Ping An OneConnect Bank (Hong Kong) Limited as Head of FinTech Solutions. His mandate is to advance the use of AI in banking and financial ecosystems. Prior to this, he headed up the data lab of BNP Paribas Asia Pacific, which constructed an AI and data analytics solution for business, and was the vice-chair of the French Chamber of Commerce's FinTech Committee in Hong Kong. In 2010, as one of the pioneers in applying client analytics to investment banking, he built the analytics team for the bank. He has undertaken AI projects in retail and commercial banks with PwC Consulting and GE Money. He graduated from Hong Kong Polytechnic University in computing and management and holds an MBA in finance from the Chinese University of Hong Kong.
Read more about Jeffrey Ng

author image
Subhash Shah

Subhash Shah is an experienced solution architect. With 14 years of experience in software development, he works as an independent technical consultant now. He is an advocate of open source development and its utilization in solving critical business problems. His interests include Microservices architecture, Enterprise solutions, Machine Learning, Integrations and Databases. He is an admirer of quality code and test-driven development (TDD). His technical skills include translating business requirements into scalable architecture and designing sustainable solutions. He is a co-author of Hands-On High Performance with Spring 5, Hands-On AI for Banking and MySQL 8 Administrator's Guide. He has also been a technical reviewer for other books.
Read more about Subhash Shah