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
- Sagar K. Tamang (ORCID: https://orcid.org/0000-0001-8301-3576)
- Shruti Upadhyaya (ORCID: https://orcid.org/0000-0002-1266-263X)
- Ekanta Rai
- Janak Kumar Lal
Institutions
- Central Statistical Office (ZM)
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