Next Article in Journal
A Class-F High-Power Rectifier Circuit Based on Admittance Matching
Previous Article in Journal
Parameter Identification of SiC MOSFET Half-Bridge Converters Using a Multi-Objective Optimization Method
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
This is an early access version, the complete PDF, HTML, and XML versions will be available soon.
Article

HRformer: A Hybrid Relational Transformer for Stock Time Series Forecasting

1
School of Computer Science, Guangdong University of Education, Guangzhou 510303, China
2
School of Mathematics and Statistics, Wuhan University of Technology, Wuhan 430070, China
*
Authors to whom correspondence should be addressed.
Electronics 2025, 14(22), 4459; https://doi.org/10.3390/electronics14224459 (registering DOI)
Submission received: 19 October 2025 / Revised: 12 November 2025 / Accepted: 13 November 2025 / Published: 15 November 2025
(This article belongs to the Section Artificial Intelligence)

Abstract

Stock trend prediction is a complex and crucial task due to the dynamic and nonlinear nature of stock price movements. Traditional models struggle to capture the non-stationary and volatile characteristics of financial time series. To address this challenge, we propose the Hybrid Relational Transformer (HRformer), which specifically decomposes time series into multiple components, enabling more accurate modeling of both short-term and long-term dependencies in stock data. The HRformer mainly comprises three key modules: the Multi-Component Decomposition Layer, the Component-wise Temporal Encoder (CTE), and the Inter-Stock Correlation Attention (ISCA). Our approach first employs the Multi-Component Decomposition Layer to decompose the stock sequence into trend, cyclic, and volatility components, each of which is independently modeled by the CTE to capture distinct temporal dynamics. These component representations are then adaptively integrated through the Adaptive Multi-Component Integration (AMCI) mechanism, which dynamically fuses their information. The fused output is subsequently refined by the ISCA module to incorporate inter-stock correlations, leading to more accurate and robust predictions. Extensive experiments on the NASDAQ100 and CSI300 datasets demonstrate that HRformer consistently outperforms state-of-the-art methods, e.g., achieving about 0.83% higher Accuracy and 1.78% higher F1-score than TDformer on NASDAQ100, with Sharpe Ratios of 1.5354 on NASDAQ100 and 0.5398 on CSI300, especially in volatile market conditions. Backtesting results validate its practical utility in real-world trading scenarios, showing its potential to enhance investment decisions and portfolio performance.
Keywords: stock trend prediction; time series decomposition; Transformer Networks stock trend prediction; time series decomposition; Transformer Networks

Share and Cite

MDPI and ACS Style

Xu, H.; Wan, H.; Wu, Y.; Zheng, J.; Xie, L. HRformer: A Hybrid Relational Transformer for Stock Time Series Forecasting. Electronics 2025, 14, 4459. https://doi.org/10.3390/electronics14224459

AMA Style

Xu H, Wan H, Wu Y, Zheng J, Xie L. HRformer: A Hybrid Relational Transformer for Stock Time Series Forecasting. Electronics. 2025; 14(22):4459. https://doi.org/10.3390/electronics14224459

Chicago/Turabian Style

Xu, Haijiao, Hongyang Wan, Yilin Wu, Jiankai Zheng, and Liang Xie. 2025. "HRformer: A Hybrid Relational Transformer for Stock Time Series Forecasting" Electronics 14, no. 22: 4459. https://doi.org/10.3390/electronics14224459

APA Style

Xu, H., Wan, H., Wu, Y., Zheng, J., & Xie, L. (2025). HRformer: A Hybrid Relational Transformer for Stock Time Series Forecasting. Electronics, 14(22), 4459. https://doi.org/10.3390/electronics14224459

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop