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

MambaLLM: Integrating Macro-Index and Micro-Stock Data for Enhanced Stock Price Prediction

Author

Listed:
  • Jin Yan

    (School of Computer Science and Engineering, Macau University of Science and Technology, Taipa, Macao, China)

  • Yuling Huang

    (School of Computer Science and Software, Zhaoqing University, Zhaoqing 526000, China)

Abstract

Accurate stock price prediction requires the integration of heterogeneous data streams, yet conventional techniques struggle to simultaneously leverage fine-grained micro-stock features and broader macroeconomic indicators. To address this gap, we propose MambaLLM, a novel framework that fuses macro-index and micro-stock inputs through the synergistic use of state-space models (SSMs) and large language models (LLMs). Our two-branch architecture comprises (i) Micro-Stock Encoder, a Mamba-based temporal encoder for processing granular stock-level data (prices, volumes, and technical indicators), and (ii) Macro-Index Analyzer, an LLM module—employing DeepSeek R1 7B distillation—capable of interpreting market-level index trends (e.g., S&P 500) to produce textual summaries. These summaries are then distilled into compact embeddings via FinBERT. By merging these multi-scale representations through a concatenation mechanism and subsequently refining them with multi-layer perceptrons (MLPs), MambaLLM dynamically captures both asset-specific price behavior and systemic market fluctuations. Extensive experiments on six major U.S. stocks (AAPL, AMZN, MSFT, TSLA, GOOGL, and META) reveal that MambaLLM delivers up to a 28.50% reduction in RMSE compared with suboptimal models, surpassing traditional recurrent neural networks and MAMBA-based baselines under volatile market conditions. This marked performance gain highlights the framework’s unique ability to merge structured financial time series with semantically rich macroeconomic narratives. Altogether, our findings underscore the scalability and adaptability of MambaLLM, offering a powerful, next-generation tool for financial forecasting and risk management.

Suggested Citation

  • Jin Yan & Yuling Huang, 2025. "MambaLLM: Integrating Macro-Index and Micro-Stock Data for Enhanced Stock Price Prediction," Mathematics, MDPI, vol. 13(10), pages 1-25, May.
  • Handle: RePEc:gam:jmathe:v:13:y:2025:i:10:p:1599-:d:1654973
    as

    Download full text from publisher

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

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

    References listed on IDEAS

    as
    1. Sidra Mehtab & Jaydip Sen, 2020. "Stock Price Prediction Using Convolutional Neural Networks on a Multivariate Timeseries," Papers 2001.09769, arXiv.org.
    2. Shayan Halder, 2022. "FinBERT-LSTM: Deep Learning based stock price prediction using News Sentiment Analysis," Papers 2211.07392, arXiv.org.
    3. Christopher Wimmer & Navid Rekabsaz, 2023. "Leveraging Vision-Language Models for Granular Market Change Prediction," Papers 2301.10166, 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. Jaydip Sen & Ashwin Kumar R S & Geetha Joseph & Kaushik Muthukrishnan & Koushik Tulasi & Praveen Varukolu, 2022. "Precise Stock Price Prediction for Robust Portfolio Design from Selected Sectors of the Indian Stock Market," Papers 2201.05570, arXiv.org.
    2. Adrian Millea, 2021. "Deep Reinforcement Learning for Trading—A Critical Survey," Data, MDPI, vol. 6(11), pages 1-25, November.
    3. Yuqi Nie & Yaxuan Kong & Xiaowen Dong & John M. Mulvey & H. Vincent Poor & Qingsong Wen & Stefan Zohren, 2024. "A Survey of Large Language Models for Financial Applications: Progress, Prospects and Challenges," Papers 2406.11903, arXiv.org.
    4. Jian-fei, Li & Han, Peng & Xiao-yu, Luo, 2024. "A predictive model for the security and stability of the lithium-ion battery industry chain based on price modal combinations," Resources Policy, Elsevier, vol. 99(C).
    5. Anishka Chauhan & Pratham Mayur & Yeshwanth Sai Gokarakonda & Pooriya Jamie & Naman Mehrotra, 2024. "Indian Stock Market Prediction using Augmented Financial Intelligence ML," Papers 2407.02236, arXiv.org.
    6. Sidra Mehtab & Jaydip Sen, 2020. "A Time Series Analysis-Based Stock Price Prediction Using Machine Learning and Deep Learning Models," Papers 2004.11697, arXiv.org, revised May 2021.
    7. Yuzhe Yang & Yifei Zhang & Yan Hu & Yilin Guo & Ruoli Gan & Yueru He & Mingcong Lei & Xiao Zhang & Haining Wang & Qianqian Xie & Jimin Huang & Honghai Yu & Benyou Wang, 2024. "UCFE: A User-Centric Financial Expertise Benchmark for Large Language Models," Papers 2410.14059, arXiv.org, revised Feb 2025.

    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:10:p:1599-:d:1654973. 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.