Discussing the article: "From Cloud to Complex: The Vietoris-Rips Filtration in MQL5"

 

Check out the new article: From Cloud to Complex: The Vietoris-Rips Filtration in MQL5.

We turn a price-embedded point cloud into a Vietoris–Rips filtration and its boundary matrix. The article enumerates vertices, edges, and triangles with filtration values, sorts them in entry order, and builds O(1) vertex/edge lookups. You get MQL5 classes CTDARips and CTDABoundary and a sparse Z/2 boundary suitable for the next-step persistence reduction.

The previous article produced two concrete geometric objects: a Takens-embedded point cloud and its full pairwise distance matrix. Those are necessary but not sufficient for answering the topological questions we care about (Do clusters exist? Is there a persistent loop?). What we need next is a reproducible, computable topological object that records when simplices appear as we relax a scale parameter ε: the Vietoris–Rips filtration (and the boundary relations that let us compute homology).

Concretely, the task addressed here is implementation-focused: given N embedded points and a cutoff maxEpsilon, enumerate all simplices up to maxDim ≤ 2, assign each simplex its filtration value (vertex = 0, edge = distance between endpoints, triangle = maximum of its three edge lengths), and produce two artifacts suitable for reduction. The implementation must enforce the key invariants that the reduction step requires: simplices are sorted by filtration (ties broken by lower dimension so faces appear before cofaces), vertex and edge lookups provide O(1) mapping to global indices, and each boundary column is stored in ascending order so its pivot can be read without extra work. Practical constraints (edges O(N^2), triangles O(N^3)) motivate capping dimension and using memory-for-speed lookup tables.


Three panels of the same point cloud: isolated points, then a ring of edges forming a loop, then the loop filled with triangles

Fig. 1. One point cloud at three scales. At a small epsilon the points are isolated. At a medium epsilon a ring of edges closes a loop. At a large epsilon triangles fill the loop and it disappears.

The figure above is the whole article in one picture. It shows a single point cloud three times, at three values of a scale parameter we call epsilon. Nothing about the points changes between panels. Only the rule for connecting them changes.

On the left, epsilon is small. No two points are within range, so the cloud is just isolated dots. There are twelve connected components and no loops. In the middle, epsilon is larger. Each point now reaches its neighbors, and the edges close into a ring. There is one connected component and one loop. On the right, epsilon is larger still. Points across the ring now connect, triangles fill the interior, and the loop is gone. One connected component, no loops.

The loop in the middle panel is the signal. It was born when the ring closed and it died when the interior filled. The range of epsilon over which it stayed alive is its persistence. A long-lived loop is a real feature of the data. A loop that is born and dies almost immediately is noise. That is what this article builds the machinery to measure. The rest explains how.

Author: Hammad Dilber