A Hybrid Pattern Extraction and Confidence-Weighted Volume Framework for Machine Learning-Based Forex Price Forecasting

Authors

    Maysam Yazdanpanahi * Department of Computer Engineering, Shahrood University of Technology, Shahrood, Iran meysamyazdanpanahi@shahroodut.ac.ir
    Morteza Zahedi Department of Computer Engineering, Shahrood University of Technology, Shahrood, Iran
    Mohammad Mehdi Hosseini Department of Computer Engineering, Sha.C., Islamic Azad University, Shahrood, Iran

Keywords:

Feature Engineering, Binary-Coded Patterns, Algorithmic trading, Forex Price Forecasting, Risk Management

Abstract

Since its inception, the Forex market has attracted various market players, including central banks, financial institutions, and even academic researchers, due to its high volatility and potential profitability following the technical analysis saying that "history tends to repeat itself", RWBCPE captures the historical patterns to anticipate future changes (up or down) within certain possible boundaries to avoid signals that lack confidence thresholds. RWBCPE underwent testing on the EUR/USD currency pair in the context of three different simple machine learning models: Random Forests, Support Vector Machines, and Long Short-Term Memory networks to demonstrate its strength and efficiency, even using simple, conventional machine learning and deep learning models. The framework achieved a higher accuracy than the traditional technical indicators, such as RSI and MACD. To evaluate the practical feasibility of the framework, we conducted a 25-year training set from 2000 to 2025 and a 1-year backtest from 2025 to 2026 with an initial balance of $10,000. The RWBCPE-driven strategy achieved 65.96% accuracy and 67.29% precision, growing the account balance to $34,844.75. The system also recorded a profit ratio of 2.17 and a maximum drawdown of 4.6%, demonstrating strong predictive performance and low-risk trading through confidence-weighted position size.

 

Downloads

Download data is not yet available.

References

A. Shavandi and M. Khedmati, "A multi-agent deep reinforcement learning framework for algorithmic trading in financial markets," Expert Syst. Appl., vol. 208, p. 118124, 2022, doi: 10.1016/j.eswa.2022.118124.

B. M. Henrique, V. A. Sobreiro, and H. Kimura, "Literature review: Machine learning techniques applied to financial market prediction," Expert Syst. Appl., vol. 124, pp. 226-251, 2019, doi: 10.1016/j.eswa.2019.01.012.

A. F. Kamara, E. Chen, and Z. Pan, "An ensemble of a boosted hybrid of deep learning models and technical analysis for forecasting stock prices," Inf. Sci. (N. Y). vol. 594, pp. 1-19, 2022, doi: 10.1016/j.ins.2022.02.015.

B. Narmandakh, Y. Zhang, Z. Li, and P. Anderson, "A 2D-CNN-LSTM-Based Deep Learning Model for Forex Price Prediction using Lag Features," Comput. Econ., 2025, doi: 10.1007/s10614-025-11101-0.

P. Juszczuk and L. Kruś, "Soft multicriteria computing supporting decisions on the Forex market," Appl. Soft Comput., vol. 96, p. 106654, 2020, doi: 10.1016/j.asoc.2020.106654.

Y. Cheng and J. Su, "Economic Data Forecasting Through Interval Data Analysis," International Journal on Artificial Intelligence Tools, vol. 33, no. 07, p. 2440002, 2024, doi: 10.1142/S0218213024400025.

X. Zhong and D. Enke, "Forecasting daily stock market return using dimensionality reduction," Expert Syst. Appl., vol. 67, pp. 126-139, 2017, doi: 10.1016/j.eswa.2016.09.027.

O. Bustos and A. Pomares-Quimbaya, "Stock market movement forecast: A Systematic review," Expert Syst. Appl., vol. 156, p. 113464, 2020, doi: 10.1016/j.eswa.2020.113464.

K. K. Yun, S. W. Yoon, and D. Won, "Prediction of stock price direction using a hybrid GA-XGBoost algorithm with a three-stage feature engineering process," Expert Syst. Appl., vol. 186, p. 115716, 2021, doi: 10.1016/j.eswa.2021.115716.

W. Jiang, "Applications of deep learning in stock market prediction: Recent progress," Expert Syst. Appl., vol. 184, p. 115537, 2021, doi: 10.1016/j.eswa.2021.115537.

D. P. Neghab, M. Cevik, M. I. M. Wahab, and A. Basar, "Explaining Exchange Rate Forecasts with Macroeconomic Fundamentals Using Interpretive Machine Learning," Comput. Econ., 2024, doi: 10.1007/s10614-024-10617-1.

K. Shubham, V. Tiwari, and K. S. Patel, "Predictive Learning Methods to Price European Options Using Ensemble Model and Multi-asset Data," International Journal on Artificial Intelligence Tools, vol. 32, no. 07, p. 2350034, 2023, doi: 10.1142/S0218213023500343.

