Skip to content
All library documents

Implementing CATCH Frequency-Domain Anomaly Detection in MQL5

Article MQL5 articles

Summary

This article continues an MQL5 implementation of CATCH, a neural approach to anomaly detection in multivariate time series. CATCH transforms series with the Fourier transform, divides the spectrum into frequency patches, and uses complex-valued convolutions and masked attention to model relationships among channels. It reconstructs the input series, with discrepancies between observed and reconstructed values serving as anomaly signals. The implementation discussion centers on organizing a complex-valued, multi-head masked-attention module and its supporting layers in MQL5 and OpenCL.

The article presents the framework as a way to detect isolated outliers as well as less obvious subsequence patterns and cross-channel dependencies. It says the authors implemented and trained a version and tested it on historical data, describing the results as promising while leaving further optimization open. The supplied excerpt does not give numerical performance or enough validation detail to assess trading usefulness. Anomaly detection here is a modeling method, not evidence of a profitable strategy.

Key ideas

  • CATCH uses Fourier transforms to represent multivariate time series in the frequency domain.
  • Frequency patching lets the model examine broad spectral structure and localized frequency features.
  • Masked attention models dependencies among channels while limiting attention to corresponding frequency patches.
  • The MQL5 implementation uses complex-valued convolution and multi-head masked attention components.
  • The article reports promising historical tests but leaves optimization and practical trading validation unresolved.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.