Discussing the article: "Self-Optimizing Expert Advisors in MQL5 (Part 21): Wavelet Denoising With Time-Lagged Independent Component Analysis (4)"

Check out the new article: Self-Optimizing Expert Advisors in MQL5 (Part 21): Wavelet Denoising With Time-Lagged Independent Component Analysis (4).

This article refines a multilayer market‑noise filter by sanitizing moving‑average inputs via Discrete Wavelet Transform and constructing a FastICA manifold on the denoised signals. We expand lag horizons (10–80 days), calibrate spectral clusters, and replace non-ONNX steps with surrogate models for MT5 deployment. The result is a reproducible MQL5 workflow that reduces forecasting error and integrates directly into an Expert Advisor.

This article addresses the engineering challenges traders face when building noise filters for algorithmic trading strategies. Inadequate filtering often results in poor performance during live trading execution. Our contribution through this discussion aims to help developers improve signal-to-noise ratios from an example case study of the EURUSD on the daily timeframe.

Independent Component Analysis (ICA) is a statistical method that separates mixed signals into a set of column vectors that are as statistically independent as possible. True signal and random noise are independent; hence, the ICA algorithm has the potential to denoise our time-lagged market data, giving us cleaner trading signals to work with.

In practice, we rarely employ the full ICA algorithm because it is computationally expensive. This approach searches for components that have minimum mutual information (MI), a metric that measures any form of dependence between variables. Minimizing MI ensures that our components are statistically independent. Unfortunately, MI is expensive to calculate, especially in high-dimensional cases.

This computational bottleneck is why most scientific libraries implement more efficient variants of the algorithm. Python libraries such as PICARD (Preconditioned Independent Component Analysis For Real Data) and scikit-learn (FastICA) bypass the costly task of calculating MI and instead work with intelligent approximations of independence. For this reason, we will use the scikit-learn implementation of FastICA. 

We will work with daily EURUSD exchange rates spanning almost 14 years. Our historical data will be partitioned into 3 equal sets for training, validation, and testing. All of our estimators, transformations, and clustering algorithms will only be fit on the training set; the remaining 2 sets will be reserved as out-of-sample test sets to help us approximate the effects of our proposed solution on a potentially representative sample of market behavior.

Author: Gamuchirai Zororo Ndawana