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

Institutions

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
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Constructing stock portfolio with transformer

Linkai Luo, Jingyuan Li
International Journal of Computational Science and Engineering
Energy Load and Power Forecasting
article

Constructing stock portfolio with transformer

Linkai Luo, Jingyuan Li
article en

Abstract

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.

International Journal of Computational Science and EngineeringVol. 28(4)
Xiamen University (CN)
Openalex Percentile: Top 82%
Energy Load and Power Forecasting
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Constructing stock portfolio with transformer — Linkai Luo, Jingyuan Li · International Journal of Computational Science and Engineering (2025) | TGRS Research Map | TGRS