Input Parameters Comparison on NARX Neural Network to Increase the Accuracy of Stock Prediction


  • Ignatius Wiseto Prasetyo Agung Universitas Adhirajasa Reswara Sanjaya (ARS University)



Stock Prediction, Neural Network, NARX, Technical Indicator


The trading of stocks is one of the activities carried out all over the world. To make the most profit, analysis is required, so the trader could determine whether to buy or sell stocks at the right moment and at the right price. Traditionally, technical analysis which is mathematically processed based on historical price data can be used. Parallel to technological development, the analysis of stock price and its forecasting can also be accomplished by using computer algorithms e.g. machine learning. In this study, Nonlinear Auto Regressive network with eXogenous inputs (NARX) neural network simulations were performed to predict the stock index prices. Experiments were implemented using various configurations of input parameters consisting of Open, High, Low, Closed prices in conjunction with several technical indicators for maximum accuracy. The simulations were carried out by using stock index data sets namely JKSE (Indonesia Jakarta index) and N225 (Japan Nikkei index). This work showed that the best input configurations can predict the future 13 days Close prices with 0.016 and 0.064 mean absolute error (MAE) for JKSE and N225 respectively. 


Achelis, S.B., (1995). Technical Analysis from A to Z, 2nd Ed. McGraw-Hill.

Alonso-Monsalve, S., Suárez-Cetrulo, A. L., Cervantes, A., Quintana, D. (2020). Convolution on neural networks for high-frequency trend prediction of cryptocurrency exchange rates using technical indicators. Expert Systems with Applications, 149.

Anggoro, D. A., Novitaningrum, D. (2021). Comparison of Accuracy Level of Support Vector Machine (SVM) and Artificial Neural Network (ANN) Algorithms in Predicting Diabetes Mellitus Disease. ICIC Express Letters, 15 (1), 9–18.

Boussaada, Z. Curea, O., Remaci, A., Camblong, H., Bellaaj, N. M. (2018). A Nonlinear Autoregressive Exogenous (NARX) Neural Network Model for the Prediction of the Daily Direct Solar Radiation. Energies, 11 (3).

Ezzeldin, R., Hatata, A. (2018). Application of NARX neural network model for discharge prediction through lateral orifices. Alexandria Engineering Journal, 57 (4), 2991–2998.

Farsangi, M. N., Keynia, F., Farsangi, E. N. (2020). Intelligent Method to Cryptocurrency Price Variation Forecasting. The Journal of Engineering, 2020 (9), 745–750.

Jarrah, M., Salim, N. (2019). A Recurrent Neural Network and a Discrete Wavelet Transform to Predict the Saudi Stock Price Trends. International Journal of Advanced Computer Science and Applications, Vol. 10, No. 4.

Lee, M. C., Chang, J. W., Hung, J. C., Chen, B. L. (2021). Exploring the effectiveness of deep neural networks with technical analysis applied to stock market prediction. Computer Science and Information Systems (2), 401–418.

Li, L., Wu, Y., Ou, Y., Li, Q., Zhou, Y., & Chen, D. (2017). Research on Machine Learning Algorithms and Feature Extraction for Time Series. IEEE 28th Annual International Symposium on Personal, Indoor, and Mobile Radio Communications (PIMRC), pp. 1-5.

Li, X., Wu, P., Wang, W. (2020). Incorporating Stock Prices and News Sentiments for Stock Market Prediction: A Case of Hong Kong. Information Processing and Management, 57 (5).


Sezer, O.B. Ozbayoglu, A.M. Dogdu, E. (2017). An Artificial Neural Network- based Stock Trading System Using Technical Analysis and Big Data Framework, ACM SE '17: Proceedings of the South East Conference, pp. 223–226.

Syukur A., Istiawan D. (2021). Prediction of LQ45 Index in Indonesia Stock Exchange: A Comparative Study of Machine Learning Techniques. International Journal of Intelligent Engineering and Systems, Vol.14, No.1.

Vijk, M., Chandola, D., Tikkiwal, V.A., Kumar, A. (2020). Stock Closing Price Prediction using Machine Learning Techniques. Procedia Computer Science 167, pp. 599–606.

Yahoo Finance, accessed on December 2021.

Zhang, Y., Tan, H., Yang, J., Kim, T., Bae, J. (2022). Stock Price Movement Prediction Based on Re-Extract Feature LSTM. ICIC Express Letters ICIC International, pp.187–194.