arXiv:2504.00287cs.LG2025-04被引 14

用分阶段滑窗Transformer检测外汇高频交易异常行为

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

  • 分阶段滑窗+自注意力融合全局局部特征
  • 准确率93%、F1值91%、AUC达95%
  • 适合监管机构监测市场异常波动

本文提出一种基于分阶段滑窗Transformer架构的算法,用于检测外汇市场微观结构中的异常行为,聚焦高频率欧元/美元交易数据。该方法通过分阶段滑窗捕捉多尺度时间特征,结合Transformer的自注意力与加权注意力机制提取全局和局部依赖关系,并使用分类器识别异常事件。在包含订单簿深度、买卖价差和交易量的真实高频数据集上的实验表明,该方法在准确率(0.93)、F1-Score(0.91)和AUC-ROC(0.95)上显著优于传统机器学习(如决策树、随机森林)及深度学习模型(如MLP、CNN、RNN、LSTM)。消融实验验证了各模块贡献,订单簿深度可视化进一步揭示了模型在复杂市场动态下的有效性。尽管存在误报问题,模型仍为市场监管提供重要支持。未来可优化噪声处理并拓展至其他市场以提升泛化性与实时性能。

原文摘要 · Abstract (English)

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.

异常检测高频交易Transformer金融风控

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。