Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Stock Prediction by Searching for Similarities in Candlestick Charts

Published: 01 July 2014 Publication History

Abstract

The aim of stock prediction is to effectively predict future stock market trends (or stock prices), which can lead to increased profit. One major stock analysis method is the use of candlestick charts. However, candlestick chart analysis has usually been based on the utilization of numerical formulas. There has been no work taking advantage of an image processing technique to directly analyze the visual content of the candlestick charts for stock prediction. Therefore, in this study we apply the concept of image retrieval to extract seven different wavelet-based texture features from candlestick charts. Then, similar historical candlestick charts are retrieved based on different texture features related to the query chart, and the “future” stock movements of the retrieved charts are used for stock prediction. To assess the applicability of this approach to stock prediction, two datasets are used, containing 5-year and 10-year training and testing sets, collected from the Dow Jones Industrial Average Index (INDU) for the period between 1990 and 2009. Moreover, two datasets (2010 and 2011) are used to further validate the proposed approach. The experimental results show that visual content extraction and similarity matching of candlestick charts is a new and useful analytical method for stock prediction. More specifically, we found that the extracted feature vectors of 30, 90, and 120, the number of textual features extracted from the candlestick charts in the BMP format, are more suitable for predicting stock movements, while the 90 feature vector offers the best performance for predicting short- and medium-term stock movements. That is, using the 90 feature vector provides the lowest MAPE (3.031%) and Theil’s U (1.988%) rates in the twenty-year dataset, and the best MAPE (2.625%, 2.945%) and Theil’s U (1.622%, 1.972%) rates in the two validation datasets (2010 and 2011).

References