T. Yao and X. Liu, "Financial Time Series Forecasting: A Combinatorial Forecasting Model Based on STOA Optimizing VMD," International Journal on Artificial Intelligence Tools, vol. 31, no. 08, p. 2250042, 2022, doi: 10.1142/S0218213022500427.

J. Chen, X. Li, and J. Du, "Analysis of Frequent Trading Effects of Various Machine Learning Models," Comput. Econ., 2024, doi: 10.1007/s10614-024-10611-7.

Y. Guo, C. Li, X. Wang, and Y. Duan, "Gold Price Prediction Using Two-layer Decomposition and XGboost Optimized by the Whale Optimization Algorithm," Comput. Econ., 2024, doi: 10.1007/s10614-024-10736-9.

E. González-Núñez, L. A. Trejo, and M. Kampouridis, "Expanding a machine learning class towards its application to the stock market forecast," Applied Intelligence, vol. 55, no. 1, p. 21, 2024, doi: 10.1007/s10489-024-06018-4.

J. C. Garza Sepúlveda, F. Lopez-Irarragorri, and S. E. Schaeffer, "Forecasting Forex Trend Indicators with Fuzzy Rough Sets," Comput. Econ., vol. 62, no. 1, pp. 229-287, 2023, doi: 10.1007/s10614-022-10281-3.

K. Mansurov, A. Semenov, D. Grigoriev, A. Radionov, and R. Ibragimov, "Cryptocurrency Exchange Simulation," Comput. Econ., vol. 64, no. 5, pp. 2585-2603, 2024, doi: 10.1007/s10614-023-10495-z.

W. Sun, M. Li, X. H. Chen, and Y. Wang, "Enhancing exchange rate prediction and risk management under uncertainty shocks: an AI-driven ensemble prediction model based on metaheuristic optimization," Ann. Oper. Res., 2024, doi: 10.1007/s10479-024-06319-4.

J. B. Chakole, M. S. Kolhe, G. D. Mahapurush, A. Yadav, and M. P. Kurhekar, "A Q-learning agent for automated trading in equity stock markets," Expert Syst. Appl., vol. 163, p. 113761, 2021, doi: 10.1016/j.eswa.2020.113761.

M. Hernes, J. Korczak, D. Krol, M. Pondel, and J. Becker, "Multi-agent platform to support trading decisions in the FOREX market," Applied Intelligence, vol. 54, no. 22, pp. 11690-11708, 2024, doi: 10.1007/s10489-024-05770-x.

Y. Zhao and G. Yang, "Deep Learning-based Integrated Framework for stock price movement prediction," Appl. Soft Comput., vol. 133, p. 109921, 2023, doi: 10.1016/j.asoc.2022.109921.

S. Mignot and F. Westerhoff, "Explaining the Stylized Facts of Foreign Exchange Markets with a Simple Agent-based Version of Paul de Grauwe's Chaotic Exchange Rate Model," Comput. Econ., 2024, doi: 10.1007/s10614-024-10546-z.

Y. Ma, R. Mao, Q. Lin, P. Wu, and E. Cambria, "Multi-source aggregated classification for stock price movement prediction," Information Fusion, vol. 91, pp. 515-528, 2023, doi: 10.1016/j.inffus.2022.10.025.

Y. Wu, Z. Fu, X. Liu, and Y. Bing, "A hybrid stock market prediction model based on GNG and reinforcement learning," Expert Syst. Appl., vol. 228, p. 120474, 2023, doi: 10.1016/j.eswa.2023.120474.

C. H. Wang, J. Yuan, Y. Zeng, and S. Lin, "A deep learning integrated framework for predicting stock index price and fluctuation via singular spectrum analysis and particle swarm optimization," Applied Intelligence, vol. 54, no. 2, pp. 1770-1797, 2024, doi: 10.1007/s10489-024-05271-x.

Y. Huang, C. Zhou, K. Cui, and X. Lu, "A multi-agent reinforcement learning framework for optimizing financial trading strategies based on TimesNet," Expert Syst. Appl., vol. 237, p. 121502, 2024, doi: 10.1016/j.eswa.2023.121502.

Y. Han, J. Kim, and D. Enke, "A machine learning trading system for the stock market based on N-period Min-Max labeling using XGBoost," Expert Syst. Appl., vol. 211, p. 118581, 2023, doi: 10.1016/j.eswa.2022.118581.

M. M. Kumbure, C. Lohrmann, P. Luukka, and J. Porras, "Machine learning techniques and data for stock market forecasting: A literature review," Expert Syst. Appl., vol. 197, p. 116659, 2022, doi: 10.1016/j.eswa.2022.116659.

E. Drakonakis and S. Kotsios, "Stochastic Exchange Rate Dynamics, Intervention Dynamics and the Market Efficiency Hypothesis," Comput. Econ., 2024, doi: 10.1007/s10614-024-10581-w.

