IDEAS home Printed from https://ideas.repec.org/a/gam/jmathe/v13y2025i3p487-d1581357.html
   My bibliography  Save this article

LLM-Augmented Linear Transformer–CNN for Enhanced Stock Price Prediction

Author

Listed:
  • Lei Zhou

    (Department of Computer Science, Auckland University of Technology, Auckland 1010, New Zealand)

  • Yuqi Zhang

    (Department of Computer Science, Auckland University of Technology, Auckland 1010, New Zealand)

  • Jian Yu

    (Department of Computer Science, Auckland University of Technology, Auckland 1010, New Zealand)

  • Guiling Wang

    (School of Information Science and Technology, North China University of Technology, Beijing 100144, China)

  • Zhizhong Liu

    (The School of Computer and Control Engineering, Yantai University, Yantai 254005, China)

  • Sira Yongchareon

    (Department of Computer Science, Auckland University of Technology, Auckland 1010, New Zealand)

  • Nancy Wang

    (Department of Computer Science, Auckland University of Technology, Auckland 1010, New Zealand)

Abstract

Accurately predicting stock prices remains a challenging task due to the volatile and complex nature of financial markets. In this study, we propose a novel hybrid deep learning framework that integrates a large language model (LLM), a Linear Transformer (LT), and a Convolutional Neural Network (CNN) to enhance stock price prediction using solely historical market data. The framework leverages the LLM as a professional financial analyst to perform daily technical analysis. The technical indicators, including moving averages (MAs), relative strength index (RSI), and Bollinger Bands (BBs), are calculated directly from historical stock data. These indicators are then analyzed by the LLM, generating descriptive textual summaries. The textual summaries are further transformed into vector representations using FinBERT, a pre-trained financial language model, to enhance the dataset with contextual insights. The FinBERT embeddings are integrated with features from two additional branches: the Linear Transformer branch, which captures long-term dependencies in time-series stock data through a linearized self-attention mechanism, and the CNN branch, which extracts spatial features from visual representations of stock chart data. The combined features from these three modalities are then processed by a Feedforward Neural Network (FNN) for final stock price prediction. Experimental results on the S&P 500 dataset demonstrate that the proposed framework significantly improves stock prediction accuracy by effectively capturing temporal, spatial, and contextual dependencies in the data. This multimodal approach highlights the importance of integrating advanced technical analysis with deep learning architectures for enhanced financial forecasting.