[1]
Andreopoulos, Y. 2009. Comments on “phase-shifting for nonseparable 2-D Haar wavelets. IEEE Trans. Image Process. 18, 8, 1897--1898.
[2]
Araújo, R. D. A. 2010. Hybrid intelligent methodology to design translation invariant morphological operators for Brazilian stock market prediction. Neural Netw. 23, 10, 1238--1251.
[3]
Araújo, R. D. A. and Ferreira, T. A. E. 2013. A morphological-rank-linear evolutionary method for stock market prediction. Inform. Sci., 237, 3--17.
[4]
Ariss, R. T., Rezvanian, R., and Mehdian, S. M. 2011. Calendar anomalies in the Gulf Cooperation Council stock markets. Emerg. Markets Rev. 12, 3, 293--307.
[5]
Asadi, S., Hadavandi, E., Mehmanpazir, F., and Nakhostin, M. M. 2012. Hybridization of evolutionary Levenberg--Marquardt neural networks and data pre-processing for stock market prediction. Knowl.-Based Syst. 35, 245--258.
[6]
Bollerslev, T. 1986. Generalized autoregressive conditional heteroscedasticity. J. Econometrics 31, 3, 307--327.
[7]
Briza, A. C. and Naval Jr., P. C. 2011. Stock trading system based on the multi-objective particle swarm optimization of technical indicators on end-of-day market data. Appl. Soft Comput. 11, 1, 1191--1201.
[8]
Brock, W., Lakonishok, J., and LeBaron, B. 1992. Simple technical trading rules and the stochastic properties of stock returns. J. Finance 47, 5, 1731--1764.
[9]
Caginalp, G. and Laurent, H. 1998. The predictive power of price patterns. Appl. Math. Finance 5, 3--4, 181--205.
[10]
Chan, S. W. K. and Franklin, J. 2011. A text-based decision support system for financial sequence prediction. Decision Supp. Syst. 52, 1, 189--198.
[11]
Chang, P. H. K. and Osler, C. L. 1999. Methodical madness: Technical analysis and the irrationality of exchange-rate forecasts. Econ. J. 109, 458, 636--661.
[12]
Chen, D. R., Huang, Y. L., and Lin, S. H. 2011. Computer-aided diagnosis with textural features for breast lesions in sonograms. Comput. Med. Imaging Graphics 35, 3, 220--226.
[13]
Chen, P. C. and Pavlidis, T. 1983. Segmentation by texture using correlation. IEEE Trans. Pattern Anal. Mach. Intell. 5, 1, 64--69.
[14]
Cheng, C. H., Chen, T. L., and Wei, L. Y. 2010. A hybrid model based on rough sets theory and genetic algorithms for stock price forecasting. Inform. Sci. 180, 9, 1610--1629.
[15]
Chianga, J. Y. and Cheng, S. R. 2009. Multiple-instance content-based image retrieval employing isometric embedded similarity measure. Pattern Recog. 42, 1, 158--166.
[16]
Colander, D. C. 2012. Macroeconomics 9th Ed. McGraw-Hill, New York, NY.
[17]
Corder, G. W. and Foreman, D. I. 2009. Nonparametric Statistics for Non-Statisticians: A Step-By-Step Approach 1st Ed. Wiley, New York, NY.
[18]
de Groot, B. and Franses, P. H. 2012. Common socio-economic cycle periods. Technol. Forecasting Soc. Change 79, 1, 59--68.
[19]
Doyle, J. R. and Chen, C. H. 2009. The wandering weekday effect in major stock markets. J. Banking Finance 33, 8, 1388--1399.
[20]
Edwards, R. D., Magee, J., and Bassetti, W. H. C. 2012. Technical Analysis of Stock Trends 10th Ed. CRC Press, Boca Raton, FL.
[21]
Engle, R. F. 1982. Autoregressive conditional heteroscedasticity with estimates of the variance of United Kingdom inflation. Econometrica 50, 4, 987--1007.
[22]
Fama, E. F. 1970. Efficient capital markets: A review of theory and empirical work. J. Finance 25, 2, 383--417.
[23]
Fiess, N. M. and MacDonald, R. 2002. Towards the fundamentals of technical analysis: Analysing the information content of high, low and close prices. Econ. Modell. 19, 3, 353--374.
[24]
Fock, J. H., Klein, C., and Zwergel, B. 2005. Performance of candlestick analysis on intraday futures data. J. Derivatives 13, 1, 28--40.
[25]
Friesen, G. C., Weller, P. A., and Dunham, L. M. 2009. Price trends and patterns in technical analysis: A theoretical and empirical examination. J. Banking Finance 33, 6, 1089--1100.
[26]
Fuertes, A. M., Izzeldin, M., and Kalotychou, E. 2009. On forecasting daily stock volatility: The role of intraday information and market conditions. Int. J. Forecasting 25, 2, 259--281.
[27]
Graña, M. and Veganzones, M. A. 2012. An endmember-based distance for content based hyperspectral image retrieval. Pattern Recog. 45, 9, 3472--3489.
[28]
Hagenau, M., Liebmann, M., and Neumann, D. 2013. Automated news reading: Stock price prediction based on financial news using context-capturing features. Decision Supp. Syst. 55, 3, 685--697.
[29]
Hansen, P. R. and Lunde, A. 2005. A forecast comparison of volatility models: Does anything beat a GARCH(1,1)? J. Appl. Econometrics 20, 7, 873--889.
[30]
He, D. C. and Wang, L. 1990. Texture unit, texture spectrum, and texture analysis. IEEE Trans. Geosci. Remote Sens. 28, 4, 509--512.
[31]
Hsia, C. H., Chiang, J. S., and Guo, J. M. 2013. Memory-efficient hardware architecture of 2-D dual-mode lifting-based discrete wavelet transforms. IEEE Trans. Circuits Syst. Video Technol. 23, 4, 671--683.
[32]
Hsia, C. H., Guo, J. M., and Chiang, J. S. 2009. Improved low-complexity algorithm for 2-D integer lifting-based discrete wavelet transform using symmetric mask-based scheme. IEEE Trans. Circuits Syst. Video Technol. 19, 8, 1202--1208.
[33]
Hsieh, T. J., Hsiao, H. F., and Yeh, W. C. 2011. Forecasting stock markets using wavelet transforms and recurrent neural networks: An integrated system based on a artificial bee colony algorithm. Appl. Soft Comput. 11, 2, 2510--2525.
[34]
Hsu, C. M. 2011. A hybrid procedure for stock price prediction by integrating self-organizing map and genetic programming. Expert Syst. Appl. 38, 11, 14026--14036.
[35]
Hsu, P. H. and Kuan, C. M. 2005. Reexamining the profitability of technical analysis with data snooping checks. J. Financial Econ. 3, 4, 606--628.
[36]
Hung, J. C. 2009. A fuzzy asymmetric GARCH model applied to stock markets. Inform. Sci. 179, 22, 3930--3943.
[37]
Kang, M. 2010. Probability of information-based trading and the January effect. J. Banking Finance 34, 12, 2985--2994.
[38]
Krishnamachari, S. and Chellappa, R. 1997. Multiresolution Gauss-Markov random field models for texture segmentation. IEEE Trans. Image Proc. 6, 2, 251--267.
[39]
Kwon, Y. K. and Moon, B. R. 2007. A hybrid neurogenetic approach for stock forecasting. IEEE Trans. Neural Netw. 18, 3, 851--864.
[40]
Lee, C. H. L., Liu, A., and Chen, W. S. 2006. Pattern discovery of fuzzy time series for financial prediction employing an isometric embedded similarity measure. Pattern Recog. 42, 1, 158--166.
[41]
Lee, C. H. L., Liu, A., and Chen, W. S. 2006. Pattern discovery of fuzzy time series for financial prediction. IEEE Trans. Knowl. Data Eng. 18, 5, 613--625.
[42]
Lee, D. J., Antani, S., Chang, Y., Gledhill, K., Long, L. R., and Christensen, P. 2009. CBIR of spine X-ray images on inter-vertebral disc space and shape profiles using feature ranking and voting consensus. Data Knowl. Eng. 68, 12, 1359--1369.
[43]
Lee, K. H. and Jo, G. S. 1999. Expert system for predicting stock market timing using a candlestick chart. Expert Syst. Appl. 16, 4, 357--364.
[44]
Leigh, W., Modani, N., Purvis, R., and Roberts, T. 2002. Stock market trading rule discovery using technical charting heuristics. Expert Syst. Appl. 23, 2, 155--159.
[45]
Levy, T. and Yagil, J. 2012. The week-of-the-year effect: Evidence from around the globe. J. Banking Finance 36, 7, 1963--1974.
[46]
Lilly, J. M. and Olhede, S. C. 2010. On the analytic wavelet transform. IEEE Trans. Inf. Theory 56, 8, 4135--4156.
[47]
Lin, M. C., Lee, A. J. T., Kao, R. T., and Chen, K. T. 2011. Stock price movement prediction using representative prototypes of financial reports. ACM Trans. Manage. Inf. Syst. 2, 3, 11--18.
[48]
Liu, C. F., Yeh, C. Y., and Lee, S. J. 2012. Application of type-2 neuro-fuzzy modeling in stock price prediction. Appl. Soft Comput. 12, 4, 1348--1358.
[49]
Liu, F. and Wang, J. 2012. Fluctuation prediction of stock market index by Legendre neural network with random time strength function. Neurocomput. 83, 12--21.
[50]
Luo, L. and Chen, X. 2013. Integrating piecewise linear representation and weighted support vector machine for stock trading signal prediction. Appl. Soft Comput. 13, 2, 806--816.
[51]
Marshall, B. R., Young, M. R., and Cahan, R. 2008. Are candlestick technical trading strategies profitable in the Japanese equity market? Rev. Quant. Finance Account. 31, 2, 191--207.
[52]
Marshall, B. R., Young, M. R., and Rose, L. C. 2006. Candlestick technical trading strategies: Can they create value for investors. J. Banking Finance 30, 8, 2303--2323.
[53]
Moller, N. and Zilca, S. 2008. The evolution of the January effect. J. Banking Finance 32, 3, 447--457.
[54]
Morris, G. L. 2006. Candlestick Charting Explained: Timeless Techniques for Trading Stocks and Futures 3rd Ed. McGraw-Hill, New York, NY.
[55]
Murphy, J. J. 1999. Technical Analysis of the Financial Markets: A Comprehensive Guide to Trading Methods and Applications 1st Ed. New York Institute of Finance, New York, NY.
[56]
O’Connor, N. and Madden, M. G. 2006. A neural network approach to predicting stock exchange movements using external factors. Knowl.-Based Syst. 19, 5, 371--378.
[57]
Oh, S. K., Pedrycz, W., and Park, H. S. 2006. Genetically optimized fuzzy polynomial neural networks. IEEE Trans. Fuzzy Syst. 14, 1, 125--144.
[58]
Park, K. and Shin, H. 2013. Stock price prediction based on a complex interrelation network of economic factors. Eng. Appl. Artif. Intell. 26, 5--6, 1550--1561.
[59]
Qi, M. and Zhang, G. P. 2008. Trend time-series modeling and forecasting with neural networks. IEEE Trans. Neural Netw. 19, 5, 808--816.
[60]
Quellec, G., Lamard, M., Cazuguel, G., Cochener, B., and Roux, C. 2010. Adaptive nonseparable wavelet transform via lifting and its application to content-based image retrieval. IEEE Trans. Image Proc. 19, 1, 25--35.
[61]
Rapach, D. E. and Wohar, M. E. 2006. In-sample vs. out-of-sample tests of stock return predictability in the context of data mining. J. Empirical Finance 13, 2, 231--247.
[62]
Rui, Y., Huang, T. S., and Chang, S. F. 1999. Image retrieval: Current techniques, promising directions and open issues. J. Visual Commun. Image Rep. 10, 1, 39--62.
[63]
Sapankevych, N. I. and Sankar, R. 2009. Time series prediction using support vector machines: A survey. IEEE Comput. Intell. Mag. 4, 2, 24--38.
[64]
Schumaker, R. P. and Chen, H. 2009. Textual analysis of stock market prediction using breaking financial news: The AZFinText system. ACM Trans. Inf. Syst. 27, 2, 1--19.
[65]
Smeulders, A. W. M., Worring, M., Santini, S., Gupta, A., and Jain, R. 2000. Content-based image retrieval at the end of the early years. IEEE Trans. Pattern Anal. Mach. Intell. 22, 12, 1349--1380.
[66]
Tsai, C. F. and Hsiao, Y. C. 2010. Combining multiple feature selection methods for stock prediction: Union, intersection, and multi-intersection approaches. Decis. Supp. Syst. 50, 1, 258--269.
[67]
Wang, Y. F., Cheng, S., and Hsu, M. H. 2010. Incorporating the Markov chain concept into fuzzy stochastic prediction of stock indexes. Appl. Soft Comput. 10, 2, 613--617.
[68]
Wink, A. M. and Roerdink, J. B. T. M. 2010. Polyphase decompositions and shift-invariant discrete wavelet transforms in the frequency domain. Signal Proc. 90, 6, 1779--1787.
[69]
Yue, J., Li, Z., Liu, L., and Fu, Z. 2011. Content-based image retrieval using color and texture fused features. Math. Comput. Modell. 54, 3--4, 1121--1127.
[70]
Zarandi, M. H. F., Zarinbal, M., Ghanbari, N., and Turksen, I. B. 2013. A new fuzzy functions model tuned by hybridizing imperialist competitive algorithm and simulated annealing application: Stock price prediction. Inf. Sci. 222, 213--228.
[71]
Zarb, F. G. and Kerekes, G. T. 1970. The Stock Market Handbook: Reference Manual for the Securities Industry 1st Ed. Dow Jones-Irwin, Homewood, IL.
[72]
Zheng, P. and Huang, J. 2013. Discrete wavelet transform and data expansion reduction in homomorphic encrypted domains. IEEE Trans. Image Proc. 22, 6, 2455--2468.
[73]
Zhu, Y. and Zhou, G. 2009. Technical analysis: An asset allocation perspective on the use of moving averages. J. Financial Econ. 92, 3, 519--544.

Cited By

View all
  • (2024)Unleashing the Power of Tweets and News in Stock-Price Prediction Using Machine-Learning TechniquesAlgorithms10.3390/a1706023417:6(234)Online publication date: 28-May-2024
  • (2024)A structural VAR and VECM modeling method for open-high-low-close data contained in candlestick chartFinancial Innovation10.1186/s40854-024-00622-610:1Online publication date: 5-Mar-2024
  • (2024)A parallel hybrid neural networks model for forecasting returns with candlestick technical trading strategyExpert Systems with Applications10.1016/j.eswa.2024.124486255(124486)Online publication date: Dec-2024
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Transactions on Management Information Systems
ACM Transactions on Management Information Systems  Volume 5, Issue 2
July 2014
82 pages
ISSN:2158-656X
EISSN:2158-6578
DOI:10.1145/2659230
Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 01 July 2014
Accepted: 01 February 2014
Revised: 01 October 2013
Received: 01 March 2013
Published in TMIS Volume 5, Issue 2

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. Stock prediction
  2. candlestick chart
  3. data mining

Qualifiers

  • Research-article
  • Research
  • Refereed

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)92
  • Downloads (Last 6 weeks)11
Reflects downloads up to 14 Oct 2024

Other Metrics

Citations

Cited By

View all
  • (2024)Unleashing the Power of Tweets and News in Stock-Price Prediction Using Machine-Learning TechniquesAlgorithms10.3390/a1706023417:6(234)Online publication date: 28-May-2024
  • (2024)A structural VAR and VECM modeling method for open-high-low-close data contained in candlestick chartFinancial Innovation10.1186/s40854-024-00622-610:1Online publication date: 5-Mar-2024
  • (2024)A parallel hybrid neural networks model for forecasting returns with candlestick technical trading strategyExpert Systems with Applications10.1016/j.eswa.2024.124486255(124486)Online publication date: Dec-2024
  • (2024)Model-driven multimodal LSTM-CNN for unbiased structural forecasting of European Union allowances open-high-low-close priceEnergy Economics10.1016/j.eneco.2024.107459132(107459)Online publication date: Apr-2024
  • (2024)Hybrid Technical-Visual Features for Stock PredictionAdvanced Information Networking and Applications10.1007/978-3-031-57870-0_25(280-289)Online publication date: 10-Apr-2024
  • (2023)Feature Extraction and Prediction of Water Quality Based on Candlestick Theory and Deep Learning MethodsWater10.3390/w1505084515:5(845)Online publication date: 22-Feb-2023
  • (2023)Prediction of stock market movement via technical analysis of stock data stored on blockchain using novel History Bits based machine learning algorithmIET Software10.1049/sfw2.12092Online publication date: 12-Jan-2023
  • (2023)Identifying the determinants of European carbon allowances prices: A novel robust partial least squares method for open-high-low-close dataInternational Review of Financial Analysis10.1016/j.irfa.2023.10293890(102938)Online publication date: Nov-2023
  • (2023)Shortlisting machine learning-based stock trading recommendations using candlestick pattern recognitionExpert Systems with Applications: An International Journal10.1016/j.eswa.2022.119493216:COnline publication date: 15-Apr-2023
  • (2023)Transformer-based forecasting for intraday trading in the Shanghai crude oil market: Analyzing open-high-low-close pricesEnergy Economics10.1016/j.eneco.2023.107106127(107106)Online publication date: Nov-2023
  • Show More Cited By

View Options

Get Access

Login options

Full Access

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media