Prediction of Trend Reversals in Stock Market by Classification of Japanese Candlesticks

  • Leszek J. Chmielewski
  • Maciej Janowicz
  • Arkadiusz Orłowski
Conference paper
Part of the Advances in Intelligent Systems and Computing book series (AISC, volume 403)


K-means clustering algorithm has been used to classify patterns of Japanese candlesticks which accompany the approach to trend reversals in the prices of several assets registered in the Warsaw stock exchange (GPW). It has been found that the trend reversals seem to be preceded by specific combinations of candlesticks with notable frequency. Surprisingly, the same patterns appear in both “bullish” and “bearish” trend reversals. The above findings should stimulate further studies on the problem of applicability of the so-called technical analysis in the stock markets.


Clustering K-means Trend reversals Japanese candlesticks 


  1. 1.
    Murphy, J.: Technical Analysis of Financial Markets. New York Institute of Finance, New York (1999)Google Scholar
  2. 2.
    Kaufman, P.: Trading Systems and Methods. Wiley, New York (2013)Google Scholar
  3. 3.
    Malkiel, B.: A Random Walk Down the Wall Street. Norton, New York (1981)Google Scholar
  4. 4.
    Fama, E., Blume, M.: Filter rules and stock-market trading. J. Bus. 39, 226–241 (1966)CrossRefGoogle Scholar
  5. 5.
    Brock, W., Lakonishok, J., LeBaron, B.: Simple technical trading rules and the stochastic properties of stock returns. J. Financ. 47(5), 1731–1764 (1992)CrossRefGoogle Scholar
  6. 6.
    Lo, A., MacKinley, A.: Stock market prices do not follow random walks: evidence from a simple specification test. Rev. Financ. Stud. 1, 41–66 (1988)CrossRefGoogle Scholar
  7. 7.
    Lo, A., MacKinley, A.: A Non-Random Walk down Wall Street. Princeton University Press, Princeton (1999)Google Scholar
  8. 8.
    Lo, A., Mamaysky, H., Wang, J.: Foundations of technical analysis: computational algorithms, statistical inference, and empirical implementation. J. Financ. 55(4), 1705–1765 (2000)CrossRefGoogle Scholar
  9. 9.
    MacQueen, J.: Some methods for classification and analysis of multivariate observations. In: Cam, M.L., Neyman, J. (eds.) Proceeding of 5th Berkeley Symposium on Mathematical Statistics and Probability, vol. 1, pp. 281–297. University of California Press, Berkeley (1967)Google Scholar
  10. 10.
    Steinhaus, H.: Sur la division des corps matériels en parties. Bull. Acad. Polon. Sci. 4(12), 801–804 (1957)MathSciNetzbMATHGoogle Scholar
  11. 11.
    Lloyd, S.: Least square quantization in PCM (1957) Bell Telephone Laboratories PaperGoogle Scholar
  12. 12.
    Forgy, E.: Cluster analysis of multivariate data: efficiency versus interpretability of classifications. Biometrics 21(3), 768–769 (1965)Google Scholar
  13. 13.
    Hartigan, J.: Clustering Algorithms. Wiley, New York (1975)zbMATHGoogle Scholar
  14. 14.
    Wikipedia: Candlestick chart – Wikipedia, The Free Encyclopedia (2014) [Online; accessed 19-December-2014]
  15. 15.
    Chmielewski, L., Janowicz, M., Orłowski, A.: Clustering algorithm based on molecular dynamics with Nose-Hoover thermostat. Application to Japanese candlesticks. In: Rutkowski, L., et al., (eds.) Artificial Intelligence and Soft Computing: Proceeding of International Conference ICAISC 2015. Lecture Notes in Artificial Intelligence, vol. 9120, pp. 330–340. Springer (2015)Google Scholar
  16. 16.
    Scikit-learn Community: Scikit-learn - machine learning in Python (2015) [Online; accessed 10-February-2015]
  17. 17.
    Pedregosa, F., Varoquaux, G., Gramfort, A., et al.: Scikit-learn: machine learning in python. J. Mach. Learn. Res. 12, 2825–2830 (2011)MathSciNetzbMATHGoogle Scholar

Copyright information

© Springer International Publishing Switzerland 2016

Authors and Affiliations

  • Leszek J. Chmielewski
    • 1
  • Maciej Janowicz
    • 1
  • Arkadiusz Orłowski
    • 1
  1. 1.Faculty of Applied Informatics and Mathematics (WZIM)Warsaw University of Life Sciences (SGGW), PolandWarsawPoland

Personalised recommendations