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. 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.
    2. 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.
    3. 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.
    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.
    2. Huang, Wenyang & Zhao, Jianyu & Wang, Xiaokang, 2024. "Model-driven multimodal LSTM-CNN for unbiased structural forecasting of European Union allowances open-high-low-close price," Energy Economics, Elsevier, vol. 132(C).

    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. 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.
    3. 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.
    4. 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).
    5. 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.
    6. Ü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.
    7. Reitz, Stefan & Rülke, Jan & Stadtmann, Georg, 2012. "Nonlinear Expectations in Speculative Markets," VfS Annual Conference 2012 (Goettingen): New Approaches and Challenges for the Labor Market of the 21st Century 62045, Verein für Socialpolitik / German Economic Association.
    8. Reitz, Stefan & Rülke, Jan-Christoph & Stadtmann, Georg, 2012. "Nonlinear expectations in speculative markets – Evidence from the ECB survey of professional forecasters," Journal of Economic Dynamics and Control, Elsevier, vol. 36(9), pages 1349-1363.
    9. 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.
    10. Westerhoff, Frank H. & Dieci, Roberto, 2006. "The effectiveness of Keynes-Tobin transaction taxes when heterogeneous agents can trade in different markets: A behavioral finance approach," Journal of Economic Dynamics and Control, Elsevier, vol. 30(2), pages 293-322, February.
    11. Joshua Schwartzstein & Adi Sunderam, 2021. "Using Models to Persuade," American Economic Review, American Economic Association, vol. 111(1), pages 276-323, January.
    12. Guglielmo Maria Caporale & Alex Plastun, 2019. "Price overreactions in the cryptocurrency market," Journal of Economic Studies, Emerald Group Publishing Limited, vol. 46(5), pages 1137-1155, August.
    13. Westerhoff Frank H., 2008. "The Use of Agent-Based Financial Market Models to Test the Effectiveness of Regulatory Policies," Journal of Economics and Statistics (Jahrbuecher fuer Nationaloekonomie und Statistik), De Gruyter, vol. 228(2-3), pages 195-227, April.
    14. 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.
    15. Sid Ghoshal & Stephen Roberts, 2016. "Extracting Predictive Information from Heterogeneous Data Streams using Gaussian Processes," Papers 1603.06202, arXiv.org, revised Jul 2018.
    16. Pereira, Robert, 1999. "Forecasting Ability But No Profitability: An Empirical Evaluation of Genetic Algorithm-optimised Technical Trading Rules," MPRA Paper 9055, University Library of Munich, Germany.
    17. Paul De Grauwe & Marianna Grimaldi, 2004. "Bubbles and Crashes in a Behavioural Finance Model," CESifo Working Paper Series 1194, CESifo.
    18. 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.
    19. 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.
    20. Ghada A. Altarawneh & Ahmad B. Hassanat & Ahmad S. Tarawneh & Ahmad Abadleh & Malek Alrashidi & Mansoor Alghamdi, 2022. "Stock Price Forecasting for Jordan Insurance Companies Amid the COVID-19 Pandemic Utilizing Off-the-Shelf Technical Analysis Methods," Economies, MDPI, vol. 10(2), pages 1-18, February.

    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.