Back to News and Blogs

Deep Treasury: asset & liability management powered by deep learning.

21

February

24

Finance
AI

When we established Science Card in 2022, we knew that we were building something new and probably very different to what people are used to. Our mission of bridging science and finance to build a sustainable future wasn’t one that had been attempted before — and we knew that to succeed in our mission, we needed to innovate with technology in order to win.

One of the main areas where we saw technology shaking up traditional players was by applying AI to our treasury engine. The potential of AI in treasury is massive. It can optimise risk and cost to a degree not seen before in banking.

One of the core functions of any bank is to manage the risks behind offering disparate deposit and loan products (in particular, the risks beyond the most obvious one, credit risk), whilst also being able to use its capital (liabilities and equity) to generate a return from low-risk investments (for example, in government bonds). Deposits, loans, and investments all have different maturities, and these mismatches expose a bank to interest rate risk, duration risk and liquidity risk. Managing this risk is the art — and science — of asset & liability management (ALM): both a core function of banking, and, if done correctly, a potentially powerful source of enhanced revenue.

With our heritage in AI, we felt that ALM was ripe for the application of deep learning. Here’s how we’ve set about building our own deep learning-driven in-house treasury: Deep Treasury. 

The problem: solving maturity mismatch is a very complex mathematical challenge. 

Many established banks have failed to properly manage the maturity mismatch  of their assets and liabilities, and there’s every likelihood that others will fail in the future. Two prominent examples of banks brought down by their failure to manage their asset/liability maturities are Silicon Valley Bank in 2022, and Northern Rock in 2007. Part of the reason for the failure to manage an asset/liability position is the plethora of systems that a traditional bank uses to manage its different products, risk assessments and financial controls, often delivered to spreadsheets to produce the position.

How could we, as a new entrant to the market, set out to do it better? How could we apply new technology to banks’ age-old problem of reducing interest rate risk, duration risk and liquidity risk? 

We turned to a number of renowned mathematicians to get their view on how to apply deep learning to the problem. Consistently, they saw this as a mathematical challenge tailor-made for the way that deep learning functions - as deep learning is far better at mastering hidden and unknown patterns, it can deliver higher degrees of stability and performance than conventional methods .

We took the advice. We reviewed what’s already been done in deep learning to solve the asset & liability management problem [1,2,3,4,5] and then we started building the foundation of the first commercial bank running with a deep learning-driven asset & liability management system at scale.

We’re calling the asset & liability management system we’re building Deep Treasury. The following sections describe our findings and approach to the system we’re building.

  1. Deep treasury for banks
  2. Deep replication of a runoff portfolio
  3. The Principles of Banking
  4. Asset Liability Management Optimisation: A Practitioner's Guide to Balance Sheet Management and Remodelling
  5. Asset-Liability and Liquidity Management 

The environment: balance sheets, banks’ actions, and regulatory constraints

To build a deep learning model, we have to look at all the elements of a balance sheet, the decisions a bank is required to make, and its numerous regulatory constraints. 

Balance sheet items

  • Cash and cash equivalents
    These are all highly liquid assets of the bank. Cash positions change when loans are issued or paid out, deposits are received or withdrawn and operating costs are settled. Cash can be raised with various forms of capital raising such as bond issues, interbank loans, equity issues or other such instruments, or reduced with additional bond investing. Cash has a maturity of zero.

  • Loans
    We distinguish between mortgages (secured) and the various loan types (unsecured) banks make to their customers. New loans are driven by demand. A loan portfolio can have fixed or variable maturity dates (the duration).

  • Investments
    For the purpose of this illustration, we assume banks can only invest in high-grade bonds, and that these will have different maturities. For simplicity, we can assume bonds are held to maturity.

  • Deposits
    There are two types of deposits: overnight/non-maturing (instant withdrawal) deposits, and term deposits. Term deposits have a contractual maturity date; non-maturing deposits are able to be withdrawn without notice. Customers can withdraw money whenever they want, however, although in ordinary circumstances it is unlikely that all deposits will be withdrawn at once, when confidence in a bank falls, a run on deposits can cause its downfall.

  • Borrowing
    Our model assumes that a bank can only raise additional funds by issuing bonds and new equity, and raising additional interbank loans which are held to maturity.

  • Equity
    The bank’s equity capital is boosted by any retained profits and depleted by any losses that are made.

Cash and cash equivalents, loans and investments are assets. Deposits and borrowings are liabilities. Equity constituent parts are long-term liabilities that can be leveraged to support the assets in the portfolio.

A bank’s objective, and its actions to reach it.

Objective


A bank’s primary objective is to increase its return on equity. In the case of Science Card we also aim to optimise the return we make on our equity, as that generates higher value contributions from us into scientific research projects.

Actions

To increase their return on equity, a bank has to make certain important risk decisions. For simplicity, we reduce these decisions to two: 1) where to invest and 2) what to borrow. Deposits and loans are assumed to be customer demand-driven.

Regulatory constraints

We highlight here three regulatory constraints imposed by Basel III.

Leverage constraint
To limit leverage, a bank’s capital is divided into different tiers. We simplify it here into a single leverage constraint on the ratio between equity and risk-weighted assets (RWA). RWA determine the minimum capital a bank must hold in relation to the risk profile of its lending activities.

For simplicity, we need to comply with:

