Using ICA and Spectral Clustering for Regime-Aware MQL5 Trading
Summary
The article develops a pipeline for identifying market regimes from lagged moving-average features and applying the results in an MQL5 trading system. It uses independent component analysis (ICA) to reduce feature noise, time-series cross-validation to select parameters, and spectral clustering to identify regimes. Because the clustering model is not directly supported by the described ONNX conversion route, the author trains a surrogate classifier to predict cluster membership. The resulting regime estimates inform position sizing and stop width.
The article reports that its revised system improved Sharpe ratio, increased trade frequency, and reduced selected loss statistics in backtests. It also provides exported ONNX models, an MQL5 application, and analysis artifacts intended to make the workflow reproducible. The evidence is limited by potential regime non-stationarity and spectral clustering’s sensitivity to initialization; cluster behavior and strategy performance may change over time or with different settings. The reported backtest outcomes therefore do not establish that the approach will generalize.
Key ideas
- Lagged moving-average features are transformed with ICA before regime analysis.
- Time-series cross-validation is used to choose ICA settings and cluster counts.
- A surrogate classifier makes spectral-cluster assignments usable in the ONNX deployment path described.
- Cluster return and risk estimates guide position sizing and stop width.
- Non-stationarity and sensitivity to clustering initialization limit confidence in the backtest results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.