S. Carta, A. Ferreira, A. S. Podda, D. Reforgiato Recupero, and A. Sanna, "Multi-DQN: An ensemble of Deep Q-learning agents for stock market forecasting," Expert Syst. Appl., vol. 164, p. 113820, 2021, doi: 10.1016/j.eswa.2020.113820.

N. Sukma and C. S. Namahoot, "Enhancing Trading Strategies: A Multi-indicator Analysis for Profitable Algorithmic Trading," Comput. Econ., vol. 65, no. 6, pp. 3807-3840, 2025, doi: 10.1007/s10614-024-10669-3.

M. Ayitey Junior, P. Appiahene, O. Appiah, and C. N. Bombie, "Forex market forecasting using machine learning: systematic literature review and meta-analysis," J. Big Data, vol. 10, no. 1, p. 9, 2023, doi: 10.1186/s40537-022-00676-2.

Y. F. Chen and S. H. Huang, "Sentiment-influenced trading system based on multimodal deep reinforcement learning," Appl. Soft Comput., vol. 112, p. 107788, 2021, doi: 10.1016/j.asoc.2021.107788.

R. Naranjo, J. Arroyo, and M. Santos, "Fuzzy modeling of stock trading with fuzzy candlesticks," Expert Syst. Appl., vol. 93, pp. 15-27, 2018, doi: 10.1016/j.eswa.2017.10.002.

A. Sadeghi, A. Daneshvar, and M. M. Zaj, "Combined ensemble multi-class SVM and fuzzy NSGA-II for trend forecasting and trading in forex markets," Expert Syst. Appl., vol. 185, p. 115566, 2021, doi: 10.1016/j.eswa.2021.115566.

M. G. Papatsimpas and K. E. Parsopoulos, "Hybrid decomposition and deep learning approach for data-driven FOREX forecasting optimization," Journal of Global Optimization, 2025, doi: 10.1007/s10898-025-01505-5.

L. C. O. Tiong, D. C. L. Ngo, and Y. Lee, "Forex prediction engine: framework, modelling techniques and implementations," International Journal of Computational Science and Engineering, vol. 13, no. 4, pp. 364-377, 2016, doi: 10.1504/IJCSE.2016.080213.

L. K. Felizardo and et al., "Outperforming algorithmic trading reinforcement learning systems: A supervised approach to the cryptocurrency market," Expert Syst. Appl., vol. 202, p. 117259, 2022, doi: 10.1016/j.eswa.2022.117259.

B. Gülmez, "Stock price prediction with optimized deep LSTM network with artificial rabbits optimization algorithm," Expert Syst. Appl., vol. 227, p. 120346, 2023, doi: 10.1016/j.eswa.2023.120346.

S. Deng, C. Xiao, Y. Zhu, J. Peng, J. Li, and Z. Liu, "High-frequency direction forecasting and simulation trading of the crude oil futures using Ichimoku KinkoHyo and Fuzzy Rough Set," Expert Syst. Appl., vol. 215, p. 119326, 2023, doi: 10.1016/j.eswa.2022.119326.

F. Kamalov and I. Gurrib, "Machine learning-based forecasting of significant daily returns in foreign exchange markets," International Journal of Business Intelligence and Data Mining, vol. 21, p. 465, 2022, doi: 10.1504/IJBIDM.2022.126505.

A. Frattini, I. Bianchini, A. Garzonio, and L. Mercuri, "Financial technical indicator and algorithmic trading strategy based on machine learning and alternative data," Risks, vol. 10, no. 12, p. 225, 2022, doi: 10.3390/risks10120225.

C. D. Yi, "Nonparametric Realized Volatility and Jumps in High Frequency Foreign Exchange Rates with a Gumbel Distribution," Comput. Econ., 2025, doi: 10.1007/s10614-025-11153-2.

E. Koo and G. Kim, "A New Neural Network Approach for Predicting the Volatility of Stock Market," Comput. Econ., vol. 61, 2022, doi: 10.1007/s10614-022-10261-7.

S. Dash, P. K. Sahu, and D. Mishra, "Enhancing Forex market trend analysis with bidirectional long short-term memory and transformer attention network," J. Korean Stat. Soc., vol. 54, no. 3, pp. 825-857, 2025, doi: 10.1007/s42952-025-00322-6.

Downloads

Published

2025-04-01

Submitted

2026-07-05

Revised

2026-08-07

Accepted

2026-09-07

How to Cite

Yazdanpanahi, M., Zahedi, M., & Hosseini, M. M. . (2025). A Hybrid Pattern Extraction and Confidence-Weighted Volume Framework for Machine Learning-Based Forex Price Forecasting. Journal of Artificial Intelligence, Applications and Innovations, 2(2), 48-73. https://journalaiai.com/index.php/aiai/article/view/104

Similar Articles

1-10 of 32

You may also start an advanced similarity search for this article.