A Comparative Analysis to Identify and Rank Superior Technical Analysis Tools Using Machine Learning Algorithms to Forecast Prices in the Forex Market
Subject Areas : Artificial Intelligence
1 - Department of Industrial Engineering, Ta.C., Islamic Azad University, Tabriz, Iran.
Keywords: Forex, Stock Price Prediction, Machine Learning, Technical Analysis, Feature Reduction,
Abstract :
Given the significance of stock prices in most companies' investment strategies, accurately forecasting them amidst high volatility is crucial. Stock markets are renowned for their complex, turbulent, and opaque nature within the global financial landscape. Researchers have consistently sought to develop methods for predicting stock prices with greater accuracy and lower error rates. Market forecasting is primarily undertaken using technical and fundamental analysis. Technical analysis involves evaluating and forecasting market price trends using numerous indicators available on online platforms provided by exchanges or brokers. The abundance of these indicators often leads to confusion and challenges in selecting the most suitable ones for technical analysis. This research aims to identify the most effective technical analysis indicators within the Forex market and to compare the performance of various machine learning methods in predicting price trends in the Forex market. To this extent, daily data for two major currency pairs (EUR/USD and USD/JPY) and two minor pairs (CAD/JPY and EUR/CHF) were collected over 15 months. Thirty commonly used technical indicators were selected and ranked using the ReliefF feature selection method to identify the top ten indicators. The outputs from this stage were then modeled using six machine learning algorithms: artificial neural networks, decision trees, random forests, support vector machines, K-nearest neighbors, linear regression, and logistic regression, implemented in MATLAB. The analysis results indicate that the artificial neural network outperformed the other machine learning methods, achieving the lowest MAPE and RMSE and providing the most accurate predictions.
Lale Sajjadi, S.M., Vakili, H., Ebrahimi, B. (2019). “Designing Automatic Re-balancing Model Using Technical Analysis Concept of Divergence,” Financial Knowledge of Securities Analysis, 41, 45-56.
Chen, Y., Liu, J., Gao, Y., Wei, H., Li, H., Zhang, G, Wei, H. (2023). “A new stock market analysis method based on evidential reasoning and hierarchical belief rule base to support investment decision-making”. Sec. Quantitative Psychology and Measurement, 11.
Dolou, M., Heydari, T. (2018). “Stock index prediction using a combination of artificial neural networks and meta-heuristic models of harmony search and genetic algorithm”, Financial Economics, 11(40), 1-23. (in Persian)
Kim, E., Kim, W., & Lee, Y. (2003). “Combination of multiple classifiers for the customer's purchase behavior prediction.” Decision Support Systems, 34 (2), 167-175.
Enke, D., Thawornwong, S. (2005). “The use of data mining and neural networks for forecasting stock market returns”. Expert Systems with Applications, 29 (4), 927-940.
Arashim, M., Rounaghi M. M. (2022). “Analysis of market efficiency and fractal feature of NASDAQ stock exchange: time series modeling and forecasting of stock index using ARMA-GARCH model.” Future Busyness. Journal. 8, 1–12.
Al-Ani, Y.A.A., and Zubaidi, F.N.M. (2021). “Statistical analysis of the anticipated risks of the Iraqi stock market”. Int. Eng. Manag. Sys. 20, 702–711.
He, G., Zhu, S., and Gu, H. (2020). “The nonlinear relationship between investor sentiment, stock return, and volatility”. Discrete Dyn. Nat. Soc. 2020:5454625.
Salman, A., Ali, Q. (2021). “Covid-19 and its impact on the stock market in GCC”. J. Sustain. Finance Invest. 2021:1944036.
Hasbrouck, J., Levich, R. (2021). “Network structure and pricing in the FX market”. Journal of Financial Economics, 141(2), 705-729.
Mitchell, T. (1997). Machine Learning. 1st Edition. McGraw-Hill, New York.
Zhang, L. (2021). “Pair Trading with Machine Learning Strategy in China Stock Market”. In 2021 2nd International Conference on Artificial Intelligence and Information Systems (ICAIIS 2021). Association for Computing Machinery, New York, NY, USA, Article 324, 1–6. https://doi.org/10.1145/3469213.3471353.
Tsai, C., Chen, Y.. (2019). “The Optimal Combination of Feature Selection and Data Discretization: An Empirical Study”. Information Sciences. 505. 10.1016/j.ins.2019.07.091.
Alpaiden, E. (2004). Introduction to machine learning. First Edition. The MIT Press, Cambridge, Massachusetts, London, England.
Urbanowicz, R., Meeker, M, Cava, W., Olson, R., & Moore, J.(2018). “Relief-based feature selection: Introduction and review”. Journal of Biomedical Informatics, 85, 189-203.
Miryazdi, S.H., Habibi Lashkari, Z. (2013). “Technical analysis of Forex by MACD Indicator”, International Journal of Humanities and Management Sciences, 1(2).
Sadeghi, A., Daneshvarm, A., Madanchi, M. (2021). “Combined ensemble multi-class SVM and fuzzy NSGA-II for trend”. Expert Systems With Applications, 185.
Kurani, A., Doshi, P., Vakharia, A., Shah, M. A. (2021). “Comprehensive Comparative Study of Artificial Neural Network (ANN) and Support Vector Machines (SVM) on Stock Forecasting”. Annals of Data Science. 10, 183-208.
Ahmad, S., Ul Hassan, S., Aljohani, N., Nawaz, R. (2022).” FLF-LSTM: A novel prediction system using Forex Loss Function”. Applied Soft Computing, 97(B).
Luciana, A., Cecilia, E., Ame, F. (2022). “Forex Sentiment Analysis with Python”. International Journal of Advanced Research in Economics and Finance, 46-55.
Farhangdoost, M. (2023). “Comparison of stock market analysis methods and forex market analysis methods”. International Journal of Business Management and Entrepreneurship, 6(20), 321-328. (in Persian)
Caporale, G.M., Plastun, A. (2023). "Seven Pitfalls of Technical Analysis. CESifo Working Paper No. 10213, Available at SSRN: https://ssrn.com/abstract=4329472.
Ayitey, M., Appiahene, P., Appiah, O. (2023). “Forex market forecasting using machine learning: Systematic Literature Review and meta-analysis”. Journal of Big Data. 10(9).
Chong, J., Sin, C. (2023). “An Investigation into Forex Market Efficiency Based on Detrended Fluctuation Analysis”, Gyancity Journal of Engineering and Technology, 9(2), 1-17.
Ghanem, S., Harasheh, M., Sbaih, Q., Ajmal, T. K. (2024). “The predictability of technical analysis in foreign exchange market using forward return: evidence from developed and emerging currencies”. Cogent Business & Management, 11(1).
Ikughur, J.A., Udoumoh, E.F., Odunewu, E.A. (2025). “The Impact of Fixed and Floating Foreign Exchange Rates on Inflation Rates in Nigeria”. Statistical Evidence. 5, 30-37.
Wangchailert1, P., Paireekreng, W. (2025). “Enhancing FOREX Market Predictions: A Comparative Study of Candlestick Patterns and the MIDDAM Patterns. ECTI”. Transactions on Computer and Information Technology, 19(1), 121-134.
Shin, K.S., Lee, T.S., Kim, H.J. (2005). “An Application of Support Vector Machines in Bankruptcy Prediction Model”. Expert Systems and Applications, 28, 127-135.
Chen, K.Y., & Ho, C.H. (2005). “An improved support vector regression modeling for Taiwan Stock Exchange market-weighted index forecasting”. International Conference on Neural Networks and Brain. Beijing, China.
Patel, J., Shah, S., Thakkar, P., & Kotecha, K. (2015). “Predicting stock and stock price index movement using trend-deterministic data preparation and machine learning techniques”. Expert Systems with Applications, 42 (1), 259-268.
Dorodi, D., & Ebrahimi, S. B. (2017). “Presenting a new hybrid method for predicting the Stock Exchange price index”. Financial Research Journal, 18(4), 612-632.
Fakhari, H., Valipour Khatir, M., & Mousavi, M. (2017). “Investigating Performance of Bayesian and Levenberg-Marquardt Neural Network in Comparison Classical Models in Stock Price Forecasting”. Financial Research Journal, 19(2), 229-318.
Nevasalmi, L. (2020). “Forecasting multinomial stock returns using machine learning methods”. The Journal of Finance and Data Science, 6, 86-106.
Alavi, S. and Abootalebi, S. (2021). “Evaluating banks' performance in handling customer complaints during the COVID-19 outbreak via DEA and based on ISO-10002:2018”. Research in Production and Operations Management, 12(4), 1-20. (in Persian)
Sadeghi, A., Daneshvarm, A., Madanchi, M. (2021). “Developing an intelligent method based on fuzzy technical indicators for predicting and trading the Euro-Dollar exchange rate”. Financial Engineering and Securities Management, 45, 177-198. (in Persian)
Amar, S., Sudiarso, A., and Herliansyah, M.K. (2020). “The Accuracy Measurement of Stock Price Numerical Prediction”. Journal of Physics: Conf. Series. 1569 032027.