Stock Prediction Based on Transformer Model

Stock price forecasting is a critical tool for investors and traders to manage risks and make informed financial decisions in volatile markets. Traditional models often struggle with the non-linear and unpredictable nature of stock prices, leading to the adoption of advanced deep-learning techniques. In this study, we propose a LASSO-regularized Transformer model for stock price prediction, focusing on the encoder component to capture long-term dependencies in historical stock data. We evaluate the model's performance using MAPE across five Nepalese commercial banks and analyze the impact of different look-back periods on prediction accuracy. Our results show that the LASSO-Transformer achieves low MAPE values, with the best performance observed for shorter look-back periods (2-5 days). The model demonstrates robustness across different stocks, with the lowest MAPE of 1.4140% for SCB. This study highlights the effectiveness of combining feature selection (LASSO) with self-attention mechanisms (Transformer) for accurate stock price forecasting, offering practical insights for future applications in financial markets.

Authors

Institutions

Publication Details

Journal
National College of Computer Studies Research Journal
Published
2025-09-22
DOI
https://doi.org/10.3126/nccsrj.v4i1.84356
Primary Topic
Advanced Decision-Making Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Stock Prediction Based on Transformer Model

Sagar K. Tamang, Shruti Upadhyaya, Ekanta Rai, Janak Kumar Lal
National College of Computer Studies Research Journal
Advanced Decision-Making Techniques
article

Stock Prediction Based on Transformer Model

Sagar K. Tamang, Shruti Upadhyaya, Ekanta Rai, Janak Kumar Lal
article en

Abstract

Stock price forecasting is a critical tool for investors and traders to manage risks and make informed financial decisions in volatile markets. Traditional models often struggle with the non-linear and unpredictable nature of stock prices, leading to the adoption of advanced deep-learning techniques. In this study, we propose a LASSO-regularized Transformer model for stock price prediction, focusing on the encoder component to capture long-term dependencies in historical stock data. We evaluate the model's performance using MAPE across five Nepalese commercial banks and analyze the impact of different look-back periods on prediction accuracy. Our results show that the LASSO-Transformer achieves low MAPE values, with the best performance observed for shorter look-back periods (2-5 days). The model demonstrates robustness across different stocks, with the lowest MAPE of 1.4140% for SCB. This study highlights the effectiveness of combining feature selection (LASSO) with self-attention mechanisms (Transformer) for accurate stock price forecasting, offering practical insights for future applications in financial markets.

National College of Computer Studies Research JournalVol. 4(1)
Central Statistical Office (ZM)
Openalex Percentile: Top 62%
Advanced Decision-Making Techniques
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.