Jupiter AI Labs

Artificial Intelligence and Finance Convergence

Artificial Intelligence (AI) has been a real game-changer in the past decade, especially in the field of finance. The conventional ‘data-driven’ approach which relied upon human judgment for formulating business decisions has now been replaced by an AI-driven approach that employs state of the art Machine Learning (ML) algorithms making major business decisions. AI has brought about a great technological leap, where we now have large cloud-based processing options that can examine billions of data points in a matter of seconds to give us insights about certain trends present in the data, and also predict future patterns. Certain fields where the power of AI is being harnessed in relation to finance, along with their particular optimization problems, are as follows –

  1. Credit Decisions

 

Credit scoring is the analysis done by financial institutions to find out the ‘creditworthiness’ of a person. The creditworthiness of a person refers to their ability to borrow money predicting the likelihood that they will pay back the loan. Higher the credit score of a person, the more credit-worthy they are.

Earlier, these decisions were made by bank officials based on the payment history, the current debt, and the type and length of credit asked for by the customer. With the advancement in technology, ML algorithms are being utilized to create rule-based credit scoring systems that allow the financial institutions to figure out which potential borrowers (who are the end-users of the system) are actually creditworthy or not, and also the maximum credit limit allowed to the borrower.

 

This is treated as a classification problem with two output variables – yes (allow the customer to borrow money) and no (customer is not credit-worthy). Many ML algorithms like Decision Trees, Random Forests, Support Vector Machines (SVM), Gradient Boosting, Deep Neural Networks (DNN) can be employed for creating this classification system.

 

The data features taken by the system as input consists of various attributes of the customer like their age, gender, annual/monthly income, general expenditure, their assets, past transactional data, etc. These independent variables can be referred to as X (X1, X2, …., Xn). The final output (O) is a credit score that is converted into a “yes” if it is above a certain threshold, otherwise into a “no”.

 

For instance, we can create a simple decision tree that takes in the above-mentioned data features as input, and each leaf of the tree is a possible outcome (grant credit – yes or no). Each node in the tree (except the leaf nodes) represent a particular condition being checked at every stage. Entropy or Gini index may be used to find out which attribute to split the data on.

 

Entropy =       and      Gini Index =

where, pi = proportion of data samples belonging to class i.

 

One attribute is selected at each step for splitting the data and creates the condition at that step. Simply tracing down all the paths from the root to the desired outcome (Oi = ‘yes’ for credit decision) will give us a combination of rules that indicate the decision-making process.

 

For instance, we can create sample conditions

C1 = (X1< Income threshold) AND (X2< Expenditure threshold)

C2 = (X1>= Income threshold) AND (X3>= Assets threshold)

.

.

Cm = (X1>= Income threshold) AND (X3< Assets threshold) AND (X4 = Female)

 

Finally, Oi(yes) = C1OR C2OR … OR Cm

 

Certain issues like ‘explainability’ and ‘fairness’ must be addressed while creating such systems. As we move towards more and more complex algorithms (such as DNNs which are essentially considered to be a “black-box”), even though we may get more accurate and better results, the explainability of such models decreases, and these are thus not favoured for industry use. We also need to ensure that the developed system is fair and free from human biases and cognitive errors. These systems need to be created in such a way that they are fair (giving an equal advantage to all) and unbiased (not favouring any particular group of people because of protected attributes like age, race, nationality, etc.).

 2. Fraud Prevention

 

Financial institutes are constantly battling against various types of fraudulent activities like money laundering, terrorism financing, identity theft, etc. One of the most frequently occurring fraudulent activities is credit card fraud – causing a worldwide loss of $25 billion (in 2018). These institutes, therefore, spend enormous amounts of resources for the development of fraud detection systems and also act as the end-users of these systems.

Traditional approaches for identifying such activities included manual rule-based solutions with only limited data being referred to at a given time. State of the art systems have been created that enable high volumes of transactional and customer data to be analyzed. This data may include a person’s general purchasing habits, past purchase behaviour, location, etc. These data features can be represented as X (X1, X2, …., Xn). Patterns are formalized and any abnormal activity is flagged by the system. Furthermore, ML has enabled these systems to discover new unknown patterns, tackling the innovative tactics that may be employed by fraudsters.

 

Many supervised and unsupervised ML algorithms have been employed to create fraud detection systems. Supervised algorithms study labeled past data and identify patterns from that data. Logistic Regression is used to build simple classifiers that study the strength of cause and effect relationship between variables, and determine whether a particular transaction is “good” or not. Decision Trees and Random Forests are used to create rule-based classifiers that study the customer’s behaviour to identify abnormalities. Even complex algorithms like DNNs can be used, but explainability and fairness must be considered here also.

 

For instance, a simple logistic regression algorithm may take all the above-mentioned data features and represent them as –

