A Comparison between Nature-Inspired and Machine Learning Approaches to Detecting Trend Reversals in Financial Time Series

  • Antonia Azzini
  • Matteo De Felice
  • Andrea G. B. Tettamanzi
Part of the Studies in Computational Intelligence book series (SCI, volume 380)


Detection of turning points is a critical task for financial forecasting applications. This chapter proposes a comparison between two different classification approaches on such a problem. Nature-Inspired methodologies are attracting growing interest due to their ability to cope with complex tasks like classification, forecasting, and anomaly detection problems. A swarm intelligence algorithm, namely Particle Swarm Optimization (PSO), and an artificial immune system algorithm, namely Negative Selection (NS), have been applied to the task of detecting turning points, modeled as an Anomaly Detection (AD) problem. Particular attention has also been given to the choice of the features considered as inputs to the classifiers, due to the significant impact they may have on the overall accuracy of the approach. In this work, starting from a set of eight input features, feature selection has been carried out by means of a greedy hill climbing algorithm, in order to analyze the incidence of feature reduction on the global accuracy of the approach. The performances obtained from the two approaches have also been compared to other traditional machine learning techniques implemented by WEKA and both methods have been found to give interesting results with respect to traditional techniques.


Feature Selection Negative Selection Particle Swarm Optimization Algorithm Feature Subset Anomaly Detection 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Aha, D.W., Kibler, D., Albert, M.K.: Instance-based learning algorithms. In: Machine Learning, pp. 37–66 (1991)Google Scholar
  2. 2.
    Azzini, A., De Felice, M., Meloni, S., Tettamanzi, A.G.B.: Soft computing techniques for internet backbone traffic anomaly detection. In: Giacobini, M., Brabazon, A., Cagnoni, S., Di Caro, G.A., Ekárt, A., Esparcia-Alcázar, A.I., Farooq, M., Fink, A., Machado, P. (eds.) EvoWorkshops 2009. LNCS, vol. 5484, pp. 99–104. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  3. 3.
    Azzini, A., De Felice, M., Tettamanzi, A.G.B.: A study of nature-inspired methods for financial trend reversal detection. In: Di Chio, C., Brabazon, A., Di Caro, G.A., Ebner, M., Farooq, M., Fink, A., Grahl, J., Greenfield, G., Machado, P., O’Neill, M., Tarantino, E., Urquhart, N. (eds.) EvoApplications 2010. LNCS, vol. 6025, pp. 161–170. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  4. 4.
    Balachandran, S., Dasgupta, D., Nino, F., Garrett, D.: A framework for evolving multi-shaped detectors in negative selection. In: Proceedings of the IEEE Symposium on Foundations of Computational Intelligence, FOCI 2007, pp. 401–408 (2007)Google Scholar
  5. 5.
    Bishop, C.M.: Neural Networks for Pattern Recognition, 1st edn. Oxford University Press, Oxford (1996), zbMATHGoogle Scholar
  6. 6.
    Caruana, R., Freitag, D.: Greedy attribute selection. In: Proceedings of the Eleventh International Conference on Machine Learning, pp. 28–36. Morgan Kaufmann, San Francisco (1994)Google Scholar
  7. 7.
    Chang, J.F., Hsu, S.W.: The construction of stock’s portfolios by using particle swarm optimization. In: ICICIC 2007: Proceedings of the Second International Conference on Innovative Computing, Information and Control, p. 390. IEEE Computer Society, Washington, DC, USA (2007), CrossRefGoogle Scholar
  8. 8.
    Cleary, J.G., Trigg, L.E.: K*: An instance-based learner using an entropic distance measure. In: Proceedings of the 12th International Conference on Machine Learning, pp. 108–114. Morgan Kaufmann, San Francisco (1995)Google Scholar
  9. 9.
    Cohen, W.W.: Fast effective rule induction. In: Proceedings of the Twelfth International Conference on Machine Learning, pp. 115–123. Morgan Kaufmann, San Francisco (1995)Google Scholar
  10. 10.
    Colby, R.W., Meyers, T.A.: The Encyclopedia Of Technical Market Indicators. McGraw-Hill, New York (1988)Google Scholar
  11. 11.
    Cormen, T., Leiserson, C., Rivest, R., Stein, C.: Introduction to Algorithms, 2nd edn. MIT Press, Cambridge (2003)Google Scholar
  12. 12.
    Falco, I.D., Cioppa, A.D., Tarantino, E.: Facing classification problems with particle swarm optimization. Applied Soft Computing 7(3), 652–658 (2007),, doi:10.1016/j.asoc.2005.09.004CrossRefGoogle Scholar
  13. 13.
    Forrest, S., Perelson, A.S., Allen, L., Cherukuri, R.: Self-nonself discrimination in a computer. In: Proceedings of the 1994 IEEE Symposium on Research in Security and Privacy, pp. 202–212. IEEE Computer Society Press, Los Alamitos (1994)Google Scholar
  14. 14.
    Freund, Y.: The alternating decision tree learning algorithm. In: Machine Learning: Proceedings of the Sixteenth International Conference, pp. 124–133. Morgan Kaufmann, San Francisco (1999)Google Scholar
  15. 15.
    Glickman, M., Balthrop, J., Forrest, S.: A machine learning evaluation of an artificial immune system. Journal of Evolutionary Computation 13(2), 179–212 (2005)CrossRefGoogle Scholar
  16. 16.
    Gonzalez, F., Dasgupta, D., Kozma, R.: Combining negative selection and classification techniques for anomaly detection. In: Proceedings of the 2002 Congress on Evolutionary Computation, CEC 2002, vol. 1, pp. 705–710 (2002)Google Scholar
  17. 17.
    González, F., Dasgupta, D., Niño, L.: A randomized real-valued negative selection algorithm. In: Timmis, J., Bentley, P.J., Hart, E. (eds.) ICARIS 2003. LNCS, vol. 2787, pp. 261–272. Springer, Heidelberg (2003), CrossRefGoogle Scholar
  18. 18.
    Herbst, A.: Analyzing and Forecasting Futures Prices. Wiley, Chichester (1992)Google Scholar
  19. 19.
    Jang, G.S., Lai, F., Jiang, B.W., Chien, L.H.: An intelligent trend prediction and reversal recognition system using dual-module neural networks. In: Proceedings of the First International Conference on Artificial Intelligence on Wall Street, pp. 42–51 (1991), doi:10.1109/AIAWS.1991.236575Google Scholar
  20. 20.
    Ji, Z., Dasgupta, D.: Applicability issues of the real-valued negative selection algorithms. In: Proceedings of Genetic and Evolutionary Computation Conference (GECCO), pp. 111–118. ACM Press, New York (2006)CrossRefGoogle Scholar
  21. 21.
    Kennedy, J., Eberhart, R.: Particle swarm optimization. In: Proceedings of the IEEE International Conference on Neural Networks, vol. 4, pp. 1942–1948 (1995), doi:10.1109/ICNN.1995.488968Google Scholar
  22. 22.
    Jae Kim, K., Han, I.: Genetic algorithms approach to feature discretization in artificial neural networks for the prediction of stock price index. Expert Systems with Applications 19(2), 125–132 (2000),, doi:10.1016/S0957-4174(00)00027-0CrossRefGoogle Scholar
  23. 23.
    La, T., de Oliveira, A.: Predicting stock trends through technical analysis and nearest neighbor classification. In: Proceedings of the IEEE International Conference on Systems, Man and Cybernetics (SMC 2009), pp. 3094–3099 (2009), doi:10.1109/ICSMC.2009.5345944Google Scholar
  24. 24.
    Middlemiss, M.: Positive and negative selection in a multilayer artificial immune system. Tech. Rep. 2006/03, Department of Information Science, Otago (2006)Google Scholar
  25. 25.
    Murphy, J.: Technical Analysis of the Financial Markets. New York Institute of Finance (1999)Google Scholar
  26. 26.
    Peters, E.: Chaos and Order in the Capital Markets, 2nd edn. Wiley, New York (1996)Google Scholar
  27. 27.
    Poli, R.: Analysis of the publications on the applications of particle swarm optimisation. J. Artif. Evol. App. 2008, 1–10 (2008), Google Scholar
  28. 28.
    Pudil, P., Novovicov, J., Kittler, J.: Floating search methods in feature selection. Pattern Recognition Letters 15(11), 1119–1125 (1994),, doi:10.1016/0167-8655(94)90127-9CrossRefGoogle Scholar
  29. 29.
    Quinlan, J.R.: C4.5: Programs for Machine Learning. Morgan Kaufmann Publishers Inc., San Francisco (1993)Google Scholar
  30. 30.
    Rennard, J.P.: Handbook of Research on Nature-inspired Computing for Economics and Management. IGI Publishing, Hershey (2006)CrossRefGoogle Scholar
  31. 31.
    Safavian, S.R., Landgrebe, D.: A survey of decision tree classifier methodology. IEEE Transactions on Systems, Man and Cybernetics 21(3), 660–674 (1991), MathSciNetCrossRefGoogle Scholar
  32. 32.
    Sewell, M.: Feature selection (2007)Google Scholar
  33. 33.
    Sousa, T., Silva, A., Neves, A.: Particle swarm based data mining algorithms for classification tasks. Parallel Computing 30(5-6), 767–783 (2004), doi:10.1016/j.parco.2003.12.015CrossRefGoogle Scholar
  34. 34.
    Stibor, T., Mohr, P., Timmis, J.: Is negative selection appropriate for anomaly detection? In: Proceedings of the International Conference on Genetic and Evolutionary Computation, GECCO 2005, pp. 321–328 (2005)Google Scholar
  35. 35.
    Tax, D.: One-class classification. PhD thesis, TU Delft, Delft University of Technology (2001)Google Scholar
  36. 36.
    Vanstone, B., Tan, C.: A survey of the application of soft computing to investment and financial trading. In: Australian and New Zeland Intelligent Information Systems Conference, pp. 211–216 (2003)Google Scholar
  37. 37.
    Vince, R.: The Handbook of Portfolio Mathematics: Formulas for optimal allocation & leverage. Wiley, Chichester (2007)Google Scholar
  38. 38.
    Witten, I.H., Frank, E.: Data mining: practical machine learning tools and techniques with java implementations. SIGMOD Rec. 31(1), 76–77 (2002), CrossRefGoogle Scholar
  39. 39.
    Witten, I.H., Frank, E.: Data Mining: Practical Machine Learning Tools and Techniques, 2nd edn. Kaufmann Series in Data Management Systems. Morgan Kaufmann, San Francisco (2005), zbMATHGoogle Scholar
  40. 40.
    Ye, Q., Liang, B., Li, Y.: Amnestic neural network for classification: application on stock trend prediction. In: Proceedings of International Conference on Services Systems and Services Management, 2005 (ICSSSM 2005), vol. 2, pp. 1031–1034 (2005), doi:10.1109/ICSSSM.2005.1500149Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Antonia Azzini
    • 1
  • Matteo De Felice
    • 2
    • 3
  • Andrea G. B. Tettamanzi
    • 1
  1. 1.Dipartimento di Tecnologie dell’InformazioneUniversità degli Studi di MilanoItaly
  2. 2.ENEA (Italian Energy New Technology and Environment Agency)Italy
  3. 3.Dipartimento di Informatica e AutomazioneUniversità degli Studi “Roma Tre”Italy

Personalised recommendations