Skip to main content
Log in

Stock market trend detection and automatic decision-making through a network-based classification model

  • Published:
Natural Computing Aims and scope Submit manuscript

Abstract

Many complex systems observed in nature and society can be described in terms of network. A salient feature of networks is the presence of community patterns. Network-based models have already been applied in the analysis of data from very diverse areas, from epidemics modeling to periodicity detection in meteorological data. In this paper, inspired by the formation of community structures, such as the metabolic networks and the anatomical and functional connectome observed in biological neural networks, we present a model which makes use of connector hubs to detect price trend reversals and to automatize decision-making processes in stock market trading operations for selecting a good investment strategy and improve the returns. It starts by mapping the historical stock price time series as a network, where each node represents a price variation range and the edges are generated according to the time sequential order in which these ranges occur. Afterwards, communities of the constructed network so far are detected, which represent the up and down trends of the stock prices. The model has two phases: (1) Trend detection phase, where the price trend communities are detected and trend labels are generated; and (2) Operating phase. In this phase, the proposed technique predicts trend labels to future stock prices, in such a way that these trends can be used as triggers to perform buying and selling operations of the stock. We evaluate the model by applying it on historical data from 10 of the most traded stocks from both NYSE and the Brazilian Stock Exchange (Bovespa). The obtained results are promising, with the model’s best returns being able to outperform the stock price returns for the same period in 15 out of the 20 cases under consideration.

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

Access this article

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

Similar content being viewed by others

