Anomaly detection in financial time series data via mapper algorithm and DBSCAN clustering

Md. Morshed Bin Shiraj *, Md. Mizanur Rahman, Md. Al-Imran, Mst Zinia Afroz Liza, Md. Masum Murshed and Nasima Akhter

Department of Mathematics, University of Rajshahi, Rajshahi-6205, Bangladesh.
 
Research Article
World Journal of Advanced Engineering Technology and Sciences, 2024, 13(01), 070–084.
Article DOI: 10.30574/wjaets.2024.13.1.0396
Publication history: 
Received on 30 July 2024; revised on 07 September 2024; accepted on 09 September 2024
 
Abstract: 
Topological Data Analysis (TDA) has proven to be a powerful framework for uncovering hidden structures in high-dimensional data. This study investigates the integration of the Mapper algorithm with DBSCAN clustering to detect anomalies in financial time series data, specifically using daily price data from the Dhaka Stock Exchange. The methodology involves projecting the data into a lower-dimensional space using a filter function, covering this space with overlapping intervals, and applying DBSCAN to identify clusters within each subset. The resulting Mapper graph visualizes the relationships between clusters, with anomalies detected as unclustered points, isolated clusters, or small disconnected nodes. A total of 44 data points were identified as anomalies, which correspond to extreme price movements in the time series data. This combination of TDA and clustering provides a robust framework for anomaly detection, particularly in high-dimensional data where traditional clustering methods often fail to capture the full structure. Validation through SVM confirmed anomalies in the data, but the Mapper-DBSCAN approach demonstrated clearer separation of normal data and anomalies. The results demonstrate the potential of this approach for identifying anomalous behaviors in complex financial data.
 
Keywords: 
Anomaly Detection; DBSCAN Clustering; Mapper Algorithm; Persistent Homology; Support Vector Machine (SVM); Topological Data Analysis.
 
Full text article in PDF: