Skip to main content
Log in

Adaptive detection of FOREX repetitive chart patterns

  • Theoretical advances
  • Published:
Pattern Analysis and Applications Aims and scope Submit manuscript

Abstract

The global financial ecosystem has evolved and matured along with the ever-changing world economy that grew increasingly complicated due to globalisation. As traders are often inundated with information from various sources when formulating trading strategies, numerous analysis methods have been developed to ease the decision-making process. However, factors such as prior experience and knowledge of the trader as well as various psychological factors often influence the final trading decision. Focusing on charting-based analysis, it still suffers from drawbacks due to the time-warping properties of the chart patterns and the reliance on a large number of pre-defined chart patterns. Hence, in order to address the gaps within the FOREX research, the paper endeavours to propose a novel chart detection algorithm. The auto-segmentation implementation within the algorithm utilises piecewise linear regression to detect chart patterns within the FOREX historical data. By successfully extracting the repetitive chart patterns and subsequently establishing its similarities using Agglomerative Hierarchical Clustering, the information provided could potentially be used to assist traders in solidifying their investment decisions. The experimental results obtained show that repetitive chart patterns can indeed be successfully detected and extracted from the FOREX historical data.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10

Similar content being viewed by others

Notes

  1. R version 3.4.0 was utilised for the development of the entire project [14].

  2. The R segmented package version 0.5–2.0 was utilised to compute the PLR break-points [11, 12].

  3. The R dtw package version 1.18-1 was utilised to compute the DTW distance matrix [58, 59].

  4. The R stats package from R version 3.4.0 and dendextend package version 1.5.2 were utilised for clustering [13, 14].

