Transformer Encoder and Multi-features Time2Vec for Financial Prediction

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Bui, Nguyen Kim Hai, Chien, Nguyen Duy, Kovács, Péter, Bognár, Gergő
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918201809436672
author Bui, Nguyen Kim Hai
Chien, Nguyen Duy
Kovács, Péter
Bognár, Gergő
author_facet Bui, Nguyen Kim Hai
Chien, Nguyen Duy
Kovács, Péter
Bognár, Gergő
contents Financial prediction is a complex and challenging task of time series analysis and signal processing, expected to model both short-term fluctuations and long-term temporal dependencies. Transformers have remarkable success mostly in natural language processing using attention mechanism, which also influenced the time series community. The ability to capture both short and long-range dependencies helps to understand the financial market and to recognize price patterns, leading to successful applications of Transformers in stock prediction. Although, the previous research predominantly focuses on individual features and singular predictions, that limits the model's ability to understand broader market trends. In reality, within sectors such as finance and technology, companies belonging to the same industry often exhibit correlated stock price movements. In this paper, we develop a novel neural network architecture by integrating Time2Vec with the Encoder of the Transformer model. Based on the study of different markets, we propose a novel correlation feature selection method. Through a comprehensive fine-tuning of multiple hyperparameters, we conduct a comparative analysis of our results against benchmark models. We conclude that our method outperforms other state-of-the-art encoding methods such as positional encoding, and we also conclude that selecting correlation features enhance the accuracy of predicting multiple stock prices.
format Preprint
id arxiv_https___arxiv_org_abs_2504_13801
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Transformer Encoder and Multi-features Time2Vec for Financial Prediction
Bui, Nguyen Kim Hai
Chien, Nguyen Duy
Kovács, Péter
Bognár, Gergő
Machine Learning
Computational Engineering, Finance, and Science
Financial prediction is a complex and challenging task of time series analysis and signal processing, expected to model both short-term fluctuations and long-term temporal dependencies. Transformers have remarkable success mostly in natural language processing using attention mechanism, which also influenced the time series community. The ability to capture both short and long-range dependencies helps to understand the financial market and to recognize price patterns, leading to successful applications of Transformers in stock prediction. Although, the previous research predominantly focuses on individual features and singular predictions, that limits the model's ability to understand broader market trends. In reality, within sectors such as finance and technology, companies belonging to the same industry often exhibit correlated stock price movements. In this paper, we develop a novel neural network architecture by integrating Time2Vec with the Encoder of the Transformer model. Based on the study of different markets, we propose a novel correlation feature selection method. Through a comprehensive fine-tuning of multiple hyperparameters, we conduct a comparative analysis of our results against benchmark models. We conclude that our method outperforms other state-of-the-art encoding methods such as positional encoding, and we also conclude that selecting correlation features enhance the accuracy of predicting multiple stock prices.
title Transformer Encoder and Multi-features Time2Vec for Financial Prediction
topic Machine Learning
Computational Engineering, Finance, and Science
url https://arxiv.org/abs/2504.13801