Enhancing Forex market trend analysis with bidirectional long short-term memory and transformer attention network
摘要
Through the integration of attention-based techniques, the research aims to improve the accuracy of Forex market trend analysis using a two-stage forecasting approach with bidirectional long short-term memory (Bi-LSTM) and an attention-based transformer network by highlighting the importance of feature engineering. The study enriches currency pair datasets with diverse technical indicators, utilizing Bi-LSTM for closing price forecasts. Transitioning to trend analysis, key indicators like higher-highs (HHs), higher-lows/lower-highs (HLs/LHs), and lower-lows (LLs) become instrumental in identifying uptrends and downtrends, serving as class labels for the transformer network. The approach deploys an attention block and feed-forward block in the transformer encoder, with hyperparameters optimized using the flexible fitness-dependent optimizer (FFDO) algorithm. The multi-head attention-based transformer (MABT) addresses Forex market intricacies, allowing simultaneous attention to different input sequence parts. Optimized through FFDO-MABT highlights the significance of hyperparameter analysis using genetic algorithm (GA), particle swarm optimization (PSO), and differential evolution (DE) optimization strategies. Performance metrics consistently show superior results, particularly at the longest horizon of 144 days. Reliability is evident in annual trend analyses for USD/EUR, AUD/JPY, and CHF/INR, highlighting FFDO-MABT's consistent and balanced predictive abilities. The manuscript underscores FFDO-MABT's versatility as a valuable tool for financial scenarios, validated through statistical analysis and computational efficiency.