A Deep Learning Approach to Anomaly Detection in High-Frequency Trading Data

Qiuliuyang Bao, Jiawei Wang, Hao Gong, Yiwei Zhang, Xiaojun Guo +1 more
3/31/2025
cs.LG

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

This paper proposes an algorithm based on a staged sliding window Transformer architecture to detect abnormal behaviors in the microstructure of the foreign exchange market, focusing on high-frequency EUR/USD trading data. The method captures multi-scale temporal features through a staged sliding window, extracts global and local dependencies by combining the self-attention mechanism and weighted attention mechanism of the Transformer, and uses a classifier to identify abnormal events. Experimental results on a real high-frequency dataset containing order book depth, spread, and trading volume show that the proposed method significantly outperforms traditional machine learning (such as decision trees and random forests) and deep learning methods (such as MLP, CNN, RNN, LSTM) in terms of accuracy (0.93), F1-Score (0.91), and AUC-ROC (0.95). Ablation experiments verify the contribution of each component, and the visualization of order book depth and anomaly detection further reveals the effectiveness of the model under complex market dynamics. Despite the false positive problem, the model still provides important support for market supervision. In the future, noise processing can be optimized and extended to other markets to improve generalization and real-time performance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bao2025deep,
  title  = {A Deep Learning Approach to Anomaly Detection in High-Frequency Trading Data},
  author = {Qiuliuyang Bao and Jiawei Wang and Hao Gong and Yiwei Zhang and Xiaojun Guo and Hanrui Feng},
  year   = {2025},
  eprint = {2504.00287},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2504.00287v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2504.00287.svg)](https://codeofpaper.com/paper/2504.00287)

Discussion