Someone pastes me a correlation heatmap maybe once a week and asks whether two positions are a good hedge. The colors look confident. Gold and the dollar are dark blue at negative 0.6, so the story writes itself, one goes up when the other goes down, sleep easy. The problem is that the number on that grid is a single average taken over whatever window the tool happened to use, usually the full sample, and a full-sample average is the one thing that will lie to you with a straight face.
Correlation between two assets is not a constant. It drifts. It flips sign. It goes quiet for months and then snaps to plus 0.9 during a stress event, which is exactly the moment you were counting on it to be negative. A static heatmap takes all of that motion and flattens it into one polite number in the middle. If the relationship spent half the period at plus 0.5 and half at minus 0.5, the heatmap tells you zero, and zero is worse than useless because it reads as safe.
What rolling correlation actually shows you
The fix is to stop computing one correlation and start computing a series of them. You take a window, say 60 days, and compute the correlation of the two return streams inside that window. Then you slide the window forward one day and compute it again. Do that across the whole history and you get a time series, correlation as a line that moves, instead of a single dot.
A couple of things matter in the setup and people skip both. First, correlate returns, not prices. Two assets that both trend up over a year will show a high price correlation that tells you nothing about co-movement, it just tells you they both went up. Daily or hourly returns are what you want. Second, be honest that this is backward-looking. A 60-day rolling value on today's date describes the last 60 days. It is a lagging read, and everything about choosing the window comes back to that lag.
Picking the window is a noise-versus-lag tradeoff
Every window length is a bet, and the whole thing collapses to one tradeoff. A short window reacts fast but is jumpy. A long window is smooth but slow to admit that anything changed. There is no correct answer, there is only the answer that matches what you are using the number for.
- Around 30 days. Fast and twitchy. It will catch a regime change early, but it also throws a lot of false alarms, because 30 return observations is a thin sample and a couple of noisy days can swing it hard. Good for watching a hedge you actually hold and might need to adjust this week. Bad for anything you want to set and forget.
- Around 60 days. The reasonable default for most cross-asset work. Enough observations to calm the noise down, still responsive enough that a real shift shows up within a few weeks rather than a quarter late. If you only pick one, pick this and move on.
- Around 90 days and up. Smooth, stable, boring in a good way. This is what you want for structural questions, is this pair generally a diversifier or not, sizing a longer-horizon book. The cost is lag. By the time a 90-day line has clearly turned, the relationship changed weeks ago and your hedge already took the hit.
A trick I use instead of agonizing is to plot two windows on the same chart, a fast one and a slow one. When the fast line pulls away from the slow line, something is shifting and it is early. When they sit on top of each other, the relationship is stable and you can trust the level. It is the same logic as a fast and slow moving average, applied to the relationship rather than the price.
Reading the series before it wrecks a hedge
The reason to do any of this is to catch a correlation turning while you can still act on it. The failure mode is specific and common. You put on a hedge because two things are reliably negatively correlated. A stress event hits. Correlations across almost everything rush toward plus 1, because in a real selloff people sell whatever they can and nothing is a diversifier anymore. Your hedge, which was negative on the heatmap, is now moving with the position it was supposed to offset, and you are long the loss twice.
Here is the rough workflow I actually run.
- Pick the pair and correlate returns, not prices. Use a 60-day window as the baseline unless you have a reason not to.
- Plot the full rolling series, not the current value. You are looking for the shape. Has it been stable, or has it been swinging between positive and negative? A pair that oscillates is not a hedge, it is a coin flip with extra steps, and no window length will fix that.
- Add a faster window, around 30 days, on the same axis. Treat a widening gap between fast and slow as an early warning, not a signal to trade yet.
- Watch the sign and the trend, less the exact number. Minus 0.6 drifting toward minus 0.2 over a month is the story. The precise value on any single day is mostly noise.
- Size the hedge to the current regime, not the full-sample average. If the relationship has spent the last two months near zero, the historical minus 0.5 is not protecting you today, whatever the heatmap claims.
A last honest caveat. Rolling correlation is still a rear-view measure, and it will not warn you the day before a regime breaks. What it does is stop you from being surprised by a change that already happened and has been visible for weeks in the line, which is most of them. And it kills the specific self-deception of the static number, the flat average that hides a relationship spending half its life on each side of zero.
If you take one thing from this, it is to distrust any correlation you cannot see move. Pull the pair, roll a 60-day window, look at the shape before you look at the level. Most of the bad hedges I have watched come apart were negatively correlated on average and dangerously positive at the exact moment it counted, and a single number was never going to tell anyone that.