IDEAS home Printed from https://ideas.repec.org/p/arx/papers/2603.05917.html

Stock Market Prediction Using Node Transformer Architecture Integrated with BERT Sentiment Analysis

Author

Listed:
  • Mohammad Al Ridhawi
  • Mahtab Haj Ali
  • Hussein Al Osman

Abstract

Stock market prediction presents considerable challenges for investors, financial institutions, and policymakers operating in complex market environments characterized by noise, non-stationarity, and behavioral dynamics. Traditional forecasting methods, including fundamental analysis and technical indicators, often fail to capture the intricate patterns and cross-sectional dependencies inherent in financial markets. This paper presents an integrated framework combining a node transformer architecture with BERT-based sentiment analysis for stock price forecasting. The proposed model represents the stock market as a graph structure where individual stocks form nodes and edges capture relationships including sectoral affiliations, correlated price movements, and supply chain connections. A fine-tuned BERT model extracts sentiment information from social media posts and combines it with quantitative market features through attention-based fusion mechanisms. The node transformer processes historical market data while capturing both temporal evolution and cross-sectional dependencies among stocks. Experiments conducted on 20 S&P 500 stocks spanning January 1982 to March 2025 demonstrate that the integrated model achieves a mean absolute percentage error (MAPE) of 0.80% for one-day-ahead predictions, compared to 1.20% for ARIMA and 1.00% for LSTM. The inclusion of sentiment analysis reduces prediction error by 10% overall and 25% during earnings announcements, while the graph-based architecture contributes an additional 15% improvement by capturing inter-stock dependencies. Directional accuracy reaches 65% for one-day forecasts. Statistical validation through paired t-tests confirms the significance of these improvements (p

Suggested Citation

  • Mohammad Al Ridhawi & Mahtab Haj Ali & Hussein Al Osman, 2026. "Stock Market Prediction Using Node Transformer Architecture Integrated with BERT Sentiment Analysis," Papers 2603.05917, arXiv.org, revised Apr 2026.
  • Handle: RePEc:arx:papers:2603.05917
    as

    Download full text from publisher

    File URL: http://arxiv.org/pdf/2603.05917
    File Function: Latest version
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Fama, Eugene F, 1970. "Efficient Capital Markets: A Review of Theory and Empirical Work," Journal of Finance, American Finance Association, vol. 25(2), pages 383-417, May.
    2. Martin, Ian W.R. & Nagel, Stefan, 2022. "Market efficiency in the age of big data," Journal of Financial Economics, Elsevier, vol. 145(1), pages 154-177.
    3. Basak, Suryoday & Kar, Saibal & Saha, Snehanshu & Khaidem, Luckyson & Dey, Sudeepa Roy, 2019. "Predicting the direction of stock market prices using tree-based classifiers," The North American Journal of Economics and Finance, Elsevier, vol. 47(C), pages 552-567.
    4. Daniel Kahneman & Amos Tversky, 2013. "Prospect Theory: An Analysis of Decision Under Risk," World Scientific Book Chapters, in: Leonard C MacLean & William T Ziemba (ed.), HANDBOOK OF THE FUNDAMENTALS OF FINANCIAL DECISION MAKING Part I, chapter 6, pages 99-127, World Scientific Publishing Co. Pte. Ltd..
    5. Itay Goldstein, 2023. "Information in Financial Markets and Its Real Effects," Review of Finance, European Finance Association, vol. 27(1), pages 1-32.
    6. Fischer, Thomas & Krauss, Christopher, 2018. "Deep learning with long short-term memory networks for financial market predictions," European Journal of Operational Research, Elsevier, vol. 270(2), pages 654-669.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Ignacio Escanuela Romana & Clara Escanuela Nieves, 2023. "A spectral approach to stock market performance," Papers 2305.05762, arXiv.org.
    2. László Vancsura & Tibor Tatay & Tibor Bareith, 2025. "Navigating AI-Driven Financial Forecasting: A Systematic Review of Current Status and Critical Research Gaps," Forecasting, MDPI, vol. 7(3), pages 1-49, July.
    3. Christiane Goodfellow & Dirk Schiereck & Steffen Wippler, 2013. "Are behavioural finance equity funds a superior investment? A note on fund performance and market efficiency," Journal of Asset Management, Palgrave Macmillan, vol. 14(2), pages 111-119, April.
    4. Baoqiang Zhan & Shu Zhang & Helen S. Du & Xiaoguang Yang, 2022. "Exploring Statistical Arbitrage Opportunities Using Machine Learning Strategy," Computational Economics, Springer;Society for Computational Economics, vol. 60(3), pages 861-882, October.
    5. Pieter Nel & Renee van Eyden, 2026. "From News to Noise: Does Media Sentiment Drive Stock Market Volatility?," Working Papers 202605, University of Pretoria, Department of Economics.
    6. Klodt, Henning & Lehment, Harmen (ed.), 2009. "The Crisis and Beyond," Kiel E-Books, Kiel Institute for the World Economy, number 60981.
    7. David Peón & Anxo Calvo, 2012. "Using Behavioral Economics to Analyze Credit Policies in the Banking Industry," European Research Studies Journal, European Research Studies Journal, vol. 0(3), pages 145-160.
    8. Abraham Itzhak Weinberg, 2025. "Hybrid Quantum-Classical Ensemble Learning for S\&P 500 Directional Prediction," Papers 2512.15738, arXiv.org.
    9. Jackson Barngetuny (PhD), 2025. "Behavioral Biases and Real Estate Bubble Formation in Kenya: A Behavioral Finance and Neuroeconomic Perspective," International Journal of Finance and Accounting, IPRJB, vol. 10(4), pages 54-79.
    10. Dilger, Alexander, 2022. "Der Zufall in den Wirtschaftswissenschaften," Discussion Papers of the Institute for Organisational Economics 5/2022, University of Münster, Institute for Organisational Economics.
    11. Alexander S. Sangare, 2005. "Efficience des marchés : un siècle après Bachelier," Revue d'Économie Financière, Programme National Persée, vol. 81(4), pages 107-132.
    12. Jing-Yi Chen & Ming-Hui Wang, 2023. "A Study on Real Estate Purchase Decisions," Sustainability, MDPI, vol. 15(6), pages 1-21, March.
    13. Ahmed Bouteska & Murad Harasheh, 2026. "Decoding the crypto crowd: how social media sentiment predicts Ethereum’s price," Journal of Asset Management, Palgrave Macmillan, vol. 27(1), pages 1-12, March.
    14. Wang, Jianzhou & Lv, Mengzheng & Wang, Shuai & Gao, Jialu & Zhao, Yang & Wang, Qiangqiang, 2024. "Can multi-period auto-portfolio systems improve returns? Evidence from Chinese and U.S. stock markets," International Review of Financial Analysis, Elsevier, vol. 95(PB).
    15. Stephan Schulmeister, 2000. "Technical Analysis and Exchange Rate Dynamics," WIFO Studies, WIFO, number 25857.
    16. Nabil Sifouh & Ismail Benslimane & Karim Ameziane, 2024. "A critical look at teaching and doing research in finance," Post-Print hal-04936832, HAL.
    17. Robin Maximilian Stetzka & Stefan Winter, 2023. "How rational is gambling?," Journal of Economic Surveys, Wiley Blackwell, vol. 37(4), pages 1432-1488, September.
    18. Vivien Lespagnol & Juliette Rouchier, 2015. "What Is the Impact of Heterogeneous Knowledge About Fundamentals on Market Liquidity and Efficiency: An ABM Approach," Lecture Notes in Economics and Mathematical Systems, in: Frédéric Amblard & Francisco J. Miguel & Adrien Blanchet & Benoit Gaudou (ed.), Advances in Artificial Economics, edition 127, pages 105-117, Springer.
    19. Kamil Saba & Janusz Kudła, 2014. "The impact of NBP’s interest rate changes on the changes and volatility of WIG20," Ekonomia journal, Faculty of Economic Sciences, University of Warsaw, vol. 37.
    20. Fathin Faizah Said & Raja Solan Somasuntharam & Mohd Ridzwan Yaakub & Tamat Sarmidi, 2023. "Impact of Google searches and social media on digital assets’ volatility," Humanities and Social Sciences Communications, Palgrave Macmillan, vol. 10(1), pages 1-17, December.

    More about this item

    NEP fields

    This paper has been announced in the following NEP Reports:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:arx:papers:2603.05917. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: arXiv administrators (email available below). General contact details of provider: http://arxiv.org/ .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.