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. 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.
    2. 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 May 2025.
    3. 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.
    4. 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.
    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. 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).
    2. 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.
    3. 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).
    4. Tashreef Muhammad & Tahsin Aziz & Mohammad Shafiul Alam, 2023. "Utilizing Technical Data to Discover Similar Companies in Dhaka Stock Exchange," Papers 2301.04455, arXiv.org.
    5. Akash Doshi & Alexander Issa & Puneet Sachdeva & Sina Rafati & Somnath Rakshit, 2020. "Deep Stock Predictions," Papers 2006.04992, arXiv.org.
    6. 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.
    7. 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.
    8. 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.
    9. 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).
    10. Kaushal Attaluri & Mukesh Tripathi & Srinithi Reddy & Shivendra, 2024. "News-Driven Stock Price Forecasting in Indian Markets: A Comparative Study of Advanced Deep Learning Models," Papers 2411.05788, arXiv.org.
    11. Catalin Stoean & Wiesław Paja & Ruxandra Stoean & Adrian Sandita, 2019. "Deep architectures for long-term stock price prediction with a heuristic-based strategy for trading simulations," PLOS ONE, Public Library of Science, vol. 14(10), pages 1-19, October.
    12. Nestoras Chalkidis & Rahul Savani, 2021. "Trading via Selective Classification," Papers 2110.14914, arXiv.org, revised Oct 2021.
    13. 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.
    14. Jun Zhang & Lan Li & Wei Chen, 2021. "Predicting Stock Price Using Two-Stage Machine Learning Techniques," Computational Economics, Springer;Society for Computational Economics, vol. 57(4), pages 1237-1261, April.
    15. Supriya Bajpai, 2021. "Application of deep reinforcement learning for Indian stock trading automation," Papers 2106.16088, arXiv.org.
    16. Rui Zhang & Zhen Guo & Yujie Meng & Songwang Wang & Shaoqiong Li & Ran Niu & Yu Wang & Qing Guo & Yonghong Li, 2021. "Comparison of ARIMA and LSTM in Forecasting the Incidence of HFMD Combined and Uncombined with Exogenous Meteorological Variables in Ningbo, China," IJERPH, MDPI, vol. 18(11), pages 1-14, June.
    17. Shalini Sharma & Angshul Majumdar & Emilie Chouzenoux & Victor Elvira, 2023. "Deep State-Space Model for Predicting Cryptocurrency Price," Papers 2311.14731, arXiv.org.
    18. Hakan Gunduz, 2021. "An efficient stock market prediction model using hybrid feature reduction method based on variational autoencoders and recursive feature elimination," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 7(1), pages 1-24, December.
    19. Antonello Rosato & Rodolfo Araneo & Amedeo Andreotti & Federico Succetti & Massimo Panella, 2021. "2-D Convolutional Deep Neural Network for the Multivariate Prediction of Photovoltaic Time Series," Energies, MDPI, vol. 14(9), pages 1-18, April.
    20. Jireh Yi-Le Chan & Steven Mun Hong Leow & Khean Thye Bea & Wai Khuen Cheng & Seuk Wai Phoong & Zeng-Wei Hong & Yen-Lin Chen, 2022. "Mitigating the Multicollinearity Problem and Its Machine Learning Approach: A Review," Mathematics, MDPI, vol. 10(8), pages 1-17, April.

    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.