EconPapers    
Economics at your fingertips  
 

Support for Stock Trend Prediction Using Transformers and Sentiment Analysis

Harsimrat Kaeley (), Ye Qiao () and Nader Bagherzadeh ()
Additional contact information
Harsimrat Kaeley: University of California, Irvine
Ye Qiao: University of California, Irvine
Nader Bagherzadeh: University of California, Irvine

No 13815878, Proceedings of Economics and Finance Conferences from International Institute of Social and Economic Sciences

Abstract: Stock trend analysis has been an influential time-series prediction topic due to its lucrative and inherently chaotic nature. Many models looking to accurately predict the trend of stocks have been based on Recurrent Neural Networks (RNNs). However, due to the limitations of RNNs, such as gradient vanish and long-term dependencies being lost as sequence length increases, in this paper we develop a Transformer based model that uses technical stock data and sentiment analysis to conduct accurate stock trend prediction over long time windows. This paper also introduces a novel dataset containing daily technical stock data and top news headline data spanning almost three years. Stock prediction based solely on technical data can suffer from lag caused by the inability of stock indicators to effectively factor in breaking market news. The use of sentiment analysis on top headlines can help account for unforeseen shifts in market conditions caused by news coverage. We measure the performance of our model against RNNs over sequence lengths spanning 5 business days to 30 business days to mimic different length trading strategies. This reveals an improvement in directional accuracy over RNNs as sequence length is increased, with the largest improvement being close to 18.63% at 30 business days.

Keywords: Stock Prediction; Machine Learning; Recurrent Neural Network; LSTM; Transformer; Self Attention; Sentiment; Analysis; Technical Analysis (search for similar items in EconPapers)
JEL-codes: C32 C35 E37 (search for similar items in EconPapers)
Pages: 16 pages
New Economics Papers: this item is included in nep-big
References: View references in EconPapers View complete reference list from CitEc
Citations:

Published in Proceedings of the Proceedings of the 18th Economics & Finance Conference, London, Nov -0001, pages 52-67

Downloads: (external link)
https://iises.net/proceedings/18th-economics-finan ... 38&iid=004&rid=15878 First version, 0000

Related works:
This item may be available elsewhere in EconPapers: Search for items with the same title.

Export reference: BibTeX RIS (EndNote, ProCite, RefMan) HTML/Text

Persistent link: https://EconPapers.repec.org/RePEc:sek:iefpro:13815878

Access Statistics for this paper

More papers in Proceedings of Economics and Finance Conferences from International Institute of Social and Economic Sciences
Bibliographic data for series maintained by Klara Cermakova ().

 
Page updated 2025-03-20
Handle: RePEc:sek:iefpro:13815878