English

Quantformer: from attention to profit with a quantitative transformer trading strategy

Mathematical Finance 2026-02-24 v3 Artificial Intelligence Computational Engineering, Finance, and Science

Abstract

In traditional quantitative trading practice, navigating the complicated and dynamic financial market presents a persistent challenge. Fully capturing various market variables, including long-term information, as well as essential signals that may lead to profit remains a difficult task for learning algorithms. In order to tackle this challenge, this paper introduces quantformer, an enhanced neural network architecture based on transformer, to build investment factors. By transfer learning from sentiment analysis, quantformer not only exploits its original inherent advantages in capturing long-range dependencies and modeling complex data relationships, but is also able to solve tasks with numerical inputs and accurately forecast future returns over a given period. This work collects more than 5,000,000 rolling data of 4,601 stocks in the Chinese capital market from 2010 to 2023. The results of this study demonstrate the model's superior performance in predicting stock trends compared with other 100-factor-based quantitative strategies. Notably, the model's innovative use of transformer-like model to establish factors, in conjunction with market sentiment information, has been shown to enhance the accuracy of trading signals significantly, thereby offering promising implications for the future of quantitative trading strategies.

Keywords

Cite

@article{arxiv.2404.00424,
  title  = {Quantformer: from attention to profit with a quantitative transformer trading strategy},
  author = {Zhaofeng Zhang and Banghao Chen and Shengxin Zhu and Nicolas Langrené},
  journal= {arXiv preprint arXiv:2404.00424},
  year   = {2026}
}

Comments

The implementation details and code is available on https://github.com/zhangmordred/QuantFormer