You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: Symbolic Fourier Approximation in MQL5: Benchmarking SFA Against SAX.
We implement Symbolic Fourier Approximation in MQL5 and compare it to SAX under a shared harness on identical price windows. SFA keeps low‑frequency Fourier coefficients and learns per‑position bins (MCB), with a proven, sound lower bound. The measurements show how the same bit budget behaves under different splits of word length and alphabet, and give a practical rule for choosing settings for your symbol.
Turning a window of prices into a short string of letters is an old and useful trick. Once a 48-bar window is a word like dbccbdab, you can index it, count it, hash it, and compare millions of windows without touching the raw prices again. Symbolic Aggregate approXimation (SAX) does exactly this, well enough that it has become the default answer whenever somebody wants to symbolize a price series.
Every symbolic representation spends a fixed budget: a word of w letters over an alphabet of a symbols carries w · log2(a) bits per word, plus, for a representation that learns its bin table, that table stored once. Which raises a question almost nobody asks: are those bits being spent well? Most implementations pick w and a by feel, run with them, and never find out.
To find out, this article builds Symbolic Fourier Approximation (SFA), which keeps a window's low-frequency Fourier coefficients instead of its time-domain averages and learns a separate quantization table for every position. We implement it in pure MQL5, verify it against its defining identities to machine precision, and then put it head to head with SAX under a measurement harness that reports four numbers for any (w, a) you care to try.
Readers of the BOSS article have met this Fourier front end before, but BOSS classifies histograms of words and never needed a distance bound. This article adds what turns the front end into a pruned similarity search: a sound lower bound with its factor of two, an ablation that measures what the learned bins are worth, and a harness that runs SAX and SFA over identical windows.
Author: Muhammad Minhas Qamar