Suggested Citation

  • Lei Zhou & Yuqi Zhang & Jian Yu & Guiling Wang & Zhizhong Liu & Sira Yongchareon & Nancy Wang, 2025. "LLM-Augmented Linear Transformer–CNN for Enhanced Stock Price Prediction," Mathematics, MDPI, vol. 13(3), pages 1-18, January.
  • Handle: RePEc:gam:jmathe:v:13:y:2025:i:3:p:487-:d:1581357
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/2227-7390/13/3/487/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/2227-7390/13/3/487/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Peng Zhu & Yuante Li & Yifan Hu & Qinyuan Liu & Dawei Cheng & Yuqi Liang, 2024. "LSR-IGRU: Stock Trend Prediction Based on Long Short-Term Relationships and Improved GRU," Papers 2409.08282, arXiv.org, revised Sep 2024.
    2. Shuheng Wang & Guohao Li & Yifan Bao, 2018. "A novel improved fuzzy support vector machine based stock price trend forecast model," Papers 1801.00681, arXiv.org.
    3. Taewook Kim & Ha Young Kim, 2019. "Forecasting stock prices with a feature fusion LSTM-CNN model using different representations of the same data," PLOS ONE, Public Library of Science, vol. 14(2), pages 1-23, February.
    4. Narayana Darapaneni & Anwesh Reddy Paduri & Himank Sharma & Milind Manjrekar & Nutan Hindlekar & Pranali Bhagat & Usha Aiyer & Yogesh Agarwal, 2022. "Stock Price Prediction using Sentiment Analysis and Deep Learning for Indian Markets," Papers 2204.05783, arXiv.org.
    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. Paul Handro & Bogdan Dima, 2024. "Analyzing Financial Markets Efficiency: Insights from a Bibliometric and Content Review," Journal of Financial Studies, Institute of Financial Studies, vol. 16(9), pages 119-175, May.
    2. Tashreef Muhammad & Tahsin Aziz & Mohammad Shafiul Alam, 2023. "Utilizing Technical Data to Discover Similar Companies in Dhaka Stock Exchange," Papers 2301.04455, arXiv.org.
    3. Akash Doshi & Alexander Issa & Puneet Sachdeva & Sina Rafati & Somnath Rakshit, 2020. "Deep Stock Predictions," Papers 2006.04992, arXiv.org.
    4. Andrew Brim & Nicholas S Flann, 2022. "Deep reinforcement learning stock market trading, utilizing a CNN with candlestick images," PLOS ONE, Public Library of Science, vol. 17(2), pages 1-25, February.
    5. Zhiyuan Pei & Jianqi Yan & Jin Yan & Bailing Yang & Ziyuan Li & Lin Zhang & Xin Liu & Yang Zhang, 2024. "A Stock Price Prediction Approach Based on Time Series Decomposition and Multi-Scale CNN using OHLCT Images," Papers 2410.19291, arXiv.org, revised Oct 2024.
    6. Huang, Wenyang & Wang, Huiwen & Qin, Haotong & Wei, Yigang & Chevallier, Julien, 2022. "Convolutional neural network forecasting of European Union allowances futures using a novel unconstrained transformation method," Energy Economics, Elsevier, vol. 110(C).
    7. Nestoras Chalkidis & Rahul Savani, 2021. "Trading via Selective Classification," Papers 2110.14914, arXiv.org, revised Oct 2021.
    8. Yanyan Cui & Lixin Liu, 2022. "Investor sentiment-aware prediction model for P2P lending indicators based on LSTM," PLOS ONE, Public Library of Science, vol. 17(1), pages 1-17, January.
    9. Saber Talazadeh & Dragan Perakovic, 2024. "SARF: Enhancing Stock Market Prediction with Sentiment-Augmented Random Forest," Papers 2410.07143, arXiv.org.
    10. Satya Verma & Satya Prakash Sahu & Tirath Prasad Sahu, 2024. "Two-Stage Hybrid Feature Selection Approach Using Levy’s Flight Based Chicken Swarm Optimization for Stock Market Forecasting," Computational Economics, Springer;Society for Computational Economics, vol. 63(6), pages 2193-2224, June.
    11. Xiaodong Zhang & Suhui Liu & Xin Zheng, 2021. "Stock Price Movement Prediction Based on a Deep Factorization Machine and the Attention Mechanism," Mathematics, MDPI, vol. 9(8), pages 1-21, April.
    12. Li, Houjian & Zhou, Deheng & Hu, Jiayu & Li, Junwen & Su, Mengying & Guo, Lili, 2023. "Forecasting the realized volatility of Energy Stock Market: A multimodel comparison," The North American Journal of Economics and Finance, Elsevier, vol. 66(C).
    13. Kshitij Sharma & Yogesh K. Dwivedi & Bhimaraya Metri, 2024. "Incorporating causality in energy consumption forecasting using deep neural networks," Annals of Operations Research, Springer, vol. 339(1), pages 537-572, August.
    14. V. Lanzetta, 2024. "Transfer learning for financial data predictions: a systematic review," Papers 2409.17183, arXiv.org.
    15. Mimansa Rana & Nanxiang Mao & Ming Ao & Xiaohui Wu & Poning Liang & Matloob Khushi, 2021. "Clustering and attention model based for intelligent trading," Papers 2107.06782, arXiv.org, revised Aug 2021.
    16. Singh, Sriramjee, 2020. "Predicting CBOT Corn Futures Prices by applying ML methods on Weather Data," 2020 Annual Meeting, July 26-28, Kansas City, Missouri 304595, Agricultural and Applied Economics Association.
    17. Ling Qi & Matloob Khushi & Josiah Poon, 2021. "Event-Driven LSTM For Forex Price Prediction," Papers 2102.01499, arXiv.org.
    18. Huang, Wenyang & Zhao, Jianyu & Wang, Xiaokang, 2024. "Model-driven multimodal LSTM-CNN for unbiased structural forecasting of European Union allowances open-high-low-close price," Energy Economics, Elsevier, vol. 132(C).
    19. Peng, Shiliang & Fan, Lin & Zhang, Li & Su, Huai & He, Yuxuan & He, Qian & Wang, Xiao & Yu, Dejun & Zhang, Jinjun, 2024. "Spatio-temporal prediction of total energy consumption in multiple regions using explainable deep neural network," Energy, Elsevier, vol. 301(C).
    20. Simon Liebermann & Jung-Sup Um & YoungSeok Hwang & Stephan Schlüter, 2021. "Performance Evaluation of Neural Network-Based Short-Term Solar Irradiation Forecasts," Energies, MDPI, vol. 14(11), pages 1-21, May.

    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:gam:jmathe:v:13:y:2025:i:3:p:487-:d:1581357. 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: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    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.