Gated Recurrent Unit Networks and Discrete Wavelet Transforms Applied to Forecasting and Trading in the Stock Market

  • Victor Biazon Centro Universitário da FEI
  • Reinaldo Bianchi Centro Universitario FEI


Trading in the stock market always comes with the challenge of deciding the best action to take on each time step. The problem is intensified by the theory that it is not possible to predict stock market time series as all information related to the stock price is already contained in it. In this work we propose a novel model called Discrete Wavelet Transform Gated Recurrent Unit Network (DWT-GRU). The model learns from the data to choose between buying, holding and selling, and when to execute them. The proposed model was compared to other recurrent neural networks, with and without wavelets preprocessing, and the buy and hold strategy. The results shown that the DWT-GRU outperformed all the set baselines in the analysed stocks of the Brazilian stock market.

Palavras-chave: Recurrent Neural Networks, Wavelets, Stock Market


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

Altan, A., Karasu, S., and Bekiros, S. (2019). Digital currency forecasting with chaotic meta-heuristic bio-inspired signal processing techniques. Chaos, Solitons & Fractals, 126:325–336.

Brown, S. J., Goetzmann, W. N., and Kumar, A. (1998). The dow theory: William peter hamilton’s track record reconsidered. The Journal of finance, 53(4):1311–1333.

Chung, J., Gulcehre, C., Cho, K., and Bengio, Y. (2014). Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv preprint arXiv:1412.3555.

Galli, A., Heydt, G., and Ribeiro, P. (1996). Exploring the power of wavelet analysis. IEEE Computer Applications in Power, 9(4):37–41.

Gilles, J. (2013). Empirical wavelet transform. IEEE transactions on signal processing, 61(16):3999–4010.

Goodfellow, I., Bengio, Y., and Courville, A. (2016). Deep learning. MIT press.

Gopalswamy, S., Tighe, P. J., and Rashidi, P. (2017). Deep recurrent neural networks for predicting intraoperative and postoperative outcomes and trends. In 2017 IEEE EMBS International Conference on Biomedical & Health Informatics (BHI), pages 361–364. IEEE.

Haykin, S. S. et al. (2009). Neural networks and learning machines/simon haykin.

Hochreiter, S. and Schmidhuber, J. (1997). Long short-term memory. Neural computation, 9(8):1735–1780.

Hsieh, T.-J., Hsiao, H.-F., and Yeh, W.-C. (2011). Forecasting stock markets using wavelet transforms and recurrent neural networks: An integrated system based on artificial bee colony algorithm. Applied soft computing, 11(2):2510–2525.

Huynh, H. D., Dang, L. M., and Duong, D. (2017). A new model for stock price movements prediction using deep neural network. In Proceedings of the Eighth International Symposium on Information and Communication Technology, pages 57–62.

Mallat, S. (1999). A wavelet tour of signal processing. Elsevier.

Murphy, J. J. (1999). Technical analysis of the financial markets: A comprehensive guide to trading methods and applications. Penguin.

Nelson, D. M., Pereira, A. C., and de Oliveira, R. A. (2017). Stock market’s price movement prediction with lstm neural networks. In 2017 International joint conference on neural networks (IJCNN), pages 1419–1426. IEEE.

Nobre, J. and Neves, R. F. (2019). Combining principal component analysis, discrete wavelet transform and xgboost to trade in the financial markets. Expert Systems with Applications, 125:181–194.

Pascanu, R., Gulcehre, C., Cho, K., and Bengio, Y. (2013). How to construct deep recurrent neural networks. arXiv preprint arXiv:1312.6026.

Pimenta, A., Nametala, C. A., Guimarães, F. G., and Carrano, E. G. (2018). An automted investing method for stock market based on multiobjective genetic programming. Computational Economics, 52(1):125–144.

Sardy, S., Tseng, P., and Bruce, A. (2001). Robust wavelet denoising. IEEE Transactions on Signal Processing, 49(6):1146–1152.

Shen, G., Tan, Q., Zhang, H., Zeng, P., and Xu, J. (2018). Deep learning with gated recurrent unit networks for financial sequence predictions. Procedia computer science, 131:895–903.

Stocchi, M. and Marchesi, M. (2018). Fast wavelet transform assisted predictors of streaming time series. Digital Signal Processing, 77:5–12.

Tang, Z. and Fishwick, P. A. (1993). Feedforward neural nets as models for time series forecasting. ORSA journal on computing, 5(4):374–385.

Ullah, S., Javed, N., Hanif, A., and Abdullah, A. (2019). Stock price forecast using recurrent neural network. Urdu News Headline, Text Classification by Using Different Machine Learning Algorithms, page 47.

Valens, C. (1999). A really friendly guide to wavelets. ed. Clemens Valens.

Weigend, A. S., Rumelhart, D. E., and Huberman, B. A. (1991). Back-propagation, weight-elimination and time series prediction. In Connectionist models, pages 105– 116. Elsevier.

Zhang, K., Zhong, G., Dong, J., Wang, S., and Wang, Y. (2019). Stock market prediction based on generative adversarial network. Procedia computer science, 147:400–406.
Como Citar

Selecione um Formato
BIAZON, Victor; BIANCHI, Reinaldo. Gated Recurrent Unit Networks and Discrete Wavelet Transforms Applied to Forecasting and Trading in the Stock Market. In: ENCONTRO NACIONAL DE INTELIGÊNCIA ARTIFICIAL E COMPUTACIONAL (ENIAC), 17. , 2020, Evento Online. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2020 . p. 650-661. DOI: