Skip to main content

LUP Student Papers

LUND UNIVERSITY LIBRARIES

Anomaly Detection for OTC Derivatives

Fogelberg, Daniel LU (2025) In Master's Thesis in Mathematical Sciences FMSM01 20251
Mathematical Statistics
Abstract
This thesis explores the use of machine learning to detect anomalies in OTC derivatives. The purpose is to evaluate whether machine learning can be used in a new domain within the financial industry and to investigate whether anomaly detection can enhance the portfolio reconciliation process.

The study compares three different approaches to anomaly detection: logistic regression, isolation forest, and denoising autoencoders. The data used consists of real-world trades provided by OSTTRA. As there were no labeled data for anomalous trades, anomalies were created synthetically.

The results show that the isolation forest performs poorly in detecting anomalies in this context. Logistic regression shows some capability but has clear... (More)
This thesis explores the use of machine learning to detect anomalies in OTC derivatives. The purpose is to evaluate whether machine learning can be used in a new domain within the financial industry and to investigate whether anomaly detection can enhance the portfolio reconciliation process.

The study compares three different approaches to anomaly detection: logistic regression, isolation forest, and denoising autoencoders. The data used consists of real-world trades provided by OSTTRA. As there were no labeled data for anomalous trades, anomalies were created synthetically.

The results show that the isolation forest performs poorly in detecting anomalies in this context. Logistic regression shows some capability but has clear limitations. Denoising autoencoders, on the other hand, demonstrate the strongest performance in detecting anomalies, especially regarding the product classes of the OTC derivatives.

Furthermore, the study explores the use of denoising autoencoders to enhance the portfolio reconciliation process. The results indicate that the model has potential to be used for certain limited use cases, but further research is needed to fully evaluate the potential possibilities and challenges.

The thesis concludes that machine learning, specifically denoising autoencoders, shows potential in detecting anomalies in OTC derivatives. However, the synthetic creation of anomalies and some limitations in the data imply that the conclusions should be interpreted with caution. (Less)
Popular Abstract (Swedish)
Banker och andra företag handlar en oerhörd stor mängd finansiella kontrakt mellan varandra. Att fel uppstår i dessa kontrakt är oundvikligt, och denna studie undersöker hur AI kan användas för att hitta dessa fel.

När två parter gör upp en derivataffär - ett skräddarsytt kontrakt som tillgodoser specifika ändamål - hanteras ofta affären manuellt i separata system hos de olika parterna. Denna process innebär att det oundvikligt uppkommer fel och därmed olika syn hos de inblandade parterna om vad som faktiskt är överenskommet. Det finns processer för att reda ut dessa avvikelser, men om de uppkomna felen snabbt kunde hittas skulle denna process kunna bli mer effektiv.

Studien utreder om artificiell intelligens kan göra jobbet att... (More)
Banker och andra företag handlar en oerhörd stor mängd finansiella kontrakt mellan varandra. Att fel uppstår i dessa kontrakt är oundvikligt, och denna studie undersöker hur AI kan användas för att hitta dessa fel.

När två parter gör upp en derivataffär - ett skräddarsytt kontrakt som tillgodoser specifika ändamål - hanteras ofta affären manuellt i separata system hos de olika parterna. Denna process innebär att det oundvikligt uppkommer fel och därmed olika syn hos de inblandade parterna om vad som faktiskt är överenskommet. Det finns processer för att reda ut dessa avvikelser, men om de uppkomna felen snabbt kunde hittas skulle denna process kunna bli mer effektiv.

Studien utreder om artificiell intelligens kan göra jobbet att hitta dessa fel. Genom finansteknikbolaget OSTTRA gavs det tillgång till en stor mängd av dessa derivataffärer. Eftersom de verkliga felen är svåra att veta var de finns, skapade jag syntetiska fel – ungefär som att medvetet stoppa in felstavningar i en text för att testa en stavningskontroll.

Tre algoritmer fick tävla: logistisk regression (klassisk statistik), isolation forest (regelbaserad modell) och en så kallad denoising autoencoder – ett självlärande djupt nätverk som lär sig återskapa originaldata och därigenom avslöjar avvikelser. Efter träning på en stor mängd data kunde autoencodern hitta fel i derivataffärerna, på ett betydligt bättre sätt än de andra modellerna.

Styrkan låg främst i att upptäcka när ett kontrakt är av fel produkttyp, vilket representerar vad för typ av affär det handlar om. Resultatet antyder att banker på sikt kan låta algoritmen fungera som ett förfilter: den märker upp ”konstiga” rader redan vid inmatning så att fel upptäcks snabbt.

Men modellen har också begränsningar. Eftersom träningsdata består av syntetiskt skapta fel vet vi inte hur den står sig mot verkliga misstag i skarpt läge. Nästa steg är därför att förbättra tekniken med riktiga exempel.

Trots det pekar studien på en tydlig riktning: djupinlärning kan bli ett värdefullt verktyg för att göra den globala derivathandeln både snabbare och säkrare – och frigöra tid för människor att fokusera på mer kvalificerade beslut. (Less)
Please use this url to cite or link to this publication:
author
Fogelberg, Daniel LU
supervisor
organization
course
FMSM01 20251
year
type
H2 - Master's Degree (Two Years)
subject
keywords
Anomaly Detection, Denoising Autoencoder, Isolation Forest, Logistic Regression, Machine Learning, OTC Derivatives, Portfolio Reconciliation.
publication/series
Master's Thesis in Mathematical Sciences
report number
LUTFMS-3522-2025
ISSN
1404-6342
other publication id
2025:E54
language
English
id
9194512
date added to LUP
2025-06-09 16:09:44
date last changed
2025-06-09 16:09:44
@misc{9194512,
  abstract     = {{This thesis explores the use of machine learning to detect anomalies in OTC derivatives. The purpose is to evaluate whether machine learning can be used in a new domain within the financial industry and to investigate whether anomaly detection can enhance the portfolio reconciliation process.

The study compares three different approaches to anomaly detection: logistic regression, isolation forest, and denoising autoencoders. The data used consists of real-world trades provided by OSTTRA. As there were no labeled data for anomalous trades, anomalies were created synthetically.

The results show that the isolation forest performs poorly in detecting anomalies in this context. Logistic regression shows some capability but has clear limitations. Denoising autoencoders, on the other hand, demonstrate the strongest performance in detecting anomalies, especially regarding the product classes of the OTC derivatives.

Furthermore, the study explores the use of denoising autoencoders to enhance the portfolio reconciliation process. The results indicate that the model has potential to be used for certain limited use cases, but further research is needed to fully evaluate the potential possibilities and challenges. 

The thesis concludes that machine learning, specifically denoising autoencoders, shows potential in detecting anomalies in OTC derivatives. However, the synthetic creation of anomalies and some limitations in the data imply that the conclusions should be interpreted with caution.}},
  author       = {{Fogelberg, Daniel}},
  issn         = {{1404-6342}},
  language     = {{eng}},
  note         = {{Student Paper}},
  series       = {{Master's Thesis in Mathematical Sciences}},
  title        = {{Anomaly Detection for OTC Derivatives}},
  year         = {{2025}},
}