Constructing stock portfolio with transformer
Machine learning methods have been applied to quantitative investing, yet the application of transformer models remains limited. Stock prices are influenced by both long-term and short-term features. Existing methods usually treat the influencing factors as a whole and do not distinguish them. In this paper, we introduce a transformer encoder-decoder architecture tailored for the capture of long-term and short-term features. By partitioning historical data into long-term and short-term parts, the encoder module concentrates on extracting long-term features, while the decoder concentrates on short-term features and the integration of long and short-term features. Portfolios are then constructed from the top N predicted stocks. Experimental results show that the proposed transformer model outperforms the existing state-ofthe- art methods, LSTM, RNN, and GRU models, with improvements of 26%, 19%, and 14% in annualised returns for long-short portfolio combinations, respectively. It indicates the benefits of extracting long-term and short-term features separately.
Authors
- Linkai Luo
- Jingyuan Li (ORCID: https://orcid.org/0000-0003-2926-1864)
Institutions
- Xiamen University (CN)
Publication Details
- Journal
- International Journal of Computational Science and Engineering
- Published
- 2025-01-01
- DOI
- https://doi.org/10.1504/ijcse.2025.147607
- Primary Topic
- Energy Load and Power Forecasting
- Type
- article
- Field-Weighted Citation Impact
- 0.00