IDEAS home Printed from https://ideas.repec.org/a/plo/pone00/0255558.html
   My bibliography  Save this article

Improving stock trading decisions based on pattern recognition using machine learning technology

Author

Listed:
  • Yaohu Lin
  • Shancun Liu
  • Haijun Yang
  • Harris Wu
  • Bingbing Jiang

Abstract

PRML, a novel candlestick pattern recognition model using machine learning methods, is proposed to improve stock trading decisions. Four popular machine learning methods and 11 different features types are applied to all possible combinations of daily patterns to start the pattern recognition schedule. Different time windows from one to ten days are used to detect the prediction effect at different periods. An investment strategy is constructed according to the identified candlestick patterns and suitable time window. We deploy PRML for the forecast of all Chinese market stocks from Jan 1, 2000 until Oct 30, 2020. Among them, the data from Jan 1, 2000 to Dec 31, 2014 is used as the training data set, and the data set from Jan 1, 2015 to Oct 30, 2020 is used to verify the forecasting effect. Empirical results show that the two-day candlestick patterns after filtering have the best prediction effect when forecasting one day ahead; these patterns obtain an average annual return, an annual Sharpe ratio, and an information ratio as high as 36.73%, 0.81, and 2.37, respectively. After screening, three-day candlestick patterns also present a beneficial effect when forecasting one day ahead in that these patterns show stable characteristics. Two other popular machine learning methods, multilayer perceptron network and long short-term memory neural networks, are applied to the pattern recognition framework to evaluate the dependency of the prediction model. A transaction cost of 0.2% is considered on the two-day patterns predicting one day ahead, thus confirming the profitability. Empirical results show that applying different machine learning methods to two-day and three-day patterns for one-day-ahead forecasts can be profitable.

