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

Read original: arXiv:2401.06139 - Published 6/18/2024 by Bohan Ma, Yushan Xue, Yuan Lu, Jing Chen
Total Score

0

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

Sign in to get full access

or

If you already have an account, we'll log you in

Overview

  • The paper introduces a swing trading strategy called "StockFormer" that uses a combination of Seasonal and Trend decomposition (STL) and self-attention networks to predict stock price movements.
  • Swing trading is a style of trading that aims to profit from medium-term price swings in the market.
  • The proposed strategy leverages both the trend and seasonal components of stock price data to make more accurate predictions.
  • The self-attention mechanism in the neural network model helps capture the complex dependencies in the time series data.

Plain English Explanation

The paper presents a new approach to swing trading, which is a type of trading that focuses on profiting from medium-term price changes in the stock market. The key idea is to decompose the stock price data into its underlying trend and seasonal components using a technique called STL decomposition. This helps the model better understand the different factors driving the stock prices.

The researchers then feed this decomposed data into a neural network model that uses a self-attention mechanism. This allows the model to identify and capture the complex relationships within the time series data, which is crucial for making accurate predictions about future price movements.

The combination of STL decomposition and self-attention networks, which the authors call "StockFormer", outperforms other commonly used approaches for stock price prediction, according to the results presented in the paper.

Technical Explanation

The paper proposes a novel swing trading strategy called "StockFormer" that leverages Seasonal and Trend decomposition (STL) and self-attention networks to predict future stock price movements.

The researchers first use the STL decomposition technique to separate the stock price time series into its trend and seasonal components. This allows the model to better understand the underlying drivers of the stock price dynamics.

The decomposed data is then fed into a neural network architecture that uses a self-attention mechanism. This self-attention layer helps the model capture the complex dependencies and relationships within the time series data, which is crucial for making accurate predictions.

The experimental results show that the proposed StockFormer strategy outperforms other commonly used approaches, such as LSTM and transformer-based models, in terms of various performance metrics, including profitability and drawdown.

Critical Analysis

The paper provides a compelling approach to swing trading by leveraging the strengths of STL decomposition and self-attention networks. However, the authors acknowledge that the performance of the strategy may be limited to the specific market conditions and asset classes analyzed in the study.

Additionally, the paper does not discuss the computational complexity and training time of the StockFormer model, which could be an important consideration for real-world deployment. The authors also do not explore the robustness of the strategy to market volatility or its performance during different economic cycles.

Further research could investigate the applicability of the StockFormer strategy to a wider range of asset classes, as well as its sensitivity to hyperparameter tuning and the inclusion of additional market data or features.

Conclusion

The "StockFormer" strategy presented in this paper demonstrates the potential of combining time series decomposition techniques and self-attention networks for swing trading. By separating the stock price data into trend and seasonal components, and then using a self-attention mechanism to capture the complex dependencies, the model is able to make more accurate predictions about future price movements.

This approach could have significant implications for the field of algorithmic trading, as it provides a more sophisticated and potentially more profitable way to navigate the stock market's medium-term price swings. However, further research is needed to explore the strategy's robustness and applicability to a broader range of assets and market conditions.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Follow @aimodelsfyi on 𝕏 →

Related Papers

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

0

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

Bohan Ma, Yushan Xue, Yuan Lu, Jing Chen

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.

Read more

6/18/2024

🤖

Total Score

0

An End-to-End Structure with Novel Position Mechanism and Improved EMD for Stock Forecasting

Chufeng Li, Jianyong Chen

As a branch of time series forecasting, stock movement forecasting is one of the challenging problems for investors and researchers. Since Transformer was introduced to analyze financial data, many researchers have dedicated themselves to forecasting stock movement using Transformer or attention mechanisms. However, existing research mostly focuses on individual stock information but ignores stock market information and high noise in stock data. In this paper, we propose a novel method using the attention mechanism in which both stock market information and individual stock information are considered. Meanwhile, we propose a novel EMD-based algorithm for reducing short-term noise in stock data. Two randomly selected exchange-traded funds (ETFs) spanning over ten years from US stock markets are used to demonstrate the superior performance of the proposed attention-based method. The experimental analysis demonstrates that the proposed attention-based method significantly outperforms other state-of-the-art baselines. Code is available at https://github.com/DurandalLee/ACEFormer.

Read more

4/12/2024

Enhanced forecasting of stock prices based on variational mode decomposition, PatchTST, and adaptive scale-weighted layer
Total Score

0

Enhanced forecasting of stock prices based on variational mode decomposition, PatchTST, and adaptive scale-weighted layer

Xiaorui Xue, Shaofang Li, Xiaonan Wang

The significant fluctuations in stock index prices in recent years highlight the critical need for accurate forecasting to guide investment and financial strategies. This study introduces a novel composite forecasting framework that integrates variational mode decomposition (VMD), PatchTST, and adaptive scale-weighted layer (ASWL) to address these challenges. Utilizing datasets of four major stock indices--SP500, DJI, SSEC, and FTSE--from 2000 to 2024, the proposed method first decomposes the raw price series into intrinsic mode functions (IMFs) using VMD. Each IMF is then modeled with PatchTST to capture temporal patterns effectively. The ASWL module is applied to incorporate scale information, enhancing prediction accuracy. The final forecast is derived by aggregating predictions from all IMFs. The VMD-PatchTST-ASWL framework demonstrates significant improvements in forecasting accuracy compared to traditional models, showing robust performance across different indices. This innovative approach provides a powerful tool for stock index price forecasting, with potential applications in various financial analysis and investment decision-making contexts.

Read more

8/30/2024

StockTime: A Time Series Specialized Large Language Model Architecture for Stock Price Prediction
Total Score

0

StockTime: A Time Series Specialized Large Language Model Architecture for Stock Price Prediction

Shengkun Wang, Taoran Ji, Linhan Wang, Yanshen Sun, Shang-Ching Liu, Amit Kumar, Chang-Tien Lu

The stock price prediction task holds a significant role in the financial domain and has been studied for a long time. Recently, large language models (LLMs) have brought new ways to improve these predictions. While recent financial large language models (FinLLMs) have shown considerable progress in financial NLP tasks compared to smaller pre-trained language models (PLMs), challenges persist in stock price forecasting. Firstly, effectively integrating the modalities of time series data and natural language to fully leverage these capabilities remains complex. Secondly, FinLLMs focus more on analysis and interpretability, which can overlook the essential features of time series data. Moreover, due to the abundance of false and redundant information in financial markets, models often produce less accurate predictions when faced with such input data. In this paper, we introduce StockTime, a novel LLM-based architecture designed specifically for stock price data. Unlike recent FinLLMs, StockTime is specifically designed for stock price time series data. It leverages the natural ability of LLMs to predict the next token by treating stock prices as consecutive tokens, extracting textual information such as stock correlations, statistical trends and timestamps directly from these stock prices. StockTime then integrates both textual and time series data into the embedding space. By fusing this multimodal data, StockTime effectively predicts stock prices across arbitrary look-back periods. Our experiments demonstrate that StockTime outperforms recent LLMs, as it gives more accurate predictions while reducing memory usage and runtime costs.

Read more

9/16/2024