Liquidity constraints
To monitor liquidity risk two ratios are to be monitored (actual ratios and timeframes vary by regulator):

  • Liquidity Coverage Ratio (LCR): LCR ensures the bank has enough liquidity to cover the net cash outflow during a 30 day stress test. Outflow can be assumed as a linear combination of outstanding deposits and financing. High-quality liquid assets (HQLA) must exceed 30 days net outflow (30DNO) by a minimum buffer of 5%. 

  • Net stable funding ratio (NSFR): NSFR aims to enforce liquidity over a longer horizon. It is the ratio between available stable funding (ASF) and required stable funding (RSF)
  • Firms are obliged to meet or exceed the buffer as well,

Interest rate sensitivity
Interest rate sensitivity (IRS) has restrictions applied to it. This one is a bit more complicated. One calculation is for the bank’s equity’s (E) sensitivity towards a parallel shift of the yield curve by +- 100 bps. 

Read on to see how these constraints can be incorporated into a deep learning model designed to optimise a bank’s equity return.

A framework for a deep learning asset & liability management model

We build a deep learning model with the rule set highlighted above by defining a target return, penalties, loss functions, the architecture, the input data, training and finally, running the model:

Target return
For a deep learning model, we need a minimisation problem. To achieve this, we can define a target return μ (e.g. μ = 10%).

Then, we can write a simple loss function:

Penalties
The bank aims to maximise its return on equity while adhering to constraints. We encode this in the loss function by penalising any violation of one of the five constrained quantities.

We make penalties as 

For example:

And formulate a penalty loss function

Loss function
For the final loss function, we combine the target return loss and penalty loss so we are optimising equity growth while complying with regulatory constraints.

Input data

The input data of our deep learning model are:

  • Loans including mortgages and loans to customers
  • Cash and cash equivalents
  • Non-maturing (overnight) deposits
  • Term deposits
  • Maturity dates
  • Liabilities with their terms
  • Investments at current time
  • Borrowings at current time
  • Yield curves

Output data

The output of our model will be the bank’s only controllable variables:

  • Investments for the next period
  • Borrowings for the next period

Architecture

We build a deep learning architecture to optimise investments and borrowing for the next period. We do this by feeding the time series of our input data into a 3D matrix. The 3D matrix goes through a standard neural network consisting of pooling, convolutions, and dense and soft-max. The output of the model is investments and borrowings for the next period. Note this is a very simplified version and only for demonstration.

Figure 1: Simplified architecture for display of our deep ALM model

Training
Now we train the millions of parameters in the neural network to be able to predict the optimal investment and borrowing decisions, which includes target returns and penalties from capital constraints. We train the model with 5 years of historical data. One of the secret sauces of a successful deep learning model is how to set up the training, so to keep our IP protected we will keep this section short. Remember to be careful to not test on your training set! 

Figure 2 shows the concept of training a neural network by minimising the loss function.

Figure 2: Concept of optimising a loss function with training [1].

[1] Pramoditha, R. Overview of a Neural Network’s Learning Process. Data Science 365. Available online: https://medium.com/data-science-365/overview-of-a-neural-networks-learning-process-61690a502fa

Use the model in real time
Once we are confident with the neural network and trust its output prediction. We can feed in real-time the evolving data such as loans, deposits, yield curves and our latest investment and borrowing decisions, to receive at an interval of our choice a new predicted optimal investment and borrowing portfolio for the next period. The next period can be 1 day or up to 1 month.

Important note: The final decision on where to invest will be made by the bank’s treasury team, and the Deep Treasury model will serve as an AI advisor to them. Its strength lies in its being able to identify patterns that are hard to detect with conventional models. In this way it gives a treasury team an advantage compared to other banks - resulting in higher profitability, lower interest rate and liquidity risk and, consequently, in the case of Science Card, a shorter path to profitability.

In risk management, the stakes are high

Asset & liability management is a core function: in essence, a bank’s expertise lies in dealing with maturity mismatches between assets and liabilities. If managed efficiently, it enables the bank to provide an extraordinary service worth paying for. If done poorly, the price is very high, and customers risk losing their funds (or everything above the protected value). The most recent example is Silicon Valley Bank. Thankfully customer funds were rescued, however SVB’s poor maturity mismatch and liquidity management led to the downfall of a reputable bank within only a few days, due to a run on its deposits.

AI brings a new dimension to banking

Having a deep learning-based asset & liability management system gives a bank a significant advantage in the market. 

However, building a deep ALM system comes with many challenges, common to many deep learning environments, such as:

  • Sourcing data from disparate risk-management systems
  • Having enough data for training
  • Avoiding overfitting
  • Adapting the model to new economic regimes.

However, the benefits of a deep learning ALM system are vast and worth mastering the challenges for. 

The main benefits are:

  • Reduced interest rate risk and liquidity risk, resulting in a reduced risk of a systematic bank failure.
  • Higher balance sheet efficiency, potentially resulting in massive cost reduction, which means a much shorter path to profitability.
  • Increased consumer confidence.

Here at Science Card we also see an opportunity to spin off products from a deep learning ALM model, making the technology available to our customers. Deep Treasury spin-offs that we are working on include:

  • Access to accurate cashflow predictions and AI-driven savings vaults for personal customers
  • Cashflow predictions and a deep learning-assisted interest rate risk and liquidity risk monitoring and prediction tool that will greatly benefit business customers.

At Science Card, we are building one of the first deep learning-assisted banks to come to market. We look forward to our stakeholders enjoying the technology we are so passionate about and benefiting from the impact we create together.