A Deep Learning Approach to Anomaly Detection in High-Frequency Trading Data
his 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.
This project addresses the challenge of automated stock trading, where traditional methods and direct reinforce- ment learning (RL) struggle with market noise, complex- ity, and generalization. Our proposed solution is an in- tegrated deep learning framework combining a Convolu- tional Neural Network (CNN) to identify patterns in tech- nical indicators formatted as images, a Long Short-Term Memory (LSTM) network to capture temporal dependen- cies across both price history and technical indicators, and a Deep Q-Network (DQN) agent which learns the optimal trading policy (buy, sell, hold) based on the features ex- tracted by the CNN and LSTM. The CNN and LSTM act as sophisticated feature extractors, feeding processed in- formation to the DQN, which learns the optimal trading policy (buy, sell, hold) through RL. We trained and evalu- ated this model on historical daily stock data, using distinct periods for training, testing, and validation. Performance was assessed by comparing the agent’s returns and risk on out-of-sample test data against baseline strategies, includ- ing passive buy-and-hold approaches. This analysis, along with insights gained from explainability techniques into the agent’s decision-making process, aimed to demonstrate the effectiveness of combining specialized deep learning archi- tectures, document challenges encountered, and potentially uncover learned market insights
Predicting Stock Prices Using Permutation Decision Trees And Strategic Trailing
Qe explore the application of Permutation Decision Trees (PDT) and strategic trailing for predicting stock market movements and executing profitable trades in the Indian stock market. We focus on high-frequency data using 5-minute candlesticks for the top 50 stocks listed in the NIFTY 50 index. We implement a trading strategy that aims to buy stocks at lower prices and sell them at higher prices, capitalizing on short-term market fluctuations. Due to regulatory constraints in India, short selling is not considered in our strategy. The model incorporates various technical indicators and employs hyperparameters such as the trailing stop-loss value and support thresholds to manage risk effectively. Our results indicate that the proposed trading bot has the potential to outperform the market average and yield returns higher than the risk-free rate offered by 10-year Indian government bonds. We trained and tested data on a 60 day dataset provided by Yahoo Finance. Specifically, 12 days for testing and 48 days for training. Our bot based on permutation decision tree achieved a profit of 1.3468% over a 12-day testing period, where as a bot based on LSTM gave a return of 0.1238% over a 12-day testing period and a bot based on RNN gave a return of 0.3096% over a 12-day testing period. All of the bots outperform the buy-and-hold strategy, which resulted in a loss of 2.2508%
Deep Q-Network (DQN) multi-agent reinforcement learning (MARL) for Stock Trading
This project addresses the challenge of automated stock trading, where traditional methods and direct reinforcement learning (RL) struggle with market noise, complexity, and generalization. Our proposed solution is an integrated deep learning framework combining a Convolutional Neural Network (CNN) to identify patterns in technical indicators formatted as images, a Long Short-Term Memory (LSTM) network to capture temporal dependencies across both price history and technical indicators, and a Deep Q-Network (DQN) agent which learns the optimal trading policy (buy, sell, hold) based on the features extracted by the CNN and LSTM.