Saved in:
Bibliographic Details
Main Authors: Bao, Qiuliuyang, Wang, Jiawei, Gong, Hao, Zhang, Yiwei, Guo, Xiaojun, Feng, Hanrui
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2504.00287
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910900291633152
author Bao, Qiuliuyang
Wang, Jiawei
Gong, Hao
Zhang, Yiwei
Guo, Xiaojun
Feng, Hanrui
author_facet Bao, Qiuliuyang
Wang, Jiawei
Gong, Hao
Zhang, Yiwei
Guo, Xiaojun
Feng, Hanrui
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2504_00287
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle A Deep Learning Approach to Anomaly Detection in High-Frequency Trading Data
Bao, Qiuliuyang
Wang, Jiawei
Gong, Hao
Zhang, Yiwei
Guo, Xiaojun
Feng, Hanrui
Machine Learning
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.
title A Deep Learning Approach to Anomaly Detection in High-Frequency Trading Data
topic Machine Learning
url https://arxiv.org/abs/2504.00287