Discussing the article: "Implementing and Benchmarking Bag-of-SFA-Symbols (BOSS) Against Dynamic Time Warping (DTW)"
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: Implementing and Benchmarking Bag-of-SFA-Symbols (BOSS) Against Dynamic Time Warping (DTW).
This article implements BOSS from scratch in MQL5 and applies it to regime classification: SFA turns windows into words, bags record word frequencies, and an ensemble over window lengths votes on labels. We cover the encoding steps, the BOSS distance, training with auto-generated regime labels, and practical parameters. A BTCUSD benchmark versus DTW shows higher macro accuracy on clean data and markedly faster inference.
Elastic methods such as Dynamic Time Warping fix the alignment problem by stretching and compressing the time axis to find the best match, but they pay for it: they are computationally heavy, still sensitive to noise, and the warping path they produce is hard to interpret. Symbolic methods take a different route. Instead of comparing the raw numbers at all, they compress each window into a short string of letters and then compare the strings. The compression is where all the robustness comes from.
The pipeline we will build reduces a window to a word in three moves. Each move discards exactly the kind of variation we want to ignore:
The output is a word such as "cbad", four letters standing in for a window of prices. A whole stretch of market, run through a sliding window, becomes a bag of such words, and the frequency of each word is the market's vocabulary over that stretch. Two markets in the same regime speak the same dialect; two markets in different regimes do not. The rest of this article is the machinery that makes this precise, and the empirical test of whether it actually works on real data.
Author: Muhammad Minhas Qamar