Using artificial neural networks to solve banks’ problems

You’ve probably heard stories of your great-great-great-grandma storing stacks of cash under her bed or in some safe “cleverly” hidden behind a painting on the wall of her house back in the day. What would happen if an unwanted guest broke into her house? They would be able to take all of grandmas life savings in one fell swoop! That would not be a good situation for grandma, and it would be in her best interest to keep her money in a bank instead.

Unlike grandma, people who store their money in banks don’t have to worry about robbers breaking into their houses and stealing their life fortunes. Banks certainly provide a valuable service to their customers and frequently help people like grandma by keeping their money safe. However, as much as banks are able to help all of us, we might actually be able to help them!

Why should you care about banks?

Banks increase the flow of money in the economy. When you deposit money into a bank, the money doesn’t just sit there until you decide to withdraw it. Instead, the bank loans out this money to other people who need it. They can then spend this money, which stimulates the economy.

Here’s an example of the money flow brought about by a bank

Banks are important institutions to keep the economy running smoothly. Without them, we would have minimal financial security as our money could be stolen or destroyed at any time. Furthermore, the economy would be significantly worse off without them.

How do banks earn money?

Banks earn money by charging interest on the loans that they give out. Unfortunately, loans aren’t just banks giving out free money to people (wouldn’t that be nice). When you take a loan out of a bank, you have to pay back the amount of money you borrowed plus a small upcharge. You can make this payment incrementally over the following years. The small upcharge that you have to pay to the bank is called interest, and this is where banks earn the majority of their profits.

That being said, banks are not perfectly safe businesses which always steadily earn money. There are risks in running a bank.

What could possibly go wrong?

If too many people withdraw money at the same time, and the bank has given away too much of its money through loans, it will not have enough to provide money to the people withdrawing. In such a situation, the bank can go bankrupt. In some cases, these situations have happened in banks all across the country, leading to confusion and an economic downturn.

The situation described above is almost exactly what happened during the famous housing market crash of 2008. Banks were giving out too many loans to people for the purpose of buying houses (this kind of loan is called a mortgage). Due to the poor screening done by the banks, many of the people who recieved loans were unable to pay the bank back and the banks began to lose money.

When people caught wind of this, people all across the country tried to withdraw money from the banks. Due to this mass withdrawal, many banks were unnable to pay back their customers since they had loaned away all of their money and many banks went bankrupt (mind the pun).

How can we avoid this?

If only there was a way to predict how likely customers are to keep their money with a bank versus taking all their money out and leaving the bank. Banks would be able to use this information to gauge how much they could loan. If a bank knew that certain customers were likely to withdraw their money and leave the bank, the bank could save enough money to give to these customers and then loan out the rest. This would help banks to avoid problematic situations.

Luckily for banks, there is a way to predict this statistic. We can use artificial intelligence to train an algorithm which will then predict if customers are likely to remain with a bank or withdraw all their money and leave. More specifically, we can use something called an artificial neural network (ANN) to make this prediction.

My project: creating the artificial neural network.

What is an ANN?

In short, ANNs are designed to make certain predictions based on the data that they are given. They take the data as inputs and then attempt to make a prediction about the data as an output.

In the diagram of an ANN below, each circle represents a neuron, and each column of circles represents a layer. The lines connecting all of the neurons together are called weights. The weights are what connect different data points and determine the correlation between different factors in the problem. Having accurate weights is one of the most important differentiators between a functional neural network and a fancy math equation that spits out random numbers.

This is what an artificial neural network looks like.

Initially, data is fed into the input layer. It is then passed into the hidden layers, which is where all the magic happens. In this section, the data is interpreted by the neural network and correlations are made between the data and the predictions. Finally, the neural network makes a prediction about the data and feeds it into the output layer. The value in the output layer will be the prediction that the neural network has made.

If you want to learn more about how ANNs work on a technical level, here is a great video.

Using ANNs to analyze bank customer data.

Implementation of the ANN

I personally decided to create my ANN using a programming language called Python. After some training and testing, my neural network was able to make predictions about bank customers with ~85% accuracy! If one person is able to make an algorithm with that accuracy, imagine how accurate of an algorithm an entire team of people could make and how much value this would contribute to banks!

Checkout my ANN!

You may be wondering how my program actually works or if you could make something similar yourself. Check out my code complete with a detailed description of how everything actually works HERE

Key Takeaways

  • Banks earn money by taking a small upcharge on the money they loan to people. This upcharge is known as interest.
  • Banks can get into trouble if they loan out too much money and customers want to withdraw money
  • We can use an artificial neural network to predict whether customers are likely to keep their money with a bank or withdraw their money and leave a bank. This would help banks out as they would be able to determine how much money they should be loaning out.
  • ANNs are algorithms that attempt to simulate the function of the human brain to make correlations between data points and make predictions. We can use them, in this case, to help out banks.

Wait… don’t click away yet!

If you enjoyed learning about this topic or are interested in modern technologies and artificial intelligence, make sure to: