MaGNet
MaGNet: A Mamba Dual-Hypergraph Network for Stock Prediction via Temporal-Causal and Global Relational Learning
Install / Use
/learn @PeilinTime/MaGNetREADME
MaGNet: A Mamba Dual-Hypergraph Network for Stock Prediction via Temporal-Causal and Global Relational Learning
The repo is the official implementation for the paper: MaGNet: A Mamba Dual-Hypergraph Network for Stock Prediction via Temporal-Causal and Global Relational Learning .
Introduction 📖
MaGNet is a Mamba dual-hypergraph network that integrates advanced temporal modeling with dual hypergraph relational learning to capture both causal and global market dependencies.
Framework Overview

Datasets & Model Weights 📦
All datasets and model weights are available on Google Drive: 👉 Download Link
Included datasets:
- DJIA
- NASDAQ 100
- CSI 300
How to Run MaGNet 🚀
1. Download this repository
Download or clone this code repository to your local machine.
2. For Training and Prediction
Download one of the datasets from the Google Drive link above:
- DJIA:
djia_alpha158_alpha360.pt - NASDAQ100:
nas100_alpha158_alpha360.pt - CSI300:
csi300_alpha158_alpha360.pt
Place the downloaded file in the same directory as the codebase. Run the following command to train the model and make predictions (including training, validation, and test sets):
python train.py
3. For Backtesting
Download the dataset and its corresponding model weight from the same link:
- DJIA:
djia_alpha158_alpha360.pt&djia_weight.pt - NASDAQ100:
nas100_alpha158_alpha360.pt&nas100_weight.pt - CSI300:
csi300_alpha158_alpha360.pt&csi300_weight.pt
Place the downloaded files in the same directory as the codebase. Run the following command to perform backtesting and results:
python backtest.py
Backtesting Results 📈
Below are the backtesting performance charts of MaGNet on all datasets:

Citation
We would appreciate it if you could cite the following paper if you found the repository useful for your work:
@misc{tan2025magnetmambadualhypergraphnetwork,
title={MaGNet: A Mamba Dual-Hypergraph Network for Stock Prediction via Temporal-Causal and Global Relational Learning},
author={Peilin Tan and Chuanqi Shi and Dian Tu and Liang Xie},
year={2025},
eprint={2511.00085},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2511.00085},
}
Related Skills
YC-Killer
2.7kA library of enterprise-grade AI agents designed to democratize artificial intelligence and provide free, open-source alternatives to overvalued Y Combinator startups. If you are excited about democratizing AI access & AI agents, please star ⭐️ this repository and use the link in the readme to join our open source AI research team.
best-practices-researcher
The most comprehensive Claude Code skills registry | Web Search: https://skills-registry-web.vercel.app
groundhog
398Groundhog's primary purpose is to teach people how Cursor and all these other coding agents work under the hood. If you understand how these coding assistants work from first principles, then you can drive these tools harder (or perhaps make your own!).
isf-agent
a repo for an agent that helps researchers apply for isf funding