Suggested Citation

  • Yaohu Lin & Shancun Liu & Haijun Yang & Harris Wu & Bingbing Jiang, 2021. "Improving stock trading decisions based on pattern recognition using machine learning technology," PLOS ONE, Public Library of Science, vol. 16(8), pages 1-25, August.
  • Handle: RePEc:plo:pone00:0255558
    DOI: 10.1371/journal.pone.0255558
    as

    Download full text from publisher

    File URL: https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0255558
    Download Restriction: no

    File URL: https://journals.plos.org/plosone/article/file?id=10.1371/journal.pone.0255558&type=printable
    Download Restriction: no

    File URL: https://libkey.io/10.1371/journal.pone.0255558?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. Hendrik Bessembinder & Kalok Chan, 1998. "Market Efficiency and the Returns to Technical Analysis," Financial Management, Financial Management Association, vol. 27(2), Summer.
    2. Fama, Eugene F, 1970. "Efficient Capital Markets: A Review of Theory and Empirical Work," Journal of Finance, American Finance Association, vol. 25(2), pages 383-417, May.
    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.
    4. G. Caginalp & H. Laurent, 1998. "The predictive power of price patterns," Applied Mathematical Finance, Taylor & Francis Journals, vol. 5(3-4), pages 181-205.
    5. Fischer, Thomas & Krauss, Christopher, 2018. "Deep learning with long short-term memory networks for financial market predictions," European Journal of Operational Research, Elsevier, vol. 270(2), pages 654-669.
    Full references (including those not matched with items on IDEAS)

    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. U, JuHyok & Lu, PengYu & Kim, ChungSong & Ryu, UnSok & Pak, KyongSok, 2020. "A new LSTM based reversal point prediction method using upward/downward reversal point feature sets," Chaos, Solitons & Fractals, Elsevier, vol. 132(C).
    2. Chen, Shi & Bao, Si & Zhou, Yu, 2016. "The predictive power of Japanese candlestick charting in Chinese stock market," Physica A: Statistical Mechanics and its Applications, Elsevier, vol. 457(C), pages 148-165.
    3. Gil Cohen, 2022. "Artificial Intelligence in Trading the Financial Markets," International Journal of Economics & Business Administration (IJEBA), International Journal of Economics & Business Administration (IJEBA), vol. 0(1), pages 101-110.
    4. Tsung-Hsun Lu & Yung-Ming Shiu, 2012. "Tests for Two-Day Candlestick Patterns in the Emerging Equity Market of Taiwan," Emerging Markets Finance and Trade, Taylor & Francis Journals, vol. 48(0), pages 41-57, January.
    5. Shangkun Deng & Zhihao Su & Yanmei Ren & Haoran Yu & Yingke Zhu & Chenyang Wei, 2022. "Can Japanese Candlestick Patterns be Profitable on the Component Stocks of the SSE50 Index?," SAGE Open, , vol. 12(3), pages 21582440221, August.
    6. Horton, Marshall J., 2009. "Stars, crows, and doji: The use of candlesticks in stock selection," The Quarterly Review of Economics and Finance, Elsevier, vol. 49(2), pages 283-294, May.
    7. 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).
    8. Lu, Tsung-Hsun, 2014. "The profitability of candlestick charting in the Taiwan stock market," Pacific-Basin Finance Journal, Elsevier, vol. 26(C), pages 65-78.
    9. Lu, Tsung-Hsun & Chen, Yi-Chi & Hsu, Yu-Chin, 2015. "Trend definition or holding strategy: What determines the profitability of candlestick charting?," Journal of Banking & Finance, Elsevier, vol. 61(C), pages 172-183.
    10. Cheol‐Ho Park & Scott H. Irwin, 2007. "What Do We Know About The Profitability Of Technical Analysis?," Journal of Economic Surveys, Wiley Blackwell, vol. 21(4), pages 786-826, September.
    11. Piyapas Tharavanij & Vasan Siraprapasiri & Kittichai Rajchamaha, 2017. "Profitability of Candlestick Charting Patterns in the Stock Exchange of Thailand," SAGE Open, , vol. 7(4), pages 21582440177, October.
    12. Kentaro Imajo & Kentaro Minami & Katsuya Ito & Kei Nakagawa, 2020. "Deep Portfolio Optimization via Distributional Prediction of Residual Factors," Papers 2012.07245, arXiv.org.
    13. Michael McAleer & John Suen & Wing Keung Wong, 2016. "Profiteering from the Dot-Com Bubble, Subprime Crisis and Asian Financial Crisis," The Japanese Economic Review, Japanese Economic Association, vol. 67(3), pages 257-279, September.
    14. Stefanescu, Razvan & Dumitriu, Ramona, 2015. "Conţinutul analizei seriilor de timp financiare [The Essentials of the Analysis of Financial Time Series]," MPRA Paper 67175, University Library of Munich, Germany.
    15. Amin Aminimehr & Ali Raoofi & Akbar Aminimehr & Amirhossein Aminimehr, 2022. "A Comprehensive Study of Market Prediction from Efficient Market Hypothesis up to Late Intelligent Market Prediction Approaches," Computational Economics, Springer;Society for Computational Economics, vol. 60(2), pages 781-815, August.
    16. Zhu, Min & Atri, Said & Yegen, Eyub, 2016. "Are candlestick trading strategies effective in certain stocks with distinct features?," Pacific-Basin Finance Journal, Elsevier, vol. 37(C), pages 116-127.
    17. Ben Moews, 2023. "On random number generators and practical market efficiency," Papers 2305.17419, arXiv.org, revised Jul 2023.
    18. 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.
    19. Bartosz Bieganowski & Robert Ślepaczuk, 2024. "Supervised Autoencoder MLP for Financial Time Series Forecasting," Working Papers 2024-03, Faculty of Economic Sciences, University of Warsaw.
    20. Shynkevich, Andrei, 2013. "Time-series momentum as an intra- and inter-industry effect: Implications for market efficiency," Journal of Economics and Business, Elsevier, vol. 69(C), pages 64-85.

    More about this item

    Statistics

    Access and download statistics

    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:plo:pone00:0255558. 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: plosone (email available below). General contact details of provider: https://journals.plos.org/plosone/ .

    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.