Stock Trading Signal Prediction Using Transformer Model and Multiple Indicators
Conference proceedings article
Authors/Editors
Strategic Research Themes
Publication Details
Author list: Chaikamon Chantrasmee, Saichon Jaiyen, Suluk Chaikhan, and Niwan Wattanakitrungroj
Publication year: 2024
Start page: 1
End page: 6
Number of pages: 6
URL: https://ieeexplore.ieee.org/document/10770734
Languages: English-United States (EN-US)
Abstract
This study investigates the ability of Transformer models to predict stock trading signals. The Transformer model, focusing on encoder architectures and multi-head attention mechanisms, was applied to transform multiple indicators. The output of the Transformer is fed into a fully connected layer, followed by a softmax layer to generate output probabilities for three possible stock signals: sell, buy, and hold. To predict the stock signal, input patterns were created using indicators from the previous 5 and 61 days based on a sliding window approach. Five popular industry sector stocks from the SET50 index, covering the period from 2010 to 2023, were collected and experimented on. Based on the experimental results, the Transformer model, particularly with a small window size, consistently outperformed Deep Neural Networks, Recurrent Neural Networks, and Long Short-Term Memory models in terms of accuracy, precision, recall, and F1-score. Moreover, the maximum profit predicted by the Transformer was approximately 1.8 to 6.4 times greater than those of all other models. These findings demonstrate that the Transformer model can effectively predict stock trading signals, assisting investors in making informed decisions.
Keywords
Indicator Signals, Stock, Stock Market of Thailand, technical analysis, Transformer Neural Networks