IDEAS home Printed from https://ideas.repec.org/a/spr/fininn/v6y2020i1d10.1186_s40854-020-00187-0.html
   My bibliography  Save this article

Encoding candlesticks as images for pattern classification using convolutional neural networks

Author

Listed:
  • Jun-Hao Chen

    (Soochow University)

  • Yun-Cheng Tsai

    (Soochow University)

Abstract

Candlestick charts display the high, low, opening, and closing prices in a specific period. Candlestick patterns emerge because human actions and reactions are patterned and continuously replicate. These patterns capture information on the candles. According to Thomas Bulkowski’s Encyclopedia of Candlestick Charts, there are 103 candlestick patterns. Traders use these patterns to determine when to enter and exit. Candlestick pattern classification approaches take the hard work out of visually identifying these patterns. To highlight its capabilities, we propose a two-steps approach to recognize candlestick patterns automatically. The first step uses the Gramian Angular Field (GAF) to encode the time series as different types of images. The second step uses the Convolutional Neural Network (CNN) with the GAF images to learn eight critical kinds of candlestick patterns. In this paper, we call the approach GAF-CNN. In the experiments, our approach can identify the eight types of candlestick patterns with 90.7% average accuracy automatically in real-world data, outperforming the LSTM model.

Suggested Citation

  • Jun-Hao Chen & Yun-Cheng Tsai, 2020. "Encoding candlesticks as images for pattern classification using convolutional neural networks," Financial Innovation, Springer;Southwestern University of Finance and Economics, vol. 6(1), pages 1-19, December.
  • Handle: RePEc:spr:fininn:v:6:y:2020:i:1:d:10.1186_s40854-020-00187-0
    DOI: 10.1186/s40854-020-00187-0
    as

    Download full text from publisher

    File URL: http://link.springer.com/10.1186/s40854-020-00187-0
    File Function: Abstract
    Download Restriction: no

    File URL: https://libkey.io/10.1186/s40854-020-00187-0?utm_source=ideas
    LibKey link: if access is restricted and if your library uses this service, LibKey will redirect you to where you can use your library subscription to access this item
    ---><---

    References listed on IDEAS

    as
    1. Rabia Aziz & C. K. Verma & Namita Srivastava, 2018. "Artificial Neural Network Classification of High Dimensional Data with Novel Optimization Approach of Dimension Reduction," Annals of Data Science, Springer, vol. 5(4), pages 615-635, December.
    2. Taylor, Mark P. & Allen, Helen, 1992. "The use of technical analysis in the foreign exchange market," Journal of International Money and Finance, Elsevier, vol. 11(3), pages 304-314, June.
    3. Marshall, Ben R. & Young, Martin R. & Rose, Lawrence C., 2006. "Candlestick technical trading strategies: Can they create value for investors?," Journal of Banking & Finance, Elsevier, vol. 30(8), pages 2303-2323, August.
    Full references (including those not matched with items on IDEAS)

    Citations

    Citations are extracted by the CitEc Project, subscribe to its RSS feed for this item.
    as


    Cited by:

    1. Zhengmeng Xu & Yujie Wang & Xiaotong Feng & Yilin Wang & Yanli Li & Hai Lin, 2023. "Quantum-Enhanced Forecasting: Leveraging Quantum Gramian Angular Field and CNNs for Stock Return Predictions," Papers 2310.07427, arXiv.org, revised Dec 2023.

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Chiarella, Carl & Ladley, Daniel, 2016. "Chasing trends at the micro-level: The effect of technical trading on order book dynamics," Journal of Banking & Finance, Elsevier, vol. 72(S), pages 119-131.
    2. Paolo Mazza & Mikael Petitjean, 2019. "Testing the effect of technical analysis on market quality and order book dynamics," Applied Economics, Taylor & Francis Journals, vol. 51(18), pages 1947-1976, April.
    3. Chiang, Mi-Hsiu & Chiu, Hsin-Yu & Kuo, Wei-Yu, 2021. "Predictive ability of similarity-based futures trading strategies," Pacific-Basin Finance Journal, Elsevier, vol. 68(C).
    4. Ülkü, Numan & Prodan, Eugeniu, 2013. "Drivers of technical trend-following rules' profitability in world stock markets," International Review of Financial Analysis, Elsevier, vol. 30(C), pages 214-229.
    5. Friesen, Geoffrey C. & Weller, Paul A. & Dunham, Lee M., 2009. "Price trends and patterns in technical analysis: A theoretical and empirical examination," Journal of Banking & Finance, Elsevier, vol. 33(6), pages 1089-1100, June.
    6. Shynkevich, Andrei, 2012. "Performance of technical analysis in growth and small cap segments of the US equity market," Journal of Banking & Finance, Elsevier, vol. 36(1), pages 193-208.
    7. Vigfusson, Robert, 1997. "Switching between Chartists and Fundamentalists: A Markov Regime-Switching Approach," International Journal of Finance & Economics, John Wiley & Sons, Ltd., vol. 2(4), pages 291-305, October.
    8. Joshua Schwartzstein & Adi Sunderam, 2021. "Using Models to Persuade," American Economic Review, American Economic Association, vol. 111(1), pages 276-323, January.
    9. Chi-Wei Su, 2012. "The relationship between exchange rate and macroeconomic variables in China," Zbornik radova Ekonomskog fakulteta u Rijeci/Proceedings of Rijeka Faculty of Economics, University of Rijeka, Faculty of Economics and Business, vol. 30(1), pages 33-56.
    10. Peter Rowland & Hugo OLiveros C., 2003. "Colombian Purchasing Power Parity Analysed Using a Framework of Multivariate Cointegration," Borradores de Economia 252, Banco de la Republica de Colombia.
    11. Wu, Po-Chin & Liu, Shiao-Yen & Pan, Sheng-Chieh, 2013. "Nonlinear bilateral trade balance-fundamentals nexus: A panel smooth transition regression approach," International Review of Economics & Finance, Elsevier, vol. 27(C), pages 318-329.
    12. Bohm, Volker & Wenzelburger, Jan, 2005. "On the performance of efficient portfolios," Journal of Economic Dynamics and Control, Elsevier, vol. 29(4), pages 721-740, April.
    13. Reitz, Stefan, 2006. "On the predictive content of technical analysis," The North American Journal of Economics and Finance, Elsevier, vol. 17(2), pages 121-137, August.
    14. Stephan Schulmeister, 2000. "Technical Analysis and Exchange Rate Dynamics," WIFO Studies, WIFO, number 25857, April.
    15. Trifan, Emanuela, 2004. "Entscheidungsregeln und ihr Einfluss auf den Aktienkurs," Darmstadt Discussion Papers in Economics 131, Darmstadt University of Technology, Department of Law and Economics.
    16. Frenkel, Michael & Pierdzioch, Christian & Stadtmann, Georg, 2006. "The transparency of the ECB policy: What can we learn from its foreign exchange market interventions?," Journal of Policy Modeling, Elsevier, vol. 28(2), pages 141-156, February.
    17. Baviera, Roberto & Pasquini, Michele & Serva, Maurizio & Vergni, Davide & Vulpiani, Angelo, 2002. "Antipersistent Markov behavior in foreign exchange markets," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 312(3), pages 565-576.
    18. Carol Osler, 2012. "Market Microstructure and the Profitability of Currency Trading," Working Papers 48, Brandeis University, Department of Economics and International Business School.
    19. Filip Stanek & Jiri Kukacka, 2018. "The Impact of the Tobin Tax in a Heterogeneous Agent Model of the Foreign Exchange Market," Computational Economics, Springer;Society for Computational Economics, vol. 51(4), pages 865-892, April.
    20. Paul De Grauwe & Marianna Grimaldi, 2014. "Heterogeneity of Agents, Transactions Costs and the Exchange Rate," World Scientific Book Chapters, in: Exchange Rates and Global Financial Policies, chapter 2, pages 33-70, World Scientific Publishing Co. Pte. Ltd..

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:spr:fininn:v:6:y:2020:i:1:d:10.1186_s40854-020-00187-0. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: Sonal Shukla or Springer Nature Abstracting and Indexing (email available below). General contact details of provider: http://www.springer.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.