O = b0 + b1X1 +b2X2 + … + bnXn

 

            where b0… bnare weights associated with each feature including a bias.

 

            The probability that fraud occurs can be represented by p, where

           

          

 

The value of p over a certain threshold can be mapped to outcome O as fraud is detected.

Unsupervised ML algorithms take unlabelled data and are used to uncover new anomalies or patterns of interest. K-Means, One-Class SVM, Local Outlier Factor, are all unsupervised algorithms that assign data points into regions of similar density (clusters), and any points that lie outside these regions are flagged as anomalies.

  3. Trading

 

AI has supported the development of Intelligent Trading Systems that monitor and analyze past market data along with real-time news to make smart trading decisions. These systems make it easier to buy and sell at the best prices, forecast future market trends accurately, and also efficiently mitigate risks to ensure a higher return on investments. These activities end up enhancing the value of a person’s (or organization’s) portfolio.

Individual traders or even organizations can be the end-users of such systems. Large organizations even perform high-frequency trading that involves complex algorithms running on large powerful computers, executing a large number of transactions within seconds. Predicting the trend is treated as a regression problem where we wish to predict the price of a particular stock at a point in the future. Basic data features used for input to the ML algorithm include opening and closing prices, highest and lowest prices, the volume traded over a certain period. These features may be extracted and combined to form other technical indicators such as Bollinger Bands, Relative Strength Index, Moving Average Convergence/Divergence, etc. The combination of all these data features can be represented as X (X1, X2, …., Xn).

 

Generally, supervised learning algorithms like Linear or Logistic Regression, SVM, K-Nearest Neighbours, Decision Trees are used to create stock price predictors. DNNs are also used extensively and have given amazing performance but significantly enhance the complexity of the system as well.

 

For instance, if we use SVM Regressor to predict stock price on the basis of the input features mentioned above, the output hyperplane O can be represented as –

O = b + W1X1 +W2X2 + … + WnXn       or       O = WX + b

 

            where W1 …Wnare weights associated with each feature including a bias b.

           

Next, we assume two decision boundaries at a distance ε from the desired hyperplane, and try to find the best hyperplane for the data constrained as –

                                                -ε < O – (WX + b) < ε

  4. Personalized Banking

 

Banks have nearly perfected the art of micro-targeting their customers with a range of products and services that precisely meet their requirements. Examples of these could be credit/debit cards, different types of bank accounts (savings, current, Demat), and even various types of occasion-specific loans.

AI has completely changed how financial institutions interact with their customers (who are the end-users of the AI systems developed by the financial institute). Nearly all major financial institutes now provide a mobile app to its customers which consists of chatbots or voice-enabled smart assistants for simpler client interaction (and to reduce the number of customer care representatives). DNNs, along with their advanced variations – LSTMs, Transformers, etc., are the most commonly used ML techniques used for creating chatbots. These are supervised algorithms that take dialogue data (a combination of contexts and their respective replies) as input, and then generate new replies as they interact with a user. Current user interaction data is also stored and can be used for retraining the model at a later date.

Furthermore, they also have recommender systems that recommend the kind of services and products (e.g. a credit card or a particular type of bank account) that the system feels is best suited for a customer’s need. These systems can be of two types –

  • Collaborative Filtering Systems: These types of systems take the past transactional data of different users and make future predictions about whether a particular customer would buy a product based on this data. A utility matrix in which each row represents a user and each column represents a product is used for this purpose. Each cell (i,j) of this matrix represents a score about how much user i prefers the product j (there are a lot of null values also). Cosine similarity is commonly used to find similarity between 2 users A and B to recommend them new products –

Cosine Similarity (A, B) =

K Nearest Neighbours is a commonly used algorithm for recommending products to a new user who joins the system.

  • Content-Based Systems: These types of systems create a user profile for each user which consists of certain attributes of various products that the user likes or dislikes. New products are recommended by getting a similarity score for the product with each user profile. Term Frequency – Inverse Document Frequency (TF-IDF) and the Vector Space Model are popular approaches towards building these types of recommender systems.

This can be calculated as –

tf(t,d) = term frequency =

df(t) = number of documents that contain term t

idf (t) = log(N/df (t))    where N = total number of documents

tfidf (t, d, N) = tf (t, d) * idf (t)

Post system-development activities

 

After the AI-based solution is created, it is important to check the performance of the system on new untested data. There are various performance metrics such as precision, recall, f-measure, AUC, etc. that tell us how good the model is. Different business objectives discussed above will select different metrics to analyze their model performance.

One important skill for all data scientists to have is the ability to communicate the results of their created model to the upper management, the regulators, and the various stakeholders of the system. The key to doing this is to keep things as simple as possible and describing the problem statement, along with the approach used in layman terms. Explainability of ML algorithms is a big concern (for instance, no one is likely to understand the mechanism behind DNNs). Using various visual graphical tools such as performance graphs, box plots, etc. goes a long way in helping the decision-makers understand the effectiveness of the system, and adopt the system for actual practice.

