AN INVESTIGATION INTO THE PERFORMANCE OF THE MULTILAYER PERCEPTRON ARCHITECTURE OF DEEP LEARNING IN FORECASTING STOCK PRICES

Authors

  • ASSUNTA MALAR PATRICK VINCENT Faculty of Ocean Engineering Technology & Informatics, Universiti Malaysia Terengganu
  • HASSILAH SALLEH Faculty of Ocean Engineering Technology & Informatics, Universiti Malaysia Terengganu

DOI:

https://doi.org/10.46754/umtjur.v3i2.205

Keywords:

Deep learning, multilayer perceptron, forecasting stock price, ReLu, sigmoid, hyperbolic tangent

Abstract

A wide range of studies have been conducted on deep learning to forecast time series data. However, very few researches have discussed the optimal number of hidden layers and nodes in each hidden layer of the architecture. It is crucial to study the number of hidden layers and nodes in each hidden layer as it controls the performance of the architecture. Apart from that, in the presence of the activation function, diverse computation between the hidden layers and output layer can take place. Therefore, in this study, the multilayer perceptron (MLP) architecture is developed using the Python software to forecast time series data. Then, the developed architecture is applied on the Apple Inc. stock price due to its volatile characteristic. Using historical prices, the accuracy of the forecast is measured by the different activation functions, number of hidden layers and size of data. The Keras deep learning library, which can be found in the Python software, is used to develop the MLP architecture to forecast the Apple Inc. stock price. The developed model is then applied on different cases, namely different sizes of data, different activation functions, different numbers of hidden layers of up to nine layers, and different numbers of nodes in each hidden layer. Then, the metrics mean squared error (MSE), mean absolute error (MAE) and root-mean-square error (RMSE) are employed to test the accuracy of the forecast. It is found that the architecture with rectified linear unit (ReLU) outperformed in every hidden layer and each case with the highest accuracy. To conclude, the optimal number of hidden layers differs in every case as there are other influencing factors.

References

Amardeep, R., & Swamy, K.Y. (2017). Training feed forward neural network with backpropogation. International Journal of Engineering and Computer Science, 6(1), 19860-19866. DOI: https://doi.org/10.18535/ijecs/v6i1.03

Apple Inc. (AAPL). 2019. Yahoo Finance. Retrieved from https://finance.yahoo.com/ quote/A APL/history?period1=1356969600 &period2=1514736000&interval=1d&filter =history&frequency=1d.

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. DOI: https://doi.org/10.1016/j.procs.2018.05.050

Karsoliya, S. (2012). Approximating number of hidden layer neurons in multiple hidden layer BPNN architecture. International Journal of Engineering Trends and Technology 3(6).

Liu, W., Wand, Z. Liu, X. Zeng, N. Liu, Y. & Alsaadi, F. E. (2017). A survey of deep neural network architectures. Neurocomputing, (234),11–26. DOI: https://doi.org/10.1016/j.neucom.2016.12.038

Naeini, M. P, Taremian, H., & Hashemi, H.B. (2010). Stock market value prediction using neural networks. International Conference on Computer Informatics System and Industrial Management Application (CISIM), 132-136.

Patterson, J., & Gibson, A. (2017). Deep learning. Retrieved from https://www.oreilly.com/li brary/view/deep-learning/9781491924570/ ch04.html.

Shah, T. (2017). About train, validation and test sets in machine learning. Retrieved from https://towardsdatascience.com/train-validation-and-test-sets-72cb40cba9e7.

Sharma, S. (2017). Epoch vs batch size vs iterations. Retrieved from https:// towardsdatascienc e.com/epoch-vs-iterations-vs-batch-size-4dfb9c7ce9c9.

Upadhyay, Y. (2019). Introduction to FeedForward Neural Networks. Retrieved from https:// towardsdatascience.com/feed-forward-neural-networks-c503faa46620.

Ved. (2019). How to improve performance of neural network. Retrieved from https:// d4datasci ence.wordpress.com/2016/09/29/ fbf/.

Widegren, P. (2017). Deep learning-based forecasting of financial assets. dissertation degree. KTH Royal Institution Technology.

Xu, Y. P., Lai, J., & L. (2017). Deep learning based regression and multiclass models for acute oral toxicity prediction with automatic chemical feature extraction. Retrieved from https://arxiv.org/pdf/1704.04718.pdf.

Additional Files

Published

2021-04-30

How to Cite

PATRICK VINCENT, A. M. ., & 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