# Sector Correlation Matrix

Sector Correlation Matrix is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

The Sector Correlation Matrix tracks rolling Pearson correlation between your charted symbol and any benchmark, classifying the relationship into five states from Strong Positive to Strong Negative. An oscillator pane plus a live dashboard show whether an asset is moving with the market or decoupling - for stock, crypto, and forex traders weighing relative strength and risk.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Feb 19, 2026.
- Access: free.
- Concepts: [Correlation](https://www.luxalgo.com/library/concept/correlation/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn5l7w007vvhsg7o6cwrx7
- Page: https://www.luxalgo.com/library/indicator/sector-correlation-matrix/

**Sector Correlation Matrix** measures how tightly your charted symbol tracks a benchmark you choose. It computes a rolling [Pearson correlation](https://www.luxalgo.com/library/concept/correlation/) between the two closing-price series and sorts each reading into five plain-language states, so instead of eyeballing two charts side by side you watch one oscillator answer the question: is this asset moving with the market, against it, or on its own?

## How to Trade the Sector Correlation Matrix?

- **Strong Positive (above 0.7)**: tight synchronization - a breakout here is more plausibly part of a broader market move than an isolated event.
- **Moderate zones (above 0.3 or below -0.3)**: a general tendency to move together or apart, without lockstep.
- **Decoupled (-0.3 to 0.3)**: no significant linear relationship. An asset holding firm while its benchmark slides is printing relative strength worth investigating.
- **Strong Negative (below -0.7)**: strongly inverse movement - the zone hedgers and defensive positioners care about.

State changes carry information of their own: a symbol drifting from Strong Positive toward Decoupled may be starting an independent trend, and a portfolio whose holdings all read Strong Positive against the same benchmark is closer to one position than several.

## Sector Correlation Matrix Settings

- **Benchmark Asset**: the ticker to compare against - an index proxy, crypto pair, forex pair, or commodity.
- **Correlation Length**: the rolling lookback; shorter lengths react faster, longer lengths smooth noise.
- **Show Dashboard / Position / Size**: the on-chart panel with the live correlation value and state, its placement, and its text size.

## Frequently Asked Questions

### Does it only work on stocks?
No. It runs on stocks, ETFs, crypto, forex pairs, and commodities alike - all it needs is a benchmark symbol to measure against.

### How does correlation sharpen trading decisions?
It clarifies whether a move is market-driven or asset-specific, flags early decoupling that can precede leadership, and exposes hidden concentration when supposedly separate positions all track the same benchmark.

### How do I access the Sector Correlation Matrix?
The tool is free for everyone through the LuxAlgo Library. For a wider statistical lens across several assets at once, [Correlation Clusters](https://www.luxalgo.com/library/indicator/correlation-clusters/) is the natural next step. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Correlation Clusters](https://www.luxalgo.com/library/indicator/correlation-clusters/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/correlation-clusters.md
- [Historical Correlation](https://www.luxalgo.com/library/indicator/historical-correlation/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/historical-correlation.md
- [Arbitrage Detector](https://www.luxalgo.com/library/indicator/arbitrage-detector/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/arbitrage-detector.md
- [Arbitrage Matrix](https://www.luxalgo.com/library/indicator/arbitrage-matrix/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/arbitrage-matrix.md
- [The Echo Forecast](https://www.luxalgo.com/library/indicator/the-echo-forecast/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/the-echo-forecast.md
- [Correlated Sine Oscillator](https://www.luxalgo.com/library/indicator/correlated-sine-oscillator/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/correlated-sine-oscillator.md
- [Intermarket Swing Projection](https://www.luxalgo.com/library/indicator/intermarket-swing-projection/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/intermarket-swing-projection.md
- [Correlation Coefficient](https://www.luxalgo.com/library/indicator/correlation-coefficient/) (Correlation): markdown at https://www.luxalgo.com/library/indicator/correlation-coefficient.md

---

Source: https://www.luxalgo.com/library/indicator/sector-correlation-matrix/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