References

  • Adebiyi AA, Adewumi AO, Ayo CK (2014) Comparison of ARIMA and artificial neural networks models for stock price prediction. J Appl Math. https://doi.org/10.1155/2014/614342

  • Akiki TJ, Abdallah CG (2019) Determining the hierarchical architecture of the human brain using subject-level clustering of functional networks. Sci Rep 9(1):1–15

    Article  Google Scholar 

  • Albert R, Albert I, Nakarado GL (2004) Structural vulnerability of the north American power grid. Phys Rev 69(2):025103

    Google Scholar 

  • Anghinoni L, Zhao L, Ji D, Pan H (2019) Time series trend detection and forecasting using complex network topology analysis. Neural Netw 117:295–306

  • Bachelier L (1900) Théorie de la spéculation. Gauthier-Villars, Paris

    Book  MATH  Google Scholar 

  • Barabási AL (2003) Linked: the new science of networks. Perseus Books Group

  • Barabási AL, Albert R (1999) Emergence of scaling in random networks. Science 286(5439):509–512

    Article  MathSciNet  MATH  Google Scholar 

  • Barabási AL et al (2016) Network Science. Cambridge University Press, Cambridge

    MATH  Google Scholar 

  • Boccaletti S, Latora V, Moreno Y, Chavez M, Hwang DU (2006) Complex networks: structure and dynamics. Phys Rep 424(4):175–308

    Article  MathSciNet  MATH  Google Scholar 

  • Cao H, Lin T, Li Y, Zhang H (2019) Stock price pattern prediction based on complex network and machine learning. Complexity 2019:1–12. https://doi.org/10.1155/2019/4132485

    Article  Google Scholar 

  • Carneiro MG, Zhao L (2017) Organizational data classification based on the importance concept of complex networks. IEEE Trans Neural Netw Learn Syst 29(8):3361–3373

    Google Scholar 

  • Cartwright D, Harary F (1956) Structural balance: a generalization of Heider’s theory. Psychol Rev 63(5):277

    Article  Google Scholar 

  • Casiraghi G (2017) Multiplex network regression: how do relations drive interactions? ArXiv preprint arXiv:1702.02048

  • Cauchy AL (1813) Sur les polygones et polyedres, second mémoire. J Ecole Polytechnique 9:87–98

    Google Scholar 

  • Colliri T, Zhao L (2019) A network-based model for optimizing returns in the stock market. In: 2019 8th Brazilian conference on intelligent systems (BRACIS), pp 645–650. https://doi.org/10.1109/BRACIS.2019.00118

  • Colliri T, Ji D, Pan H, Zhao L (2018) A network-based high level data classification technique. In: 2018 International joint conference on neural networks (IJCNN). IEEE, pp 1–8

  • Dorogovtsev SN, Mendes JF (2013) Evolution of networks: from biological nets to the Internet and WWW. OUP, Oxford

    MATH  Google Scholar 

  • Erdös P, Rényi A (1960) On the evolution of random graphs. Publ Math Inst Hung Acad Sci 5(1):17–60

    MathSciNet  MATH  Google Scholar 

  • Faloutsos M, Faloutsos P, Faloutsos C (1999) On power–law relationships of the internet topology. ACM SIGCOMM Comput Commun Rev 29(4):251–262

    Article  MATH  Google Scholar 

  • Ferreira LN, Zhao L (2014) Detecting time series periodicity using complex networks. In: 2014 Brazilian conference on intelligent systems. IEEE, pp 402–407

  • Gao X, An H, Fang W, Huang X, Li H, Zhong W, Ding Y (2014) Transmission of linear regression patterns between time series: from relationship in time series to complex networks. Phys Rev E 90(1):012818

    Article  Google Scholar 

  • Gleiser PM, Spoormaker VI (2010) Modelling hierarchical structure in functional brain networks. Philos Trans R Soc A Math Phys Eng Sci 368(1933):5633–5644

    Article  Google Scholar 

  • Guimera R, Amaral LAN (2005) Functional cartography of complex metabolic networks. Nature 433(7028):895

    Article  Google Scholar 

  • Guresen E, Kayakutlu G, Daim TU (2011) Using artificial neural network models in stock market index prediction. Expert Syst Appl 38(8):10389–10397. https://doi.org/10.1016/j.eswa.2011.02.068

    Article  Google Scholar 

  • Hagmann P, Cammoun L, Gigandet X, Meuli R, Honey CJ, Wedeen VJ, Sporns O (2008) Mapping the structural core of human cerebral cortex. PLoS Biol 6(7):e159

    Article  Google Scholar 

  • Hayek FA (1945) The use of knowledge in society. Am Econ Rev 35:519–530

    Google Scholar 

  • Hinton GE (1989) Connectionist learning procedures. Artif Intell 40(1–3):185–234

    Article  Google Scholar 

  • Huang W, Nakamori Y, Wang SY (2005) Forecasting stock market movement direction with support vector machine. Comput Oper Res 32(10):2513–2522

    Article  MATH  Google Scholar 

  • Huillier S (1861) Mémoire sur la polyèdrométrie. Annales de Mathématiques 3:169–189

    Google Scholar 

  • Ji LJ, Zhang Z, Guo T (2008) To buy or to sell: cultural differences in stock market decisions based on price trends. J Behav Decis Mak 21(4):399–413

    Article  Google Scholar 

  • Lee K, Jo G (1999) Expert system for predicting stock market timing using a candlestick chart. Expert Syst Appl 16(4):357–364. https://doi.org/10.1016/S0957-4174(99)00011-1

    Article  Google Scholar 

  • Liu W, Suzumura T, Ji H, Hu G (2018) Finding overlapping communities in multilayer networks. PLoS ONE 13(4):e0188747

    Article  Google Scholar 

  • Loglisci C, Malerba D (2017) Leveraging temporal autocorrelation of historical data for improving accuracy in network regression. Stat Anal Data Min ASA Data Sci J 10(1):40–53

    Article  MathSciNet  MATH  Google Scholar 

  • Malkiel BG, Fama EF (1970) Efficient capital markets: a review of theory and empirical work. J Finance 25(2):383–417

    Article  Google Scholar 

  • Mitchell M (2006) Complex systems: network thinking. Artif Intell 170(18):1194–1212

    Article  MathSciNet  Google Scholar 

  • Montoya JM, Solé RV (2002) Small world patterns in food webs. J Theor Biol 214(3):405–412

    Article  Google Scholar 

  • Motter AE, Lai YC (2002) Cascade-based attacks on complex networks. Phys Rev E 66(6):065102

    Article  Google Scholar 

  • Newman ME (2004) Fast algorithm for detecting community structure in networks. Phys Rev E 69(6):066133

    Article  Google Scholar 

  • Palla G, Derényi I, Farkas I, Vicsek T (2005) Uncovering the overlapping community structure of complex networks in nature and society. Nature 435(7043):814–818

    Article  Google Scholar 

  • Pastor-Satorras R, Vespignani A (2001) Epidemic spreading in scale-free networks. Phys Rev Lett 86(14):3200

    Article  Google Scholar 

  • Pastor-Satorras R, Vespignani A (2002) Immunization of complex networks. Phys Rev E 65(3):036104

    Article  Google Scholar 

  • Regnault J (1863) Calcul des chances et philosophie de la bourse. Mallet-Bachelier, Paris

    Google Scholar 

  • Rish I (2001) An empirical study of the naive Bayes classifier. In: IJCAI 2001 workshop on empirical methods in artificial intelligence 3(22). IBM, New York

  • Roberts HV (1959) Stock-market “patterns” and financial analysis: methodological suggestions. J Finance 14(1):1–10

    Google Scholar 

  • Safavin SR, Landgrebe D (1991) A survey of decision tree classifier methodology. IEEE Trans Syst Man Cybern 21(3):660–674

    Article  MathSciNet  Google Scholar 

  • Sharpe WF (1966) Mutual fund performance. J Bus 39(1):119–138

    Article  Google Scholar 

  • Silva TC, Zhao L (2012) Network-based high level data classification. IEEE Trans Neural Netw Learn Syst 23(6):954–970

    Article  Google Scholar 

  • Silva TC, Zhao L (2015) High-level pattern-based classification via tourist walks in networks. Inf Sci 294:109–126

    Article  MathSciNet  Google Scholar 

  • Silva TC, Zhao L, Cupertino TH (2013) Handwritten data clustering using agents competition in networks. J Math Imaging Vis 45(3):264–276

    Article  MathSciNet  MATH  Google Scholar 

  • Sporns O (2002) Network analysis, complexity, and brain function. Complexity 8(1):56–60

    Article  MathSciNet  Google Scholar 

  • Vandermonde AT (1771) Remarques sur les problèmes de situation. Mémoires de l’Académie Royale des Sciences (Paris) 2:566–574

    Google Scholar 

  • Vapnik VN (2000) The nature of statistical learning theory. Springer, New York

    Book  MATH  Google Scholar 

  • Wang JL, Chan SH (2007) Stock market trading rule discovery using pattern recognition and technical analysis. Expert Syst Appl 33(2):304–315

    Article  Google Scholar 

  • Wang XF, Chen G (2003) Complex networks: small-world, scale-free and beyond. IEEE Circuits Syst Mag 3(1):6–20

    Article  Google Scholar 

  • Watts DJ (2004) Six degrees: the science of a connected age. WW Norton & Company, New York

    Google Scholar 

  • Watts DJ, Strogatz SH (1998) Collective dynamics of “small-world” networks. Nature 393(6684):440

    Article  MATH  Google Scholar 

  • West GB, Brown JH, Enquist BJ (2009) A general model for the structure, and allometry of plant vascular systems. Nature 400:125–126

    Google Scholar 

Download references

Acknowledgements

This work is supported in part by the Sao Paulo State Research Foundation (FAPESP) under Grant Nos. 2015/50122-0 and 2013/07375-0, the Coordenação de Aperfeiçoamento de Pessoal de Nível Superior - Brasil (CAPES) - Finance Code 001, the Pro-Rectory of Research (PRP) of University of Sao Paulo under grant number 2018.1.1702.59.8, the C4AI under grant number FAPESP/IBM/USP: 19/07665-4 and the Brazilian National Council for Scientific and Technological Development (CNPq) under Grant No. 303199/2019-9.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Tiago Colliri.

Ethics declarations

Conflict of interest

The authors declare that they have no conflict of interest.

Additional information

Publisher's Note

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

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Colliri, T., Zhao, L. Stock market trend detection and automatic decision-making through a network-based classification model. Nat Comput 20, 791–804 (2021). https://doi.org/10.1007/s11047-020-09829-9

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11047-020-09829-9

Keywords

Navigation