Stockformer: A Price-Volume Factor Stock Selection Model Based on Wavelet Transform and Multi-Task Self-Attention Networks

ArXiv ID: 2401.06139 “View on arXiv”

Authors: Unknown

Abstract

As the Chinese stock market continues to evolve and its market structure grows increasingly complex, traditional quantitative trading methods are facing escalating challenges. Particularly, due to policy uncertainty and the frequent market fluctuations triggered by sudden economic events, existing models often struggle to accurately predict market dynamics. To address these challenges, this paper introduces Stockformer, a price-volume factor stock selection model that integrates wavelet transformation and a multitask self-attention network, aimed at enhancing responsiveness and predictive accuracy regarding market instabilities. Through discrete wavelet transform, Stockformer decomposes stock returns into high and low frequencies, meticulously capturing long-term market trends and short-term fluctuations, including abrupt events. Moreover, the model incorporates a Dual-Frequency Spatiotemporal Encoder and graph embedding techniques to effectively capture complex temporal and spatial relationships among stocks. Employing a multitask learning strategy, it simultaneously predicts stock returns and directional trends. Experimental results show that Stockformer outperforms existing advanced methods on multiple real stock market datasets. In strategy backtesting, Stockformer consistently demonstrates exceptional stability and reliability across market conditions-whether rising, falling, or fluctuating-particularly maintaining high performance during downturns or volatile periods, indicating a high adaptability to market fluctuations. To foster innovation and collaboration in the financial analysis sector, the Stockformer model’s code has been open-sourced and is available on the GitHub repository: https://github.com/Eric991005/Multitask-Stockformer.

Keywords: Stock Market, Quantitative Trading, Factor Models, Wavelet Transformation, Self-Attention Network

Complexity vs Empirical Score

  • Math Complexity: 7.5/10
  • Empirical Rigor: 8.0/10
  • Quadrant: Holy Grail
  • Why: The model employs advanced techniques like wavelet transforms, self-attention networks, and graph embeddings, requiring significant mathematical sophistication. It is highly empirical with a reported backtested strategy on real market data, open-sourced code, and specific performance metrics across different market conditions.
  flowchart TD
    A["Research Goal:<br>Enhance stock selection in volatile markets"] --> B["Input Data:<br>Chinese Stock Market Prices & Volumes"]
    B --> C["Key Methodology:<br>Discrete Wavelet Transform DWT"]
    C --> D{"Decomposition"}
    D --> E["High-Freq: Short-term fluctuations & abrupt events"]
    D --> F["Low-Freq: Long-term market trends"]
    E & F --> G["Multi-Task Self-Attention Network"]
    G --> H["Computational Process:<br>Dual-Frequency Spatiotemporal Encoder & Graph Embedding"]
    H --> I["Key Outcomes:<br>Simultaneous Prediction of Returns & Direction"]
    I --> J["Findings:<br>Superior performance & stability across market conditions"]