Evaluation of machine learning-based swing trading strategies

  • Arthur E. S. Machado CEFET-MG
  • Rubio T. C. Viana CEFET-MG
  • Daniel H. Dalip CEFET-MG
  • Rodrigo T. N. Cardoso CEFET-MG
  • André da Cruz CEFET-MG

Abstract


Carrying out operations on the stock exchange is a complex task, since changes in the most diverse sectors end up impacting the stock market and therefore, several studies in the area of artificial intelligence address this topic with the purpose of facilitating operations. This paper aims to present different strategies supported by the use of algorithms based on supervised learning in order to create an environment conducive to capital appreciation. Three strategies were developed for four assets from different segments listed on B3 between 2009 and 2021. The LSTM model was adopted as the algorithm for forecasting future values from the time series of the market and its indicators. The results indicate that the proposed strategy can generate profit in more than 70% of operations, obtaining an overall return greater than other investments used as a comparison, considering contributions between the years between 2012 and 2021.
Keywords: Swing-Trade Strategies, Supervised Learning, Stock Exchange, LSTM

References

Tensorflow. https://www.tensorflow.org/. Acessado em: 02 de fev. de 2021.

Ahmadi, E., Jasemi, M., Monplaisir, L., Nabavi, M., Mahmoodi, A., and Jamd, P. (2018). New efficient hybrid candlestick technical analysis model for stockmarket timing on the basis of the support vector machine andheuristic algorithms of imperialist competition and genetic. Expert Systems with Applications.

Altman, E. I., Iwanicz-Drozdowska, M., Laitinen, E. K., and Suvas, A. (2017). Financial distress prediction in an international context: A review and empirical analysis of altman’s z-score model. Journal of International Financial Management & Accounting, 28(2):131–171.

Anbalagan, T. and Maheswari, S. (2015). Classification and prediction of stock market index based on fuzzy metagraph. Procedia Computer Science 47.

Beattie, A. (2020). The birth of stock exchanges. Investopedia. Acessado em: 10 de mar. de 2021.

Brownlee, J. (2018). Predict the Future with MLPs,CNNs and LSTMs in Python. Deep Learning for Time Series Forecasting.

Edwards, R. D., Magee, J., and Bassetti, W. C. (2018). Technical analysis of stock trends. CRC press.

Ferreira, F., Gandomi, A., and Cardoso, R. (2020). Financial time-series analysis of brazilian stockmarket using machine learning. IEEE Symposium Series on Computational Intelligence (SSCI).

Ferreira, F., Gandomi, A., and Cardoso, R. (2021). Artificial intelligence applied to stockmarket trading: A review. IEEE Access (Volume: 9).

Graham, B. (2017). The Intelligent Investor (4.ed. rev.).

Guijarro, F. (2020). Forecasting stock market trend: a comparison ofmachine learning algorithms. Finance, Markets and Valuation.

Kumar, I. (2018). A comparative study of supervised machine learning algorithms for stock market trend prediction. IEEE Xplore Compliant.

Menon, A., Singh, S., and Parekh, H. (2019). A review of stock market prediction using neural networks. In 2019 IEEE International Conference on System, Computation, Automation and Networking (ICSCAN), pages 1–6. IEEE.

Nelson, D., Pereira, A., and Oliveira, R. (2017). Stock market’s price movement prediction with lstm neural networks. In 2017 International Joint Conference on Neural Networks (IJCNN).

Nti, I., Adekoya, A., and Weyori, B. (2019). A systematic review of fundamental and technical analysis of stock market predictions. Springer Nature B.V.
Published
2022-07-31
MACHADO, Arthur E. S.; VIANA, Rubio T. C.; DALIP, Daniel H.; CARDOSO, Rodrigo T. N.; CRUZ, André da. Evaluation of machine learning-based swing trading strategies. In: BRAZILIAN WORKSHOP ON ARTIFICIAL INTELLIGENCE IN FINANCE (BWAIF), 1. , 2022, Niterói. Anais [...]. Porto Alegre: Sociedade Brasileira de Computação, 2022 . p. 69-80. DOI: https://doi.org/10.5753/bwaif.2022.223230.