Stock Trading Signal Prediction Using Transformer Model and Multiple Indicators

Conference proceedings article


Authors/Editors


Strategic Research Themes


Publication Details

Author listChaikamon Chantrasmee, Saichon Jaiyen, Suluk Chaikhan, and Niwan Wattanakitrungroj

Publication year2024

Start page1

End page6

Number of pages6

URLhttps://ieeexplore.ieee.org/document/10770734

LanguagesEnglish-United States (EN-US)


View on publisher site


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 SignalsStockStock Market of Thailandtechnical analysisTransformer Neural Networks


Last updated on 2025-25-01 at 00:00