Improving Stock Price Forecasting Accuracy with Stochastic Multilayer Perceptron
DOI:
https://doi.org/10.11113/mjfas.v20n4.3497Keywords:
Forecasting stock price, deep learning, multilayer perceptron, stochastic multilayer perceptron.Abstract
The stock market operates in a stochastic environment, making accurate price forecasting challenging. To address this issue, a stochastic multilayer perceptron (S-MLP) model has been developed to simulate the stock market's stochastic nature. By incorporating a Gaussian process into the sigmoid activation function, this model incorporates stochasticity into the traditional multilayer perceptron (MLP). As the perturbation factor, a stochastic sigmoid activation function (SAF) with a volatility estimator is used. Although S-MLP has demonstrated superiority over MLP, there is still room for improvement in terms of forecasting precision. In this study, we propose S-MLP with a trainable perturbation factor (S-MLPT), an improved variant of S-MLP. SAF employs the Yang-Zhang volatility estimator as the perturbation factor. The proposed model first employed MLP, and all the parameters were trained. After freezing the parameters, S-MLP is used to train the perturbation factor in the SAF. To evaluate the predictive performance of the models, MLP, S-MLP, and S-MLPT are used to predict the one day ahead highest stock price of four counters listed in Bursa Malaysia. As an evaluation metric, the coefficient of determination is utilised, and the relative percentage improvement of the models is calculated to determine their superiority. The results demonstrated that S-MLP outperforms MLP by effectively minimizing the loss function and converging towards a better local or global minimum during training. In conclusion, S-MLPT exhibits even better performance than S-MLP, with relative percentage improvements of 0.14%, 15.45%, and 0.48% for counters 0166.KL, 2445.KL, and 4707.KL, respectively.
References
Giles, C. L., Lawrence, S., & Tsoi, A. C. (2001). Noisy time series prediction using recurrent neural networks and grammatical inference. Machine Learning, 44(1–2), 161. https://doi.org/10.1023/A:1010884214864
Abu-Mostafa, Y. S., & Atiya, A. F. (1996). Introduction to financial forecasting. Applied Intelligence, 6, 205–213. https://doi.org/10.1007/BF00126626
Namdari, A., & Durrani, T. S. (2021). A multilayer feedforward perceptron model in neural networks for predicting stock market short-term trends. Operations Research Forum, 2(3), 1–30. https://doi.org/10.1007/s43069-021-00071-2
Bhattacharjee, I., & Bhattacharja, P. (2019, December). Stock price prediction: A comparative study between traditional statistical approach and machine learning approach. In 2019 4th International Conference on Electrical Information and Communication Technology (EICT) (pp. 1–6). IEEE. https://doi.org/10.1109/EICT48899.2019.9068850
Adebiyi, A. A., Adewumi, A. O., & Ayo, C. K. (2014). Comparison of ARIMA and artificial neural networks models for stock price prediction. Journal of Applied Mathematics, 2014. https://doi.org/10.1155/2014/614342
Hiransha, M., Gopalakrishnan, E. A., Menon, V. K., & Soman, K. P. (2018). NSE stock market prediction using deep-learning models. Procedia Computer Science, 132, 1351–1362. https://doi.org/10.1016/J.PROCS.2018.05.050
Kumar, D. A., & Murugan, S. (2013). Performance analysis of Indian stock market index using neural network time series model. Proceedings of the 2013 International Conference on Pattern Recognition, Informatics and Mobile Engineering (PRIME 2013), 72–78. https://doi.org/10.1109/ICPRIME.2013.6496450
Chong, E., Han, C., & Park, F. C. (2017). Deep learning networks for stock market analysis and prediction: Methodology, data representations, and case studies. Expert Systems with Applications, 83, 187–205. https://doi.org/10.1016/J.ESWA.2017.04.030
Ling, H., Samarasinghe, S., & Kulasiri, D. (2016). Stochastic neural networks for modelling random processes from observed data. Studies in Computational Intelligence, 628, 83–107. https://doi.org/10.1007/978-3-319-28495-8_5
Demirel, U., Cam, H., & Unlu, R. (2021). Predicting stock prices using machine learning methods and deep learning algorithms: The sample of the Istanbul Stock Exchange. Gazi University Journal of Science, 34(1), 63–82. https://doi.org/10.35378/GUJS.679103
Anand, C. (2021). Comparison of stock price prediction models using pre-trained neural networks. Journal of Ubiquitous Computing and Communication Technologies (UCCT), 3(02), 122–134. https://doi.org/10.36548/jucct.2021.2.005
Azizah, M., Irawan, M. I., & Putri, E. R. M. (2020, June). Comparison of stock price prediction using geometric Brownian motion and multilayer perceptron. In AIP Conference Proceedings (Vol. 2242, No. 1, p. 030016). AIP Publishing LLC. https://doi.org/10.1063/5.0008066/621859
Chen, Q., Zhang, W., & Lou, Y. (2020). Forecasting stock prices using a hybrid deep learning model integrating attention mechanism, multi-layer perceptron, and bidirectional long-short term memory neural network. IEEE Access, 8, 117365–117376. https://doi.org/10.1109/ACCESS.2020.3004284
Hua, Y., Zhu, R., & Duan, Y. (2022, December). Construction of short-term stock price prediction algorithm based on MLP and CART Bagging ensemble learning. In 2022 IEEE Conference on Telecommunications, Optics and Computer Science (TOCS) (pp. 371–376). IEEE. https://doi.org/10.1109/TOCS56154.2022.10015919
Vincent, A. M. P., & Salleh, H. (2021). An investigation into the performance of the multilayer perceptron architecture of deep learning in forecasting stock prices. Universiti Malaysia Terengganu Journal of Undergraduate Research, 3(2), 61–68. https://doi.org/10.46754/umtjur.v3i2.205
De Gooijer, J. G., & Hyndman, R. J. (2006). 25 years of time series forecasting. International Journal of Forecasting, 22(3), 443–473.
Hendikawati, P. (2020, August). A survey of time series forecasting from stochastic method to soft computing. In Journal of Physics: Conference Series (Vol. 1613, No. 1, p. 012019). IOP Publishing. https://doi.org/10.1088/1742-6596/1613/1/012019
Gulcehre, C., Moczulski, M., Denil, M., & Bengio, Y. (2016, June). Noisy activation functions. In International Conference on Machine Learning (pp. 3059–3068). PMLR. https://doi.org/10.48550/arxiv.1603.00391
Liao, Z., & Wang, J. (2010). Forecasting model of global stock index by stochastic time effective neural network. Expert Systems with Applications, 37(1), 834–841. https://doi.org/10.1016/J.ESWA.2009.05.086
Wang, J., Pan, H., & Liu, F. (2012). Forecasting crude oil price and stock price by jump stochastic time effective neural network model. Journal of Applied Mathematics, 2012. https://doi.org/10.1155/2012/646475
Wang, J., Pan, H., Wang, Y., & Niu, H. (2015). Complex system analysis on voter stochastic system and jump time effective neural network of stock market. International Journal of Computational Intelligence Systems, 8(4), 787–795. https://doi.org/10.1080/18756891.2015.1061397
Wang, J., & Wang, J. (2015). Forecasting stock market indexes using principal component analysis and stochastic time effective neural networks. Neurocomputing, 156, 68–78. https://doi.org/10.1016/J.NEUCOM.2014.12.084
Mo, H., & Wang, J. (2018). Return scaling cross-correlation forecasting by stochastic time strength neural network in financial market dynamics. Soft Computing, 22, 3097–3109. https://doi.org/10.1007/s00500-017-2564-0
Wang, J., & Wang, J. (2017). Forecasting stochastic neural network based on financial empirical mode decomposition. Neural Networks, 90, 8–20. https://doi.org/10.1016/J.NEUNET.2017.03.004
Jay, P., Kalariya, V., Parmar, P., Tanwar, S., Kumar, N., & Alazab, M. (2020). Stochastic neural networks for cryptocurrency price prediction. IEEE Access, 8, 82804–82818. https://doi.org/10.1109/ACCESS.2020.2990659
Vincent, A. M. P., & Salleh, H. (2023). Adaptation of stochasticity into activation function of deep learning for stock price forecasting. Bulletin of Electrical Engineering and Informatics, 12(6), 3780–3789.
Wu, D., Wang, X., & Wu, S. (2022). Jointly modeling transfer learning of industrial chain information and deep learning for stock prediction. Expert Systems with Applications, 191, 116257. https://doi.org/10.1016/j.eswa.2021.116257
Nikou, M., Mansourfar, G., & Bagherzadeh, J. (2019). Stock price prediction using deep learning algorithm and its comparison with machine learning algorithms. Intelligent Systems in Accounting, Finance and Management, 26(4), 164–174. https://doi.org/10.1002/isaf.1459
Zhang, J., Li, L., & Chen, W. (2020). Predicting stock price using two-stage machine learning techniques. Computational Economics, 57, 1237–1261. https://doi.org/10.1007/s10614-020-10013-5
Alwosheel, A., van Cranenburgh, S., & Chorus, C. G. (2018). Is your dataset big enough? Sample size requirements when using artificial neural networks for discrete choice analysis. Journal of Choice Modelling, 28, 167–182. https://doi.org/10.1016/j.jocm.2018.07.002
Kotsiantis, S. B., Kanellopoulos, D., & Pintelas, P. E. (2006). Data preprocessing for supervised learning. International Journal of Computer Science, 1(2), 111–117. https://doi.org/10.5281/zenodo.1082415
Eelbode, T., Sinonquel, P., Maes, F., & Bisschops, R. (2021). Pitfalls in training and validation of deep learning systems. Best Practice & Research Clinical Gastroenterology, 52, 101712. https://doi.org/10.1016/j.bpg.2020.101712
Sagir, A. M., & Sathasivan, S. (2017). The use of artificial neural network and multiple linear regressions for stock market forecasting. MATEMATIKA: Malaysian Journal of Industrial and Applied Mathematics, 1–10.
Yassin, I. M., Khalid, M. A., Herman, S. H., Pasya, I., Wahab, N. A., & Awang, Z. (2017). Multi-layer perceptron (MLP)-based nonlinear auto-regressive with exogenous inputs (NARX) stock forecasting model. International Journal of Advanced Science, Engineering and Information Technology, 7(3), 1098–1103.
Masters, T. (1993). Practical neural network recipes in C++. Academic Press Professional, Inc.
Glorot, X., & Bengio, Y. (2010, March). Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics (pp. 249–256). JMLR Workshop and Conference Proceedings. https://proceedings.mlr.press/v9/glorot10a.html
Vințe, C., & Ausloos, M. (2023). Portfolio volatility estimation relative to stock market cross-sectional intrinsic entropy. Journal of Risk and Financial Management, 16(2), 114. https://doi.org/10.3390/JRFM16020114
Yang, D., & Zhang, Q. (2000). Drift-independent volatility estimation based on high, low, open, and close prices. The Journal of Business, 73(3), 477–492. https://doi.org/10.1086/209650
Chicco, D., Warrens, M. J., & Jurman, G. (2021). The coefficient of determination R-squared is more informative than SMAPE, MAE, MAPE, MSE and RMSE in regression analysis evaluation. PeerJ Computer Science, 7, e623. https://doi.org/10.7717/PEERJ-CS.623/SUPP-1
Reddy, B. T. (2019). Prediction of stock market using stochastic neural networks. International Journal of Innovative Research in Computer Science & Technology (IJIRCST) ISSN, 2347–5552. https://doi.org/10.21276/IJIRCST.2019.7.5.1
Ma, Y., Han, R., & Wang, W. (2021). Portfolio optimization with return prediction using deep learning and machine learning. Expert Systems with Applications, 165, 113973.
Solin, M. M., Alamsyah, A., Rikumahu, B., & Saputra, M. A. A. (2019, July). Forecasting portfolio optimization using artificial neural network and genetic algorithm. In 2019 7th International Conference on Information and Communication Technology (ICoICT) (pp. 1–7). IEEE.
Downloads
Published
Issue
Section
License
Copyright (c) 2024 Assunta Malar Patrick Vincent, Hassilah Salleh
This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.