Skip to content
K

Methodology — Pairwise Correlation Tools

Transparency is a feature. This page explains what these correlation tools measure and why — in plain terms. The precise formulas and numeric conventions are documented in our internal methodology; the summary here is deliberate, not an omission.

These are three lenses on the same question: how do two series move together? The first is the Pearson correlation, which captures straight-line co-movement. The second is the Spearman rank correlation, which captures any consistent up-together / down-together relationship even when it is not a straight line. The third is a trailing-window Pearson series, which shows how the relationship drifts over time. All three compare two series of equal length, lined up observation by observation; if the two do not cover the same points they are rejected rather than guessed at.

Pearson correlation to benchmark

Pearson correlation measures how tightly two series rise and fall together in a straight-line sense. It lives between -1 and +1: a value near +1 means they move up and down almost in lockstep, near -1 means they move in opposite directions, and near 0 means there is no linear relationship. It cares only about the pattern of co-movement, not the scale — multiplying or shifting one series does not change the number (though flipping its sign does). A correlation needs at least two paired observations, and if either series is perfectly flat there is no variation to relate, so the result is undefined.

Spearman rank correlation

Spearman correlation asks the same up-together / down-together question but works on the ranks (the order) of the values rather than the values themselves. This makes it a measure of any monotone relationship: as long as one series consistently rises when the other does, Spearman reports a strong positive number even if the underlying curve bends — a case where Pearson would fall short of a perfect score. It also lies between -1 and +1. When values tie, they share an averaged rank. Like Pearson, it needs at least two observations, and a completely constant series (whose values all tie) has no order to compare, so the result is undefined.

Rolling correlation (trailing window)

The rolling correlation reports the Pearson correlation computed over a trailing window of recent observations, one value per period, so you can chart how the co-movement strengthens or weakens over time. The output is lined up one-for-one with the inputs, and the earliest periods before a full window has accumulated are left blank rather than filled with a partial-window figure that would mean something different. The most recent value matches the plain Pearson correlation of the last window. If a particular window happens to contain a flat stretch in either series, only that single point is left blank and the rest of the series is still reported. The window must span at least two observations and cannot be longer than the series itself.