When Machine Learning Meets Finance
I didn’t really plan to work on two projects that look so different.
One was my Bachelor’s thesis on using machine learning for financial-crime prevention.
The other is a DCF agent I have been building to extract financial information from company reports and turn it into a valuation model.
At first, they felt like completely different problems.
One was about fraud and risk.
The other was about company valuation.
But the more I worked on both, the more I started seeing the same problem underneath:
How do you take a huge amount of financial information, find the signals that actually matter, and turn them into a decision that a human can trust?
That question is probably more interesting to me than the models themselves.
My first experience with financial ML
For my Bachelor’s thesis, I worked on a machine learning approach for financial-crime prevention in leasing and financing.
The basic idea sounds simple:
Take historical data, find patterns, train a model, and use the model to identify risky cases.
But once you actually start thinking about it, it becomes much less simple.
What exactly is a “risky” application?
What counts as fraud?
Which features are actually useful?
And maybe most importantly:
What does the model know that the person reviewing the case does not?
That last question changed how I looked at the whole project.
The problem with learning from the past
One of the first things that bothered me was the data itself.
Suppose I train a model using historical approval or rejection decisions.
It is tempting to assume that these decisions represent the truth.
But they don’t.
They represent decisions made by people, under specific policies, with specific information, at a specific point in time.
That means historical decisions can contain previous biases, mistakes, and changing risk standards.
The model can learn from them, but it can also learn the wrong things.
This is a broader issue in supervised machine learning. The FCA’s review of bias in supervised ML specifically points to past decision-making and historical practices as important potential sources of bias, while also emphasizing that model choices and human use of the model matter.
That made me realize something:
A machine learning model does not automatically discover the truth.
It discovers patterns in the data we give it.
Those are not always the same thing.
Fraud is also a very unusual ML problem
Fraud detection creates another problem: the thing you actually care about is often the rarest thing in the dataset.
Imagine a dataset where almost everything is legitimate and only a small fraction is suspicious.
A model could achieve extremely high accuracy simply by predicting “legitimate” almost every time.
On paper, that can look great.
In reality, it could be completely useless.
This is why accuracy alone becomes a poor metric for highly imbalanced problems. Precision, recall, F1-score, and especially the operational cost of false positives and false negatives become much more important. Research on financial fraud detection repeatedly highlights class imbalance as a central challenge.
And this was an important lesson for me:
The best model is not necessarily the model with the best headline metric.
It is the one that makes sense for the actual decision you are trying to support.
Then I discovered how important explanations are
This is where SHAP became especially interesting to me.
SHAP, or SHapley Additive exPlanations, provides feature-attribution values that show how individual features contributed to a particular prediction. Lundberg and Lee introduced SHAP as a unified framework for interpreting model predictions.
Before working with it, I mostly thought of explainability as something you add after building a model.
Something like:
Build model → get score → explain it afterwards.
I started thinking about it differently.
The explanation is part of the output.
Imagine the model gives an application a high-risk score.
That number by itself isn’t very helpful.
But suppose the system can also say:
- High debt-to-income ratio contributed strongly to the risk score.
- Recent credit activity contributed to the score.
- The company’s age contributed to the score.
- Another feature reduced the predicted risk.
Now a person reviewing the case has something they can actually investigate.
They can agree.
They can disagree.
They can look for missing context.
They can decide that the model picked up something meaningful or something misleading.
That is much more useful than simply saying:
“The model says no.”
The model should not replace the person
This was probably the most important lesson from the thesis.
I wasn’t trying to build a machine that would become the credit officer.
I was more interested in building something that could help the credit officer see things they might otherwise miss.
The human still has context that the model doesn’t.
Maybe there is a perfectly reasonable explanation for an unusual pattern.
Maybe the data is outdated.
Maybe the case is genuinely suspicious.
The point is not that the model is always right.
The point is that the model and the human can see different parts of the problem.
This idea is also reflected in financial-services discussions around AI. The FCA has explicitly discussed ML as something that can complement human judgement in financial-crime monitoring rather than simply replace it.
That became a principle I carried with me into my later projects.
Then I started thinking about valuation
After working on the financial-crime problem, I moved toward another side of finance: valuation.
I started building a DCF agent.
The problem here is completely different.
There is no fraud label.
There isn’t a simple “fraud / not fraud” prediction.
Instead, the system has to read financial reports, extract relevant numbers, understand what they mean, make assumptions, and eventually construct a valuation.
At first glance, it looks like an LLM problem.
Give the annual report to a model.
Ask it to find revenue.
Find EBITDA.
Find CapEx.
Find working capital.
Build a DCF.
Done.
Except not really.
Financial data is messy
Company reports are written for humans, not for an AI agent.
The same concept can appear in different places.
Definitions can change.
Numbers can be reported in different units.
Some information is clearly stated.
Other information has to be inferred.
And then there is the biggest issue:
A valuation is not just a collection of numbers.
It is a collection of assumptions.
Revenue growth.
Margins.
Tax rates.
Working capital.
Capital expenditure.
Terminal growth.
Discount rate.
Two people can look at the same company and build two very different DCFs because they make different assumptions.
So the agent cannot simply extract numbers.
It has to preserve where those numbers came from, distinguish historical facts from assumptions, and make the final result inspectable.
That is where the two projects start looking surprisingly similar.
Risk score or valuation: the output isn’t enough
In the thesis, I had a risk score.
In the DCF agent, I have a valuation.
But neither number means much by itself.
A risk score without an explanation is difficult to interpret.
A valuation without transparent assumptions is difficult to challenge.
In both cases, I care about the same thing:
Can I understand how the system got there?
And this is probably why I have become more interested in financial AI systems rather than just financial models.
The interesting part is not only prediction.
It is the whole chain:
data → features → model → explanation → human judgement → decision
For valuation, it becomes something like:
documents → financial data → assumptions → DCF → scenarios → decision
The details are different.
The philosophy is surprisingly similar.
I also learned that simple models are sometimes enough
There is a temptation in AI to make everything more complicated.
A larger model.
A more complicated architecture.
More features.
More agents.
More automation.
But financial applications taught me to be a little more careful with that.
If a simple model performs well enough and is easier to explain, test, and maintain, that can be a huge advantage.
And even when I use more complicated models, I still want to know what they are doing.
Recent fraud-detection research also shows that more complex architectures do not automatically dominate simpler models across all practical metrics. The trade-off between performance, complexity, interpretability and operational requirements matters.
I think this is one of the things that gets lost in a lot of AI discussions.
More intelligent does not automatically mean more useful.
What I would build differently now
Looking back at my thesis, I would probably pay even more attention to the complete decision workflow.
Not just:
Can the model predict?
But:
What happens after the prediction?
Who sees it?
What do they do with it?
What information do they need?
What happens when the model is wrong?
Can we explain the result?
Can we audit it later?
And can we improve the system without losing track of why it made previous decisions?
That is also how I think about my DCF agent now.
The goal is not to create an AI that says:
“This company is worth €X.”
The goal is to create a system where I can look at the valuation and ask:
“Where did this number come from?”
And actually get an answer.
What financial AI means to me now
I started these projects because I was interested in machine learning and finance.
But they changed what I think financial AI actually is.
I used to think about it mostly in terms of models.
Classification.
Regression.
Feature engineering.
Neural networks.
LLMs.
Now I think much more about the system around the model.
The data.
The assumptions.
The explanations.
The human workflow.
The ability to question the result.
The ability to audit it.
The consequences when it gets something wrong.
That is probably the part I find most interesting.
Because finance already has plenty of numbers.
What we need is better ways of turning those numbers into useful decisions without hiding the reasoning behind them.
My financial-crime thesis taught me that a model should not simply produce a risk score.
My DCF agent is teaching me that an AI system should not simply produce a valuation.
In both cases, the real value comes from everything that happens between the data and the decision.
And maybe that is where financial AI becomes genuinely interesting.
References
Lundberg, S. M., & Lee, S.-I. (2017). A unified approach to interpreting model predictions. Advances in Neural Information Processing Systems, 30. https://papers.nips.cc/paper/2017/hash/8a20a8621978632d76c43dfd28b67767-Abstract.html
Financial Conduct Authority. (2024). Research note: A literature review on bias in supervised machine learning. https://www.fca.org.uk/publications/fca-research/research-note-literature-review-bias-supervised-machine-learning
Financial Conduct Authority. (2017). Using artificial intelligence to keep criminal funds out of the financial system. https://www.fca.org.uk/news/speeches/using-artificial-intelligence-keep-criminal-funds-out-financial-system