Skip to main content

Advertisement

Log in

A Bayesian-based classification framework for financial time series trend prediction

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Financial time series have been extensively studied within the past decades; however, the advent of machine learning and deep neural networks opened new horizons to apply supercomputing techniques to extract more insights from the underlying patterns of price data. This paper presents a tri-state labeling approach to classify the underlying patterns in price data into up, down and no-action classes. The introduction of a no-action state in our novel approach alleviates the burden of denoising the dataset as a preprocessing task. The performance of our labeling algorithm is experimented with using machine learning and deep learning models. The framework is augmented by applying the Bayesian optimization technique for the selection of the best tuning values of the hyperparameters. The price trend prediction module generates the required trading signals. The results show that the average annualized Sharpe ratio as the trading performance metric is about 2.823, indicating the framework produces excellent cumulative returns.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11

Similar content being viewed by others

Data availability

The authors confirm that the data analyzed in this study are openly available in yahoo finance at finance.yahoo.com and are included in supplementary information files. The authors also confirm that the data generated during the study are included in this published article and can be available upon request from the authors.

Notes

  1. Efficient market hypothesis.

References

  1. Bai-Ling Z, Coggins R, Jabri MA, Dersch D, Flower B (2001) Multiresolution forecasting for futures trading using wavelet decompositions. IEEE Trans Neural Netw 12(4):765–775. https://doi.org/10.1109/72.935090

    Article  Google Scholar 

  2. Bengio Y, Frasconi P, Simard P (1993) The problem of learning long-term dependencies in recurrent networks. In: IEEE International Conference on Neural Networks, pp 1183–1188. https://doi.org/10.1109/ICNN.1993.298725

  3. Bergstra JS, Bardenet R, Bengio Y, Kégl B (n.d.) Algorithms for hyper-parameter optimization, p 9

  4. Bustos O, Pomares-Quimbaya A (2020) Stock market movement forecast: a Systematic review. Expert Syst Appl 156:113464. https://doi.org/10.1016/j.eswa.2020.113464

    Article  Google Scholar 

  5. Carta S, Ferreira A, Podda AS, ReforgiatoRecupero D, Sanna A (2021) Multi-DQN: an ensemble of Deep Q-learning agents for stock market forecasting. Expert Syst Appl 164:113820. https://doi.org/10.1016/j.eswa.2020.113820

    Article  Google Scholar 

  6. Chen T, Guestrin C (2016) XGBoost: a scalable tree boosting system. In: Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp 785–794. https://doi.org/10.1145/2939672.2939785

  7. Chen W, Zhang H, Mehlawat MK, Jia L (2021) Mean–variance portfolio optimization using machine learning-based stock price prediction. Appl Soft Comput 100:106943. https://doi.org/10.1016/j.asoc.2020.106943

    Article  Google Scholar 

  8. Cho K, van Merrienboer B, Bahdanau D, Bengio Y (2014) On the properties of neural machine translation: encoder-decoder approaches. [Cs, Stat]. http://arxiv.org/abs/1409.1259

  9. Cui Y, Chen Z, Wei S, Wang S, Liu T, Hu G (2017) Attention-over-attention neural networks for reading comprehension. In: Proceedings of the 55th annual meeting of the Association for Computational Linguistics (volume 1: long papers), pp 593–602. https://doi.org/10.18653/v1/P17-1055

  10. Fernández-Macho J (2018) Time-localized wavelet multiple regression and correlation. Physica A 492:1226–1238. https://doi.org/10.1016/j.physa.2017.11.050

    Article  MATH  Google Scholar 

  11. Gers FA, Schmidhuber E (2001) LSTM recurrent networks learn simple context-free and context-sensitive languages. IEEE Trans Neural Netw 12(6):1333–1340. https://doi.org/10.1109/72.963769

    Article  Google Scholar 

  12. Guntu RK, Yeditha PK, Rathinasamy M, Perc M, Marwan N, Kurths J, Agarwal A (2020) Wavelet entropy-based evaluation of intrinsic predictability of time series. Chaos Interdiscip J Nonlinear Sci 30(3):033117. https://doi.org/10.1063/1.5145005

    Article  Google Scholar 

  13. Gupta P, Majumdar A, Chouzenoux E, Chierchia G (2021) SuperDeConFuse: a supervised deep convolutional transform based fusion framework for financial trading systems. Expert Syst Appl 169:114206. https://doi.org/10.1016/j.eswa.2020.114206

    Article  Google Scholar 

  14. Han KJ, Hahm S, Kim B-H, Kim J, Lane I (2017) Deep learning-based telephony speech recognition in the wild. Interspeech 2017:1323–1327. https://doi.org/10.21437/Interspeech.2017-1695

    Article  Google Scholar 

  15. He K, Zhang X, Ren S, Sun J (2016) Deep residual learning for image recognition. In: 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pp 770–778. https://doi.org/10.1109/CVPR.2016.90

  16. Hochreiter S (2011) The vanishing gradient problem during learning recurrent neural nets and problem solutions. Int J Uncertain Fuzziness Knowl Based Syst. https://doi.org/10.1142/S0218488598000094

    Article  MATH  Google Scholar 

  17. Hoseinzade E, Haratizadeh S (2019) CNNpred: CNN-based stock market prediction using a diverse set of variables. Expert Syst Appl 129:273–285. https://doi.org/10.1016/j.eswa.2019.03.029

    Article  Google Scholar 

  18. Ioffe S, Szegedy C (2015) Batch normalization: accelerating deep network training by reducing internal covariate shift. [Cs]. http://arxiv.org/abs/1502.03167

  19. Jung-Hua W, Jia-Yann L (1996) Stock market trend prediction using ARIMA-based neural networks. In: Proceedings of International Conference on Neural Networks (ICNN’96), vol 4, pp 2160–2165. https://doi.org/10.1109/ICNN.1996.549236

  20. Kao L-J, Chiu C-C, Lu C-J, Chang C-H (2013) A hybrid approach by integrating wavelet-based feature extraction with MARS and SVR for stock index forecasting. Decis Support Syst 54(3):1228–1244. https://doi.org/10.1016/j.dss.2012.11.012

    Article  Google Scholar 

  21. Kearns M, Laboratories TB, Hill M, Valiant L (1989) Cryptographic limitations on learning boolean formulae and finite automata. In: Proceedings of the Twenty-First Annual ACM Symposium on Theory of Computing, pp 433–444. https://doi.org/10.1145/73007.73049

  22. Kim TW, Khushi M (2020) Portfolio optimization with 2D relative-attentional gated transformer. In: 2020 IEEE Asia-Pacific Conference on Computer Science and Data Engineering (CSDE), pp 1–6. https://doi.org/10.1109/CSDE50874.2020.9411635

  23. Lee J, Koh H, Choe HJ (2021) Learning to trade in financial time series using high-frequency through wavelet transformation and deep reinforcement learning. Appl Intell 51(8):6202–6223. https://doi.org/10.1007/s10489-021-02218-4

    Article  Google Scholar 

  24. Lee SI, Yoo SJ (2020) Threshold-based portfolio: the role of the threshold and its applications. J Supercomput 76(10):8040–8057. https://doi.org/10.1007/s11227-018-2577-1

    Article  Google Scholar 

  25. Lee SI, Yoo SJ (2020) Multimodal deep learning for finance: integrating and forecasting international stock markets. J Supercomput 76(10):8294–8312. https://doi.org/10.1007/s11227-019-03101-3

    Article  Google Scholar 

  26. Loughran T, Mcdonald B (2011) When is a liability not a liability? Textual analysis, dictionaries, and 10-Ks. J Finance 66(1):35–65. https://doi.org/10.1111/j.1540-6261.2010.01625.x

    Article  Google Scholar 

  27. Lu J-Y, Lai H-C, Shih W-Y, Chen Y-F, Huang S-H, Chang H-H, Wang J-Z, Huang J-L, Dai T-S (2022) Structural break-aware pairs trading strategy using deep reinforcement learning. J Supercomput 78(3):3843–3882. https://doi.org/10.1007/s11227-021-04013-x

    Article  Google Scholar 

  28. Marcos López de Prado (2018) Advances in financial machine learning. Wiley. https://www.wiley.com/en-us/Advances+in+Financial+Machine+Learning-p-9781119482086

  29. Masset P (2008) Analysis of financial time-series using Fourier and wavelet methods. SSRN Electron J. https://doi.org/10.2139/ssrn.1289420

    Article  Google Scholar 

  30. Pang X, Zhou Y, Wang P, Lin W, Chang V (2020) An innovative neural network approach for stock market prediction. J Supercomput 76(3):2098–2118. https://doi.org/10.1007/s11227-017-2228-y

    Article  Google Scholar 

  31. Phan DHB, Sharma SS, Narayan PK (2015) Stock return forecasting: some new evidence. Int Rev Financ Anal 40:38–51. https://doi.org/10.1016/j.irfa.2015.05.002

    Article  Google Scholar 

  32. Picasso A, Merello S, Ma Y, Oneto L, Cambria E (2019) Technical analysis and sentiment embeddings for market trend prediction. Expert Syst Appl 135:60–70. https://doi.org/10.1016/j.eswa.2019.06.014

    Article  Google Scholar 

  33. Schapire RE (1990) The strength of weak learnability. Mach Learn 5:197–227. https://doi.org/10.1007/BF00116037

    Article  Google Scholar 

  34. Shwartz-Ziv R, Armon A (2022) Tabular data: deep learning is not all you need. Inf Fusion 81:84–90. https://doi.org/10.1016/j.inffus.2021.11.011

    Article  Google Scholar 

  35. Srivastava N, Hinton G, Krizhevsky A, Sutskever I, Salakhutdinov R (2014) Dropout: a simple way to prevent neural networks from overfitting. J Mach Learn Res 15(1):1929–1958

    MATH  Google Scholar 

  36. Tian L, Feng L, Yang L, Guo Y (2022) Stock price prediction based on LSTM and LightGBM hybrid model. J Supercomput. https://doi.org/10.1007/s11227-022-04326-5

    Article  Google Scholar 

  37. Valencia F, Gómez-Espinosa A, Valdés-Aguirre B (2019) Price movement prediction of cryptocurrencies using sentiment analysis and machine learning. Entropy 21(6):589. https://doi.org/10.3390/e21060589

    Article  Google Scholar 

  38. Wan C-X, Li B (2022) Financial causal sentence recognition based on BERT-CNN text classification. J Supercomput 78(5):6503–6527. https://doi.org/10.1007/s11227-021-04097-5

    Article  Google Scholar 

  39. Wan X, Li H, Zhang L, Wu YJ (2022) Dimensionality reduction for multivariate time-series data mining. J Supercomput. https://doi.org/10.1007/s11227-021-04303-4

    Article  Google Scholar 

  40. Wang X, Gan L, Liu S (2020) Research on intelligence analysis technology of financial industry data based on genetic algorithm. J Supercomput 76(5):3391–3401. https://doi.org/10.1007/s11227-018-2584-2

    Article  Google Scholar 

  41. Wu D, Wang X, Su J, Tang B, Wu S (2020) A labeling method for financial time series prediction based on trends. Entropy 22(10):1162. https://doi.org/10.3390/e22101162

    Article  Google Scholar 

  42. Yang J, Li J, Liu S (2020) A new algorithm of stock data mining in Internet of Multimedia Things. J Supercomput 76(4):2374–2389. https://doi.org/10.1007/s11227-017-2195-3

    Article  Google Scholar 

  43. Yang L, Cai XJ, Zhang H, Hamori S (2016) Interdependence of foreign exchange markets: a wavelet coherence analysis. Econ Model 55:6–14. https://doi.org/10.1016/j.econmod.2016.01.022

    Article  Google Scholar 

  44. Yazdani SF, Murad MAA, Sharef NM, Singh YP, Latiff ARA (2017) Sentiment classification of financial news using statistical features. Int J Pattern Recognit Artif Intell 31(03):1750006. https://doi.org/10.1142/S0218001417500069

    Article  Google Scholar 

  45. Yousefi S, Weinreich I, Reinarz D (2005) Wavelet-based prediction of oil prices. Chaos Solitons Fractals 25(2):265–275. https://doi.org/10.1016/j.chaos.2004.11.015

    Article  MATH  Google Scholar 

  46. Zhang Y, Yan B, Aasma M (2020) A novel deep learning framework: prediction and analysis of financial time series using CEEMD and LSTM. Expert Syst Appl 159:113609. https://doi.org/10.1016/j.eswa.2020.113609

    Article  Google Scholar 

  47. Zhong X, Enke D (2017) Forecasting daily stock market return using dimensionality reduction. Expert Syst Appl 67:126–139. https://doi.org/10.1016/j.eswa.2016.09.027

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Mohammad Taghi Manzuri.

Ethics declarations

Conflict of interest

The authors declare that they have no financial and personal relationships with other people or organizations that can inappropriately influence the work reported in this paper.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Dezhkam, A., Manzuri, M.T., Aghapour, A. et al. A Bayesian-based classification framework for financial time series trend prediction. J Supercomput 79, 4622–4659 (2023). https://doi.org/10.1007/s11227-022-04834-4

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-022-04834-4

Keywords