Skip to main content

Algorithms in the Financial Services industry - The right choice for the right problem


The ultimate goal of every software product is to convert inputs(provided by end-users or automatically received from external systems) into valuable outputs (insights).

This is typically done via processing logic (= algorithms), which transform a number of inputs in a set of outputs.

Based on my experience these process-logic components can be divided into 5 categories:

  • Calculation: a calculation is a clear mathematical formula, which allows to calculate a specific value. This category can be identified by the fact that all required information is available as input and that the output is precise, i.e. there is only 1 correct result and this is perfectly repeatable. Examples are the calculation of the average price of a share in the last year, the calculation of the time-weighted rate of return of an investment portfolio, the reimbursement schedule of a credit or the interest amount to be paid out on a saving account every quarter.

  • Data lookups: a data lookup consists of retrieving a result in its raw form or in a processed form (e.g. sorted, filtered, aggregated…​) from a database. Typically this consists of a query executed to retrieve specific data. Examples are the lookup of the data of a specific customer, the retrieval of all customer transactions of last months in descending order of transaction amount or the number of customers and total transaction amount generated last year grouped by customer country.

  • Expert systems: these are trees of (nested) "If-Then-Else" clauses (or similar conditional logic), resulting in a workflow, flowchart or decision tree. This means the algorithm will check one or more conditions to determine which path in the business logic needs to be taken (i.e. in order to determine the next step). Examples are decision rules to determine which type of analysis is required for a credit file, fraud and AML protection rules in the payments domain…​

  • Optimization problems: these are mathematical calculations with, in principle, only 1 solution, but it is often impossible (or too complex or too resource/time consuming) to know if the perfect solution is obtained. Usually these algorithms work with a cost function which needs to be optimized, but it is difficult to know if a local minimum or the absolute minimum is reached. Nonetheless all rules are clearly defined and given enough processing (calculation) power an exact result can be obtained. Examples are resource scheduling problems, portfolio rebalancing based on number of (customer) investment constraints and recommendation lists or model portfolios…​ More info can also be found in my blog "Optimisation problems - Far from being a commodity" (https://bankloch.blogspot.com/2020/05/optimisation-problems-far-from-being.html).

  • System Identification (= SI) & Machine Learning (= ML) problems: these are problems for which it is difficult or even impossible to describe the rules of how the system (the algorithm) should behave. Instead the algorithm is setup as a black box, for which a large number of coefficients/parameters (typically elements in a matrix) are estimated by training the model. This is done by tuning these coefficients, so that they best match the test data in- and outputs provided to the model. Typical examples are fraud/AML detection, recommendation engines and engines to define the next-best-action for users, anomaly detection, speech and image recognition…​

Obviously, many algorithms are a combination of these categories. E.g. a pricing calculation engine (cfr. my blog "Calculation engines in Financial Services - A key differentiator in the business strategy" - https://bankloch.blogspot.com/2021/02/calculation-engines-in-financial.html) can combine a number of categories, e.g. * Data Lookup: to retrieve certain parameterizable values, which can be easily configured by business users (e.g. the percentage of discount granted for specific credit types), but also to retrieve data required to feed the engine (like e.g. the segmentation of the customer) * Expert system: set of rules to decide which pricing regime should be applied * Calculation: obviously a number of calculations need to be applied, like calculating the price based on different factors (e.g. apply a percentage on the transaction amount), applying minimum and maximum thresholds…​ * SI & ML: allow to setup dynamic pricing models, which evolve automatically based on whether customers accepted or not products at a proposed price.

When defining business logic (or an algorithm) it is important to choose the right category (or right combination of categories).
This is typically a compromise between:

  • Flexibility to change the behavior of the algorithm

  • Operational Complexity to explain/understand a result, but also to validate if the algorithm behaves as expected

  • Implementation Complexity, i.e. the complexity to implement the algorithm in code form.

  • Knowledge of the rules that drives the logic and the ability to easily describe it and along with it the number of factors to take into account

For example: an algorithm of type "calculation" is very little flexible and requires a very precise knowledge and description of all governing rules, but once defined it is typically easy to explain a result and to test it. Given that a certain set of inputs will always lead to the same output(s), it is also easy to setup automated regression tests.
On the other hand an algorithm of type "SI & ML" can be very flexible (often it will even adapt itself automatically) and requires less knowledge of the associated rules, but it is often impossible to explain/understand a result and it is nearly impossible to fully validate the algorithm, i.e. to ensure that the algorithm will not give very bad results in certain edge cases.

The implementation of every category of algorithm is furthermore supported by specific implementation software, i.e.

  • Calculation: hundreds of (often open source) mathematical libraries exist to calculate any type of result (e.g. libraries with statistical formulas or libraries with financial calculations)

  • Data lookup: SQL is the standard for interacting with a database, but often all kinds of abstraction layers have been built on top of this to support more easy complex data lookups, like Hibernate, QueryDSL, jOOQ, Spring Data…​

  • Expert systems: obviously every programming language supports If-Then-Else and Case clauses, but there are also hundreds of abstraction layer, helping to implement these type of algorithms, like BPMS systems (like TIBCO ActiveMatrix BPM, IBM BPM, Oracle BPM, Camunda BPM, jBPM…​), Workflow systems (like Nintex, Zapier, ProcessMaker…​) and Business Rule engines (like Kissflow Process, IBM Operational Decision Manager, Drools, Red Hat Decision Manager - formerly JBoss BRMS), Progress Corticon Business Rules Engine, SAS Business Rules Manager, Hyperon…​)

  • Optimization problems: this is still a bit of an unexplored and immature domain, with little (user-friendly) tooling available, like I also mentioned in one of my previous blogs. Interesting names to look at are JuMP (based on Julia language), ADMB, GLPK, OpenMDAO, Motulus, OptaPlanner…​ However all those tools are still rather complex and therefore still difficult to use for non-specialized developers.

  • SI & ML: in this space TensorFlow is the most known abstraction to setup such algorithms, but obviously many alternatives exist like PyTorch, Keras, Amazon SageMaker, IBM Watson Studio…​

With the popularity of AI/ML, people try to implement many algorithms with AI/ML logic. While AI/ML is a powerful tool, it comes with a number of disadvantages as well. As such it is best to use it only when the majority of the rules to describe the relation between in- and outputs are unknown. If a part is known, it is probably better to start with other algorithm categories and potentially fine-tune the result with AI/ML.

It is important therefore to approach the categories in the order as set above, i.e. use an exact calculation if possible, otherwise use rules derived via an expert system, data lookup or optimization problem. AI/ML should be the last resort, when it is impossible to properly define the guiding business rules.
This is important, as too often people consider nowadays AI/ML as the first solution to any problem. E.g. in recommendation engines, people are pushing more and more AI/ML, while this might not always be the best idea, as a lot of rules to recommend a product are known, often there is insufficient data available to properly train the AI/ML model and being able to explain recommendations is often important as a salesperson needs to support the process or regulators require proof of certain propositions/decisions.

As always in IT, there is no silver bullet and not one solution to rule world, but instead a deliberate choice needs to be made, where pros and cons are weighted against each other, instead of surfing along on the latest buzz.

Comments

Popular posts from this blog

Transforming the insurance sector to an Open API Ecosystem

1. Introduction "Open" has recently become a new buzzword in the financial services industry, i.e.   open data, open APIs, Open Banking, Open Insurance …​, but what does this new buzzword really mean? "Open" refers to the capability of companies to expose their services to the outside world, so that   external partners or even competitors   can use these services to bring added value to their customers. This trend is made possible by the technological evolution of   open APIs (Application Programming Interfaces), which are the   digital ports making this communication possible. Together companies, interconnected through open APIs, form a true   API ecosystem , offering best-of-breed customer experience, by combining the digital services offered by multiple companies. In the   technology sector   this evolution has been ongoing for multiple years (think about the travelling sector, allowing you to book any hotel online). An excellent example of this

Are product silos in a bank inevitable?

Silo thinking   is often frowned upon in the industry. It is often a synonym for bureaucratic processes and politics and in almost every article describing the threats of new innovative Fintech players on the banking industry, the strong bank product silos are put forward as one of the main blockages why incumbent banks are not able to (quickly) react to the changing customer expectations. Customers want solutions to their problems   and do not want to be bothered about the internal organisation of their bank. Most banks are however organized by product domain (daily banking, investments and lending) and by customer segmentation (retail banking, private banking, SMEs and corporates). This division is reflected both at business and IT side and almost automatically leads to the creation of silos. It is however difficult to reorganize a bank without creating new silos or introducing other types of issues and inefficiencies. An organization is never ideal and needs to take a number of cons

RPA - The miracle solution for incumbent banks to bridge the automation gap with neo-banks?

Hypes and marketing buzz words are strongly present in the IT landscape. Often these are existing concepts, which have evolved technologically and are then renamed to a new term, as if it were a brand new technology or concept. If you want to understand and assess these new trends, it is important to   reduce the concepts to their essence and compare them with existing technologies , e.g. Integration (middleware) software   ensures that 2 separate applications or components can be integrated in an easy way. Of course, there is a huge evolution in the protocols, volumes of exchanged data, scalability, performance…​, but in essence the problem remains the same. Nonetheless, there have been multiple terms for integration software such as ETL, ESB, EAI, SOA, Service Mesh…​ Data storage software   ensures that data is stored in such a way that data is not lost and that there is some kind guaranteed consistency, maximum availability and scalability, easy retrieval and searching

IoT - Revolution or Evolution in the Financial Services Industry

1. The IoT hype We have all heard about the   "Internet of Things" (IoT)   as this revolutionary new technology, which will radically change our lives. But is it really such a revolution and will it really have an impact on the Financial Services Industry? To refresh our memory, the Internet of Things (IoT) refers to any   object , which is able to   collect data and communicate and share this information (like condition, geolocation…​)   over the internet . This communication will often occur between 2 objects (i.e. not involving any human), which is often referred to as Machine-to-Machine (M2M) communication. Well known examples are home thermostats, home security systems, fitness and health monitors, wearables…​ This all seems futuristic, but   smartphones, tablets and smartwatches   can also be considered as IoT devices. More importantly, beside these futuristic visions of IoT, the smartphone will most likely continue to be the center of the connected devi

Neobanks should find their niche to improve their profitability

The last 5 years dozens of so-called   neo- or challenger banks  (according to Exton Consulting 256 neobanks are in circulation today) have disrupted the banking landscape, by offering a fully digitized (cfr. "tech companies with a banking license"), very customer-centric, simple and fluent (e.g. possibility to become client and open an account in a few clicks) and low-cost product and service offering. While several of them are already valued at billions of euros (like Revolut, Monzo, Chime, N26, NuBank…​), very few of them are expected to be profitable in the coming years and even less are already profitable today (Accenture research shows that the average UK neobank loses $11 per user yearly). These challenger banks are typically confronted with increasing costs, while the margins generated per customer remain low (e.g. due to the offering of free products and services or above market-level saving account interest rates). While it’s obvious that disrupting the financial ma

PFM, BFM, Financial Butler, Financial Cockpit, Account Aggregator…​ - Will the cumbersome administrative tasks on your financials finally be taken over by your financial institution?

1. Introduction Personal Financial Management   (PFM) refers to the software that helps users manage their money (budget, save and spend money). Therefore, it is often also called   Digital Money Management . In other words, PFM tools   help customers make sense of their money , i.e. they help customers follow, classify, remain informed and manage their Personal Finances. Personal Finance   used to be (or still is) a time-consuming effort , where people would manually input all their income and expenses in a self-developed spreadsheet, which would gradually be extended with additional calculations. Already for more than 20 years,   several software vendors aim to give a solution to this , by providing applications, websites and/or apps. These tools were never massively adopted, since they still required a lot of manual interventions (manual input of income and expense transaction, manual mapping transactions to categories…​) and lacked an integration in the day-to-da

Can Augmented Reality make daily banking a more pleasant experience?

With the   increased competition in the financial services landscape (between banks/insurers, but also of new entrants like FinTechs and Telcos), customers are demanding and expecting a more innovative and fluent digital user experience. Unfortunately, most banks and insurers, with their product-oriented online and mobile platforms, are not known for their pleasant and fluent user experience. The   trend towards customer oriented services , like personal financial management (with functions like budget management, expense categorization, saving goals…​) and robo-advise, is already a big step in the right direction, but even then, managing financials is still considered to be a boring intangible and complex task for most people. Virtual (VR) and augmented reality (AR)   could bring a solution. These technologies provide a user experience which is   more intuitive, personalised and pleasant , as they introduce an element of   gamification   to the experience. Both VR and AR

Beyond Imagination: The Rise and Evolution of Generative AI Tools

Generative AI   has revolutionized the way we create and interact with digital content. Since the launch of Dall-E in July 2022 and ChatGPT in November 2022, the field has seen unprecedented growth. This technology, initially popularized by OpenAI’s ChatGPT, has now been embraced by major tech players like Microsoft and Google, as well as a plethora of innovative startups. These advancements offer solutions for generating a diverse range of outputs including text, images, video, audio, and other media from simple prompts. The consumer now has a vast array of options based on their specific   output needs and use cases . From generic, large-scale, multi-modal models like OpenAI’s ChatGPT and Google’s Bard to specialized solutions tailored for specific use cases and sectors like finance and legal advice, the choices are vast and varied. For instance, in the financial sector, tools like BloombergGPT ( https://www.bloomberg.com/ ), FinGPT ( https://fin-gpt.org/ ), StockGPT ( https://www.as

From app to super-app to personal assistant

In July of this year,   KBC bank   (the 2nd largest bank in Belgium) surprised many people, including many of us working in the banking industry, with their announcement that they bought the rights to   broadcast the highlights of soccer matches   in Belgium via their mobile app (a service called "Goal alert"). The days following this announcement the news was filled with experts, some of them categorizing it as a brilliant move, others claiming that KBC should better focus on its core mission. Independent of whether it is a good or bad strategic decision (the future will tell), it is clearly part of a much larger strategy of KBC to   convert their banking app into a super-app (all-in-one app) . Today you can already buy mobility tickets and cinema tickets and use other third-party services (like Monizze, eBox, PayPal…​) within the KBC app. Furthermore, end of last year, KBC announced opening up their app also to non-customers allowing them to also use these third-party servi

Eco-systems - Welcome to a new cooperating world

Last week I attended the Digital Finance Summit conference in Brussels, organized by Fintech Belgium, B-Hive, Febelfin and EBF. A central theme of the summit was the cooperation between banks and Fintechs and more in general the rise of ecosystems. In the past I have written already about this topic in my blogs about "Transforming the bank to an Open API Ecosystem ( https://www.linkedin.com/pulse/transforming-bank-open-api-ecosystem-joris-lochy/ ) and "The war for direct customer contact - Banks should fight along!" ( https://www.linkedin.com/pulse/war-direct-customer-contact-banks-should-fight-along-joris-lochy/ ), but still I was surprised about the number of initiatives taken in this domain. In my last job at The Glue, I already had the pleasure to work on several interesting cases: TOCO   ( https://www.toco.eu ): bringing entrepreneurs, accountants and banks closer together, by supporting entrepreneurs and accountants in their daily admin (and in the f