Foresight: forecasting by analogy

Find the past windows whose shape is nearest the latest window, and show what followed each of them. Foresight does not extrapolate a level: it lays the past continuations over the present as a fan, with a median and a band. Patternode matches shapes from its tree of segments; this sketch uses a plain shape distance on one synthetic series.

ForesightIllustrative, synthetic data
The latest window of the series, the nearest past windows laid over it, and what followed them drawn as a fan with a median and a band.
latest windowits turning pointsnearest past windows and what followedmedian25–75% and 10–90% bandswhat actually happened (when known)

The whole history. Drag to move now

The full series, with the latest window and the matched past windows highlighted. Dragging moves the moment treated as now.

Nearest analogues

Only data before now is used: a past window counts only if what followed it had finished before the latest window began. Shape distance compares the windows after removing level and scale, so a match can sit anywhere in the history. Move now back in time to see what actually happened beside the fan.