Building a Correlation Heatmap from Aligned Weekly or Monthly Returns
Summary
This indicator creates a matrix of Pearson correlations for a user-supplied list of instruments. It first derives weekly or monthly arithmetic returns at aligned sampling points, then calculates pairwise correlations across the retained observations and displays them in a color-coded heatmap. The colors distinguish negative, near-zero, and positive relationships, while the table also reports the number of periods included. Users can choose a maximum sample length and displayed precision.
The method aims to compare instruments over matching time intervals and excludes a sampled period if any requested instrument lacks a return for it. It requires the chosen sampling timeframe to be at least as large as the chart timeframe, and the available return intervals are limited to weekly and monthly. The document supplies implementation details, not empirical findings or evidence that correlations persist. Pearson correlation captures linear co-movement over the selected sample; the heatmap alone does not establish causality, stable diversification benefits, or future relationships.
Key ideas
- The indicator computes pairwise Pearson correlations from aligned weekly or monthly arithmetic returns.
- A heatmap encodes negative, neutral, and positive relationships, and reports the number of observations used.
- A period is retained only when return data is available for every listed instrument.
- Correlation describes linear co-movement in the selected sample and does not establish causation or future stability.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.