Enhancing Stock Price Prediction Using Temporal Convolutional Network with Moving Average Features
DOI:
https://doi.org/10.25170/jurnalelektro.v19i1.7882Keywords:
TCN, CNN, Prediction, Stock PriceAbstract
Stock price prediction is a complex problem in the financial domain due to the non-linear, dynamic nature of the data and its dependence on various external factors. This study proposes a deep learning–based approach using a Temporal Convolutional Network (TCN) to predict the stock price of Bank Central Asia Tbk. The model is evaluated under two scenarios: using a single feature (close price) and using three features MA5, and MA10. The dataset consists of historical BBCA stock data from 2010 to 2018, split into 80% training data and 20% testing data. The model is trained with 100 epochs, a window size of 60, batch size of 32, the Adam optimizer, and a learning rate of 0.0005. Experimental results show that the TCN model using a single feature achieves an RMSE of 227.1920, MAE of 192.8089, and MAPE of 4.3411%. Meanwhile, the TCN model with additional features (MA5 and MA10) demonstrates improved performance, achieving an RMSE of 176.4599, MAE of 145.7689, and MAPE of 3.2750%, indicating an accuracy improvement of more than 20%.These findings indicate that TCN is effective in capturing temporal patterns in financial time series data, and that incorporating simple technical indicators such as Moving Averages can significantly enhance model performance. This study contributes to the development of efficient and practical stock price prediction methods, particularly in the Indonesian stock market context.
References
[1] X. Li, H. Yang, and J. Gao “Deep learning approaches for stock market prediction: A comparative study,” Neurocomputing, 2022.
[2] R. Patel and M. Shah, “Stock market prediction using decision tree algorithm,” Journal of Finance and Data Science, 2021.
[3] S. Kumar et al., “Random forest-based stock price prediction using technical indicators,” IEEE Access, 2022.
[4] J. Wang et al., “Support vector machine for stock market prediction: A systematic review,” Applied Sciences, 2020.
[5] Y. Liu et al., “Temporal convolutional networks for stock prediction,” IEEE Access, 2021.
[6] A. Sherstinsky, "Fundamentals of recurrent neural network (RNN) and long short-term memory (LSTM) network," Physica D: Nonlinear Phenomena, vol. 404, p. 132306, Mar. 2020. doi: 10.1016/j.physd.2019.132306
[7] S. Bai, J. Z. Kolter, dan V. Koltun, "An empirical evaluation of generic convolutional and recurrent networks for sequence modeling," arXiv preprint, arXiv:1803.01271, Mar. 2018. doi: 10.48550/arXiv.1803.01271.
[8] S. Bai, J. Z. Kolter, and V. Koltun, “An empirical evaluation of convolutional and recurrent networks for sequence modeling,” arXiv preprint arXiv:1803.01271, relevance extended 2020–2023.
[9] Y. Wu, Z. Zhao, X. Li, F. Zhang, Z. Chen, dan G. Zhao, "Time series prediction using sparse autoencoder and high-order fuzzy cognitive maps," IEEE Transactions on Fuzzy Systems, vol. 28, no. 12, pp. 3110-3122, Dec. 2020, doi: 10.1109/TFUZZ.2020.2964344.
[10] K. He, X. Zhang, S. Ren, dan J. Sun, "Deep residual learning for image recognition," dalam Proc. IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, Jun. 2016, p. 770–778. doi: 10.1109/CVPR.2016.90
[11] C. X. Zhang, J. Li, X. F. Huang, J. S. Zhang, and H. C. Huang, "Forecasting stock volatility and value-at-risk based on temporal convolutional networks," Expert Systems with Applications, vol. 207, p. 117951, 2022. doi: 10.1016/j.eswa.2022.117951
[12] H. Zhang et al., “Financial time series forecasting using TCN,” Expert Systems with Applications, 2023.
[13] W. Bao, Y. Cao, Y. Yang, H. Che, J. Huang, and S. Wen, "Data-driven stock forecasting models based on neural networks: A review," Information Fusion, vol. 113, p. 102616, Jan. 2025. doi: 10.1016/j.inffus.2024.102616
[14] S. Giantsidi and C. Tarantola, "Deep learning for financial forecasting: A review of recent trends," International Review of Economics & Finance, vol. 104, 2025. doi: 10.1016/j.iref.2025.104719
[15] R. Abraham, M. El Samad, A. M. Bakhach, H. El-Chaarani, A. Sardouk, S. El Nemar, and D. Jaber, "Forecasting a stock trend using genetic algorithm and random forest," Journal of Risk and Financial Management, vol. 15, no. 5, p. 188, Apr. 2022. doi: 10.3390/jrfm15050188
[16] M. Saberironaghi dan A. Saberironaghi, "Stock market prediction using machine learning and deep learning techniques: A review," AppliedMath, vol. 5, no. 3, p. 76, 2025. doi: 10.3390/appliedmath5030076
[17] S. M. Mostafavi dan A. R. Hooman, "Key technical indicators for stock market prediction," Machine Learning with Applications, vol. 20, p. 100631, Jun. 2025. doi: 10.1016/j.mlwa.2025.100631
[18] N. Ayyildiz and O. Iskenderoglu, "How effective is machine learning in stock market predictions?" Heliyon, vol. 10, no. 2, p. e24123, Jan. 2024. doi: 10.1016/j.heliyon.2024.e24123
[19] T. Kundu et al., "Predicting daily stock price directions with deep learning models," Machine Learning with Applications, vol. 19, p. 100617, 2025. doi: 10.1016/j.mlwa.2024.100617
[20] M. T. Gholami dan A. Shahabi, "Comparison of deep learning methods with traditional financial time series models for forecasting the TEPIX index in the Tehran Stock Exchange," Systems and Soft Computing, vol. -, p. 200395, 2025. doi: 10.1016/j.sasc.2025.200395
[21] W. Chen, N. An, M. Jiang, dan L. Jia, "An improved deep temporal convolutional network for new energy stock index prediction," Information Sciences, vol. 682, p. 121244, Jul. 2024. doi: 10.1016/j.ins.2024.121244
[22] Y. Yao, Z. Y. Zhang, dan Y. Zhao, "Stock index forecasting based on multivariate empirical mode decomposition and temporal convolutional networks," Applied Soft Computing, vol. 142, p. 110356, 2023. doi: 10.1016/j.asoc.2023.110356
[23] Y. Liu, X. Huang, L. Xiong, R. Chang, W. Wang, and L. Chen, "Stock price prediction with attentive temporal convolution-based generative adversarial network," Array, vol. 25, p. 100374, Mar. 2025. doi: 10.1016/j.array.2025.100374
[24] C. Wang, J. Ren, H. Liang, J. Gong, and B. Wang, "Conducting stock market index prediction via the localized spatial–temporal convolutional network," Computers & Electrical Engineering, vol. 108, p. 108687, 2023. doi: 10.1016/j.compeleceng.2023.108687
[25] L. Xie, Z. Chen, dan S. Yu, "Deep Convolutional Transformer Network for Stock Movement Prediction," Electronics, vol. 13, no. 21, p. 4225, Okt. 2024. doi: 10.3390/electronics13214225
[26] D. I. Pirdaus, "Stock Return Prediction on the LQ45 Market Index in the Indonesia Stock Exchange Using a Machine Learning Algorithm Based on Technical Indicators," Journal of Risk and Financial Management, vol. 18, no. 12, p. 714, Des. 2025. doi: 10.3390/jrfm18120714
[27] A. Bellaly, S. Belattar, and E. K. Haimoudi, "Application of Artificial Intelligence in Stock Market Prediction," Eng. Proc., vol. 112, no. 1, p. 34, Oct. 2025, doi: 10.3390/engproc2025112034.



