Research · Irregular series as trees of shards ·

Reading an irregular series as a few turning points

Real data arrives when events happen, not on a clock. Before looking for patterns, it helps to ask how few points are enough to keep the shape of a series.

A price series from a real market is irregular. Trades cluster around news and the open, and thin out at lunch and overnight. The usual first step is to resample onto a grid, one bar per minute or per day, and that step quietly decides what counts as structure: a move shorter than the bar disappears, and a quiet hour weighs as much as a busy one.

The figure below takes the other route. It keeps the samples where they fell and asks a simpler question: which of them does the shape of the series depend on?

syntheticTurning points of an irregular series. A seeded random walk on trading days, with days missing. Illustrative, not market data.Open on its own

What the figure does

The series is stored as a hierarchy of shapes. Each shape is a box with an open, a high, a low and a close, and it holds smaller shapes inside it, down to the single days. The file keeps the coarsest shapes first and the finer ones after them, so the first few kilobytes already draw the whole series, and the rest refines it.

The tolerance sets the smallest shape the chart draws, in pixels on screen. A shape smaller than that is drawn whole, as its open, high, low and close, and its inner shapes are not read. The counts above the chart show how many shapes are drawn, how deep in the hierarchy they reach and how much of the file has been read.

Zooming in (scroll) or panning (drag) reads only the finer shapes in view. The chart is the one the earnings lab draws price history with in its company cards.

What it does not do

This is an illustration, on a seeded random walk. The file was made offline and nothing is computed from the series in the page: it only chooses how much of a stored hierarchy to draw.