Table of Contents
Fetching ...

Mamba Meets Financial Markets: A Graph-Mamba Approach for Stock Price Prediction

Ali Mehrabian, Ehsan Hoseinzade, Mahdi Mazloum, Xiaohong Chen

TL;DR

Stock price prediction faces accuracy–complexity trade-offs: Transformer models deliver high accuracy but incur heavy computation. This paper introduces SAMBA, which combines a bidirectional Mamba block with an adaptive graph convolution block to model long-range temporal dependencies and inter-feature relationships with near-linear complexity. The BI-Mamba component processes forward and backward sequences to capture global temporal context, while the AGC component learns a task-specific graph among daily features and applies a K-th order spectral filter for information propagation. Experiments on NASDAQ, NYSE, and DJIA with 82 features show SAMBA achieving significant improvements in RMSE, IC, and RIC over strong baselines while reducing computational demands, supporting real-time applicability; the authors provide code at github.com/Ali-Meh619/SAMBA.

Abstract

Stock markets play an important role in the global economy, where accurate stock price predictions can lead to significant financial returns. While existing transformer-based models have outperformed long short-term memory networks and convolutional neural networks in financial time series prediction, their high computational complexity and memory requirements limit their practicality for real-time trading and long-sequence data processing. To address these challenges, we propose SAMBA, an innovative framework for stock return prediction that builds on the Mamba architecture and integrates graph neural networks. SAMBA achieves near-linear computational complexity by utilizing a bidirectional Mamba block to capture long-term dependencies in historical price data and employing adaptive graph convolution to model dependencies between daily stock features. Our experimental results demonstrate that SAMBA significantly outperforms state-of-the-art baseline models in prediction accuracy, maintaining low computational complexity. The code and datasets are available at github.com/Ali-Meh619/SAMBA.

Mamba Meets Financial Markets: A Graph-Mamba Approach for Stock Price Prediction

TL;DR

Stock price prediction faces accuracy–complexity trade-offs: Transformer models deliver high accuracy but incur heavy computation. This paper introduces SAMBA, which combines a bidirectional Mamba block with an adaptive graph convolution block to model long-range temporal dependencies and inter-feature relationships with near-linear complexity. The BI-Mamba component processes forward and backward sequences to capture global temporal context, while the AGC component learns a task-specific graph among daily features and applies a K-th order spectral filter for information propagation. Experiments on NASDAQ, NYSE, and DJIA with 82 features show SAMBA achieving significant improvements in RMSE, IC, and RIC over strong baselines while reducing computational demands, supporting real-time applicability; the authors provide code at github.com/Ali-Meh619/SAMBA.

Abstract

Stock markets play an important role in the global economy, where accurate stock price predictions can lead to significant financial returns. While existing transformer-based models have outperformed long short-term memory networks and convolutional neural networks in financial time series prediction, their high computational complexity and memory requirements limit their practicality for real-time trading and long-sequence data processing. To address these challenges, we propose SAMBA, an innovative framework for stock return prediction that builds on the Mamba architecture and integrates graph neural networks. SAMBA achieves near-linear computational complexity by utilizing a bidirectional Mamba block to capture long-term dependencies in historical price data and employing adaptive graph convolution to model dependencies between daily stock features. Our experimental results demonstrate that SAMBA significantly outperforms state-of-the-art baseline models in prediction accuracy, maintaining low computational complexity. The code and datasets are available at github.com/Ali-Meh619/SAMBA.
Paper Structure (8 sections, 10 equations, 2 figures, 1 table, 1 algorithm)

This paper contains 8 sections, 10 equations, 2 figures, 1 table, 1 algorithm.

Figures (2)

  • Figure 1: Close Price (in USD) for Dow Jones Industrial Average (DJIA), NASDAQ, and New York Stock Exchange (NYSE) stock markets from $2010$ to $2023$.
  • Figure 2: Illustration of the proposed SAMAB model. (a) Architecture of the Mamba model. (b) The overall architecture of the bidirectional-Mamba block and adaptive graph convolutional block.