Hybrid Time Series Forecasting of Apple Stock Prices Using Mini-Transformer and Lstm Models
Forecasting stock prices requires models capable of navigating complex, nonlinear patterns under volatile market conditions. This research proposes a hybrid deep learning frame- work that integrates Mini Transformer and LSTM architecture to predict Apple Inc.'s daily closing prices. Historical stock data were collected via the yfinance library and preprocessed using scaling and sliding window techniques to create sequences. Each model used in this research (Mini Transformer, LSTM, and the proposed hybrid) was evaluated using Mean Absolute Error (MAE), Mean Squared Error (MSE), and Mean Absolute Percentage Error (MAPE). Results shows that the hybrid model achieves superior predictive accuracy, with an MAPE of 1.6 %, MAE of 2.4847 and an MSE of 10.4762, outperforming standalone method approaches. While the Mini Transformer and LSTM models each capture temporal features to some degree, the hybrid design leverages global attention mechanisms along with recurrent layers, resulting in a more robust forecasts. Insights from this research suggest that combining self-attention with recurrent memory cells can help mitigate the noise and structural shifts in financial time series. Future research could incorporate more complex market signals and larger-scale Transformers to further refine predictive performance in real-world trading applications.
Authors
- Alexander Agung Gunawan Santoso
- Romington Hydro
- Zefanya Delvin Sulistiya
Institutions
- Binus University (ID)
Publication Details
- Published
- 2025-06-12
- DOI
- https://doi.org/10.1109/icera66156.2025.11087271
- Primary Topic
- Stock Market Forecasting Methods
- Type
- article
- Field-Weighted Citation Impact
- 0.00