However, it is commonly observed that the performance of AI systems deteriorates with time. This concept is called ‘drift’ and it occurs because data is the key driver for any AI-based solution. With time, the data on which the system has been trained does not reflect the actual market scenario, and hence the model needs to be refreshed with the new data that is coming in every day to keep getting accurate predictions.

For knowing when refreshing is required, monitoring the model performance is necessary. The most commonly employed strategy used in industry is to set a certain minimum threshold value for the desired metric, and when the model performance drops below that threshold, it is time to refresh the model. Another strategy is to define a timeframe (a week or a month) after which refreshment is done. The most common approaches to refreshing a model are –

  • Re-training the model with new data (which has been gathered while the model was performing good).
  • Adding more features to data that help in creating a better, more solid, model.

A new approach for model refreshment, called ‘Continuous Learning’ is also gaining traction these days. This is an automated process that saves new training data as the model processes it. When there is enough new data, its accuracy is tested against the current model. As the model performance is seen to deteriorate, it automatically incorporates this new data for re-training the model.

We have seen tremendous advancement in the AI field with more and more complex algorithms being invented every day that can tackle new, unprecedented challenges. However, this is just the beginning and AI is only expected to only become more prevalent in the future.

 

References

 

  1. Barasch, R. (n.d.). Five Use Cases for AI in Finance. Retrieved August 03, 2020, from https://www.yodlee.com/fintech/five-use-cases-for-artificial-intelligence-in-finance
  2. Bachinskiy, A. (2019, April 19). The Growing Impact of AI in Financial Services: Six Examples. Retrieved August 03, 2020, from https://towardsdatascience.com/the-growing-impact-of-ai-in-financial-services-six-examples-da386c0301b2
  3. Colson, E. (2020, April 02). What AI-Driven Decision Making Looks Like. Retrieved August 03, 2020, from https://hbr.org/2019/07/what-ai-driven-decision-making-looks-like
  4. Rao, A., &Golbin, I. (2019, April 12). What is fair when it comes to AI bias? Retrieved August 03, 2020, from https://www.strategy-business.com/article/What-is-fair-when-it-comes-to-AI-bias?gko=827c0
  5. Milosheska, E. (2020, June 17). Artificial Intelligence in Finance. Retrieved August 03, 2020, from https://medium.com/raison-ai/artificial-intelligence-in-finance-fd3bce6cd13a
  6. Kenton, W. (2020, June 23). Credit Scoring. Retrieved August 03, 2020, from https://www.investopedia.com/terms/c/credit_scoring.asp
  7. Rehfisch-, -. (2019, October 28). AI: Smarter Credit Processes Thanks to Artificial Intelligence. Retrieved August 03, 2020, from https://www.knowis.com/blog/smarter-credit-processes-thanks-to-artificial-intelligence
  8. (2018, January 12). Application of Machine Learning Techniques to Trading. Retrieved August 03, 2020, from https://medium.com/auquan/https-medium-com-auquan-machine-learning-techniques-trading-b7120cee4f05
  9. Tyurin, A. (2020, March 08). Machine Learning for Day Trading. Retrieved August 04, 2020, from https://towardsdatascience.com/machine-learning-for-day-trading-27c08274df54
  10. Dyzma, M. (2019, May 15). Fraud Detection with Machine Learning: How Banks and Financial Institutions Leverage AI. Retrieved August 04, 2020, from https://www.netguru.com/blog/fraud-detection-with-machine-learning-banking
  11. Kostadinov, S. (2019, October 21). My Analysis from 50+ papers on the Application of ML in Credit Lending. Retrieved August 04, 2020, from https://towardsdatascience.com/my-analysis-from-50-papers-on-the-application-of-ml-in-credit-lending-b9b810a3f38
  12. Persiyanov, D. (2017, September 12). Chatbots with Machine Learning: Building Neural Conversational Agents. Retrieved August 05, 2020, from https://blog.statsbot.co/chatbots-machine-learning-e83698b1a91e
  13. Seif, G. (2019). An Easy Introduction to Machine Learning Recommender Systems. Retrieved August 05, 2020, from https://www.kdnuggets.com/2019/09/machine-learning-recommender-systems.html
  14. Gonfalonieri, A. (2019, July 25). Why Machine Learning Models Degrade In Production. Retrieved August 05, 2020, from https://towardsdatascience.com/why-machine-learning-models-degrade-in-production-d0f2108e9214

Shao, C. (2018, July 17). A Data Scientist’s Guide to Communicating Results. Retrieved August 05, 2020, from https://medium.com/comet-ml/a-data-scientists-guide-to-communicating-results-c79a5ef3e9f1

wpChatIcon
wpChatIcon