§07 CORRELATION_MATRIX¶
OVERVIEW¶
Correlation Matrix takes two to ten tickers and prints their pairwise Pearson correlation of daily returns over a chosen lookback window. Green cells cluster names that move together; red cells cluster names that move opposite; faint or transparent cells identify diversifiers. It is the first place to check when a portfolio looks balanced but every position moves on the same day.

The tool pulls daily closing prices for each symbol over the selected window, converts them to a returns series using simple period-over-period returns (p_i − p_{i−1}) / p_{i−1}, runs Pearson across every pair, and returns the full matrix. Results are cached per symbol set and window, so reordering tickers in the UI does not trigger a refetch.
Note
The window options are calendar days, not trading days. Trading-day filtering is applied server-side before the computation runs.
FEATURES¶
Color Encoding¶
Values run from −1.00 to +1.00. Cell backgrounds bin the correlation strength as follows:
| Range | Background | Text color |
|---|---|---|
| ≥ 0.80 | Dark green | Green |
| 0.50 – 0.79 | Medium green | Green |
| 0.20 – 0.49 | Faint green | Neutral |
| −0.20 – +0.20 | Transparent | Neutral |
| −0.21 – −0.49 | Faint red | Neutral |
| −0.50 – −0.79 | Medium red | Red |
| ≤ −0.80 | Dark red | Red |
The diagonal is always 1.00, dimmed and shaded — a symbol is perfectly correlated with itself.
Feature flags: correlation.fullTickers and correlation.allPeriods control the tier gates. Hard cap across all tiers is 30 symbols per request. Day-count range is clamped between 30 and 2000 days.
Fields¶
| Column / Cell | Description |
|---|---|
| Row header | Ticker in monospace green |
| Column header | Same tickers repeated across the top |
| Cell value | Pearson correlation of daily returns over the window, rounded to two decimals |
| Cell background | Color bin as described above |
| Cell text color | Green ≥ 0.50, red ≤ −0.50, neutral in between |
| Diagonal | Always 1.00, dimmed and shaded |
HOW TO USE¶
Path: /correlation
Sidebar group: §TOOLS
Keyboard shortcut: None
- Open
/correlation. If a watchlist is active on/dashboard, the first few of its symbols pre-populate automatically. - Type a ticker into the ADD_SYMBOL… box and press Enter, or select from the autocomplete dropdown. Add up to your tier cap.
- Click + WATCHLIST to bulk-load the active watchlist, capped at your tier maximum.
- Remove a ticker by clicking the × on its chip.
- Pick a window: 30D, 90D, 180D, or 1Y. Locked windows display a padlock and do not respond to clicks on Free.
- The matrix renders as soon as two valid symbols are present. Adding or removing a symbol, or changing the window, re-runs the computation automatically.
Reading the matrix
Start with the corners. The top-left to bottom-right diagonal is always 1.00. Off-diagonal greens mean the pair moves together; reds mean the pair moves opposite. Faint or transparent cells are your diversifiers.
Common Use Cases¶
- Basket sizing — if every name in a watchlist is +0.85 to SPY, there is one idea, not ten.
- Regime shift analysis — find names that broke from their cluster after a macro event.
- Pair trades — hunt the deep-red corners for inversely correlated candidates.
- Sector rotation — load the eleven SPDR ETFs and watch which sectors drift apart week-over-week.
- Options hedging — select a hedge with a correlation ≤ −0.50 to the position being protected.
LIMITATIONS AND KNOWN BEHAVIOR¶
- Symbols without a covered price feed — delisted, sub-$1 OTC, and foreign-listed names — return
0.00across their entire row and column. - Returns use simple period-over-period returns, not log returns. Results are accurate for typical equity pairs over months but diverge at extreme single-day moves.
- Pearson assumes a roughly linear relationship. Nonlinear pairs (for example, a stock versus its own put-write yield) will appear weaker than they trade.
- Pearson over short windows is noisy by design. A single large gap day can shift the 30D reading significantly. Use the 90D or longer window to confirm a structural relationship before acting on it.
- Results are cached. To force a refresh, add or remove a ticker, or change the window.
TROUBLESHOOTING¶
Every cell value is 0.00
The price history could not be loaded for those rows. The symbol is likely outside the covered universe — common for delisted, sub-$1 OTC, and foreign-listed names. Swap to a tradable proxy such as the ADR or the relevant sector ETF.
§ERR / CORRELATION · feed unavailable
The price feed failed for the entire batch. This is usually a brief outage. Refresh after 30 seconds. If the error persists, check the Tapeboard status channel.
30D and 90D work but longer windows show a padlock
The account is on Free. The correlation.allPeriods flag unlocks 180D and 1Y windows on Pro and Terminal.
The matrix does not update after removing a ticker Confirm the × click registered — the chip should disappear immediately and the matrix should recompute. If the matrix is stale, change the window once to force a recompute, then change it back.
Correlations look unstable week to week Pearson over short windows is sensitive to outlier days. A single 8% gap can shift the 30D reading materially. Cross-reference against the 90D or 1Y window to distinguish noise from a structural change in the relationship.