References

  1. Dunis CL, Laws J, Schilling U (2012) Currency trading in volatile markets: did neural networks outperform for the EUR/USD during the financial crisis 2007–2009? J Deriv Hedge Funds 18(1):2–41. https://doi.org/10.1057/jdhf.2011.31

    Article  Google Scholar 

  2. Paukste A, Raudys A (2013) Intraday forex bid/ask spread patterns—analysis and forecasting. In: 2013 IEEE conference on computational intelligence for financial engineering & economics (CIFEr). IEEE, pp 118–121. https://doi.org/10.1109/cifer.2013.6611706

  3. King MR, Mallo C (2010) A user’s guide to the Triennial Central Bank Survey of foreign exchange market activity. BIS Q Rev 71–83

  4. Baiynd AM (2011) The trading book: a complete solution to mastering technical systems and trading psychology. McGraw-Hill, New York

    Google Scholar 

  5. Coulling A (2013) Forex for beginners [Kindle Paperwhite version]. CreateSpace Independent Publishing Platform. Retrieved from https://www.amazon.co.uk

  6. Gallo C (2014) The forex market in practice: a computing approach for automated trading strategies. Int J Econ Manag Sci 03(01):1–9. https://doi.org/10.4172/2162-6359.1000169

    Article  Google Scholar 

  7. Simon HA (1955) A behavioral model of rational choice. Q J Econ 69(1):99–188. https://doi.org/10.2307/1884852

    Article  Google Scholar 

  8. Neely CJ, Weller PA (2011) Technical analysis in the foreign exchange market. Tech. Rep. 2011–001B, Federal Reserve Bank of St. Louis

  9. Aloud M, Fasli M, Tsang E, Dupuis A, Olsen R (2013) Stylized facts of trading activity in the high frequency FX market: an empirical study. J Finance Invest Anal 2(4):145–183

    Google Scholar 

  10. Neely CJ, Weller PA (2003) Intraday technical trading in the foreign exchange market. J Int Money Finance 22(2):223–237. https://doi.org/10.1016/s0261-5606(02)00101-8

    Article  Google Scholar 

  11. Muggeo VMR (2003) Estimating regression models with unknown break-points. Stat Med 22(19):3055–3071. https://doi.org/10.1002/sim.1545

    Article  Google Scholar 

  12. Muggeo VMR (2008) Segmented: an R package to fit regression models with broken-line relationships. R news 8(1):20–25

    Google Scholar 

  13. Galili T (2015) dendextend: an R package for visualizing, adjusting and comparing trees of hierarchical clustering. Bioinformatics 31(22):3718–3720. https://doi.org/10.1093/bioinformatics/btv428

    Article  Google Scholar 

  14. R Core Team (2017) R: a language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. https://www.R-project.org/

  15. Malkiel BG (1985) A random walk down wall street, Fourth edn. W. W. Norton, New York

    Google Scholar 

  16. Fama EF (1970) Efficient capital markets: a review of theory and empirical work. J Finance 25(2):383. https://doi.org/10.2307/2325486

    Article  Google Scholar 

  17. Lo AW (2004) The adaptive markets hypothesis: market efficiency from an evolutionary perspective. J Portf Manag 30(5):15–29. https://doi.org/10.3905/jpm.2004.442611

    Article  Google Scholar 

  18. Schulmeister S (2008) Components of the profitability of technical currency trading. Appl Financ Econ 18(11):917–930. https://doi.org/10.1080/09603100701335416

    Article  Google Scholar 

  19. Neely C, Weller P, Dittmar R (1997) Is technical analysis in the foreign exchange market profitable? A genetic programming approach. J Financ Quant Anal 32(4):405. https://doi.org/10.2307/2331231

    Article  Google Scholar 

  20. Bekiros SD (2015) Heuristic learning in intraday trading under uncertainty. J Empir Finance 30:34–49. https://doi.org/10.1016/j.jempfin.2014.11.002

    Article  Google Scholar 

  21. Bagheri A, Peyhani HM, Akbari M (2014) Financial forecasting using ANFIS networks with quantum-behaved particle swarm optimization. Expert Syst Appl 41(14):6235–6250. https://doi.org/10.1016/j.eswa.2014.04.003

    Article  Google Scholar 

  22. Bulkowski TN (2005) Encyclopedia of chart patterns, 2nd edn. Wiley, New York

    Google Scholar 

  23. Fu TC, Chung FL, Luk R, Ng CM (2007) Stock time series pattern matching: template-based vs. rule-based approaches. Eng Appl Artif Intell 20(3):347–364. https://doi.org/10.1016/j.engappai.2006.07.003

    Article  Google Scholar 

  24. Wan Y, Si YW (2017a) Adaptive neuro fuzzy inference system for chart pattern matching in financial time series. Appl Soft Comput 57:1–18. https://doi.org/10.1016/j.asoc.2017.03.023

    Article  Google Scholar 

  25. Wan Y, Si YW (2017b) A formal approach to chart patterns classification in financial time series. Inf Sci 411:151–175. https://doi.org/10.1016/j.ins.2017.05.028

    Article  Google Scholar 

  26. Bandara MN, Ranasinghe RM, Arachchi RWM, Somathilaka CG, Perera S, Wimalasuriya DC (2015) A complex event processing toolkit for detecting technical chart patterns. In: (2015) IEEE international parallel and distributed processing symposium workshop. IEEE. https://doi.org/10.1109/ipdpsw.2015.83

  27. Liu JN, Kwong RW (2007) Automatic extraction and identification of chart patterns towards financial forecast. Appl Soft Comput 7(4):1197–1208. https://doi.org/10.1016/j.asoc.2006.01.007

    Article  Google Scholar 

  28. Canelas A, Neves R, Horta N (2012) A new SAX-GA methodology applied to investment strategies optimization. In: Proceedings of the 14th annual conference on genetic and evolutionary computation (GECCO ’12). ACM Press, pp 1055–1062. https://doi.org/10.1145/2330163.2330310

  29. Canelas A, Neves R, Horta N (2013a) A SAX-GA approach to evolve investment strategies on financial markets based on pattern discovery techniques. Expert Syst Appl 40(5):1579–1590. https://doi.org/10.1016/j.eswa.2012.09.002

    Article  Google Scholar 

  30. Canelas A, Neves R, Horta N (2013b) Multi-dimensional pattern discovery in financial time series using SAX-GA with extended robustness. In: Proceedings of the 15th annual conference companion on genetic and evolutionary computation (GECCO ’13). ACM Press, pp 179–180. https://doi.org/10.1145/2464576.2464664

  31. Parracho P, Neves R, Horta N, (2011) Trading with optimized uptrend and downtrend pattern templates using a genetic algorithm kernel. In: (2011) IEEE congress of evolutionary computation (CEC). IEEE. https://doi.org/10.1109/cec.2011.5949846

  32. Wu YP, Wu KP, Lee HM (2012) Stock trend prediction by sequential chart pattern via k-means and AprioriAll algorithm. In: 2012 Conference on technologies and applications of artificial intelligence. IEEE. https://doi.org/10.1109/taai.2012.42

  33. Lee Y, Tiong LCO, Ngo DCL (2014) Hidden Markov models for Forex trends prediction. In: 2014 International conference on information science & applications (ICISA). IEEE. https://doi.org/10.1109/icisa.2014.6847408

  34. Tiong LCO, Ngo DCL, Lee Y (2013) Forex trading prediction using linear regression line, artificial neural network and dynamic time warping algorithms. In: Proceedings of the fourth international conference on computing and informatics (ICOCI ’13), pp 71–77

  35. Tiong LCO, Ngo DCL, Lee Y (2016) Prediction of forex trend movement using linear regression line, two-stage of multi-layer perceptron and dynamic time warping algorithms. J ICT 15(2):117–140

    Google Scholar 

  36. Park CH, Irwin SH (2007) What do we know about the profitability of technical analysis? J Econ Surv 21(4):786–826. https://doi.org/10.1111/j.1467-6419.2007.00519.x

    Article  Google Scholar 

  37. Forex Indicators (n.d.) Forex indicators: the best guide to indicator’s world. http://forex-indicators.net/list

  38. Alamili M (2011) Exchange rate prediction using support vector machines. Ph.D. thesis, Delft University of Technology

  39. Emam A (2008) Optimal artificial neural network topology for foreign exchange forecasting. In: Proceedings of the 46th annual southeast regional conference on XX-ACM-SE 46. ACM Press. https://doi.org/10.1145/1593105.1593121

  40. Ghazali R, Hussain A, El-Deredy W (2006) Application of ridge polynomial neural networks to financial time series prediction. In: The 2006 IEEE international joint conference on neural network proceedings. IEEE, pp 913–920. https://doi.org/10.1109/ijcnn.2006.246783

  41. Yao J, Tan CL (2000) A case study on using neural networks to perform technical forecasting of Forex. Neurocomputing 34(1–4):79–98. https://doi.org/10.1016/s0925-2312(00)00300-3

    Article  MATH  Google Scholar 

  42. Rehman M, Khan GM, Mahmud SA (2014) Foreign currency exchange rates prediction using CGP and recurrent neural network. IERI Procedia 10:239–244. https://doi.org/10.1016/j.ieri.2014.09.083

    Article  Google Scholar 

  43. Zafeiriou T, Kalles D (2013) Short-term trend prediction of foreign exchange rates with a neural-network based ensemble of financial technical indicators. Int J Artif Intell Tools 22(3):1350016. https://doi.org/10.1142/S0218213013500164

    Article  Google Scholar 

  44. Yao S, Pasquier M, Quek C (2007) A foreign exchange portfolio management mechanism based on fuzzy neural networks. In: 2007 IEEE congress on evolutionary computation. IEEE, pp 2576–2583. https://doi.org/10.1109/cec.2007.4424795

  45. Kato D, Yata N, Nagao T (2010) Evolutionary trend prediction using plural technical indicators for foreign exchange transaction. In: Proceedings of SICE annual conference 2010. IEEE, pp 1170–1175

  46. Slany K (2009) Towards the automatic evolutionary prediction of the FOREX market behaviour. In: 2009 International conference on adaptive and intelligent systems. IEEE, pp 141–145. https://doi.org/10.1109/ICAIS.2009.31

  47. De Brito RF, Oliveira AL (2012a) A foreign exchange market trading system by combining GHSOM and SVR. In: The 2012 international joint conference on neural networks (IJCNN). IEEE, pp 1–7. https://doi.org/10.1109/ijcnn.2012.6252496

  48. De Brito RF, Oliveira AL (2012b) Comparative study of FOREX trading systems built with SVR+GHSOM and genetic algorithms optimization of technical indicators. In: 2012 IEEE 24th international conference on tools with artificial intelligence, vol 1. IEEE, pp 351–358. https://doi.org/10.1109/ictai.2012.55

  49. De Brito RF, Oliveira AL (2014) Sliding window-based analysis of multiple foreign exchange trading systems by using soft computing techniques. In: 2014 International joint conference on neural networks (IJCNN). IEEE, pp 4251–4258. https://doi.org/10.1109/IJCNN.2014.6889874

  50. Hsu SH, Hsieh JPA, Chih TC, Hsu KC (2009) A two-stage architecture for stock price forecasting by integrating self-organizing map and support vector regression. Expert Syst Appl 36(4):7947–7951. https://doi.org/10.1016/j.eswa.2008.10.065

    Article  Google Scholar 

  51. Bahramy F, Crone SF (2013) Forecasting foreign exchange rates using support vector regression. In: 2013 IEEE conference on computational intelligence for financial engineering & economics (CIFEr). IEEE, pp 34–41. https://doi.org/10.1109/cifer.2013.6611694

  52. Baasher A, Fakhr MW (2011) FOREX daily trend prediction using machine learning techniques. In: 21st International conference on computer of theory and applications (ICCTA ’11) (NOVEMBER)

  53. Kirkpatrick CD, Dahlquist J (2010) Technical analysis. The complete resource for financial market technicians (2nd edn). Pearson Education, Inc. arXiv:1011.1669v3

  54. Ito T, Hashimoto Y (2006) Intraday seasonality in activities of the foreign exchange markets: evidence from the electronic broking system. J Jpn Int Econ 20(4):637–664. https://doi.org/10.1016/j.jjie.2006.06.005

    Article  Google Scholar 

  55. HistData (n.d.) HistData. https://www.histdata.com/

  56. Oanda (n.d.) OANDA trading platform. https://www.oanda.com/

  57. Yong YL, Ngo DCL, Lee Y (2015) Technical indicators for Forex forecasting: a preliminary study. In: Tan Y, Shi Y, Buarque F, Gelbukh A, Das S, Engelbrecht A (eds) Advances in swarm and computational intelligence, vol 9142. Springer, Berlin, pp 87–97

    Chapter  Google Scholar 

  58. Giorgino T (2009) Computing and visualizing dynamic time warping alignments in R: the dtw package. J Stat Softw 31(7):1–24. http://www.jstatsoft.org/v31/i07/

  59. Tormene P, Giorgino T, Quaglini S, Stefanelli M (2008) Matching incomplete time series with dynamic time warping: an algorithm and an application to post-stroke rehabilitation. Artif Intell Med 45(1):11–34. https://doi.org/10.1016/j.artmed.2008.11.007

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yoke Leng Yong.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Yong, Y.L., Lee, Y. & Ngo, D.C.L. Adaptive detection of FOREX repetitive chart patterns. Pattern Anal Applic 23, 1277–1292 (2020). https://doi.org/10.1007/s10044-019-00862-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10044-019-00862-8

Keywords

Navigation