This guide explains how correlation is calculated, how to read a correlation matrix, a worked example, its uses and the pitfalls to avoid.
How correlation is calculated
The most common measure is the Pearson correlation of returns:
Correlation = covariance of the two return series ÷ (standard deviation of A × standard deviation of B)
Three rules matter:
- Use returns, not prices. Two prices that both rise over time can look highly correlated even if their daily moves are unrelated.
- Use the same dates for both stocks.
- Choose a window, such as the last 60 or 250 trading days.
Reading the values
| Correlation | Meaning |
|---|---|
| +0.8 to +1.0 | Very strong: the stocks usually move together |
| +0.5 to +0.8 | Strong |
| +0.2 to +0.5 | Moderate |
| −0.2 to +0.2 | Little or no relationship |
| Below −0.2 | The stocks tend to move in opposite directions |
Negative correlations between individual Indian stocks are uncommon, because most stocks share exposure to the overall market.
A worked example
This is a hypothetical matrix of daily return correlations over one year:
| Bank A | Bank B | IT company | FMCG company | |
|---|---|---|---|---|
| Bank A | 1.00 | 0.82 | 0.31 | 0.24 |
| Bank B | 0.82 | 1.00 | 0.28 | 0.22 |
| IT company | 0.31 | 0.28 | 1.00 | 0.18 |
| FMCG company | 0.24 | 0.22 | 0.18 | 1.00 |
The two banks move closely together. Holding both adds little diversification. The FMCG company has the lowest correlation with the others, so it diversifies the most.
Uses of a correlation matrix
Diversification
A portfolio of highly correlated stocks behaves like a single large position. Low correlations reduce the portfolio's overall volatility.
Hedging
To reduce risk in a stock, look for a related instrument with high correlation, such as a sector index or a peer, that can be sold against it.
Hidden concentration
Strategies that trade many stocks can end up with several positions in the same sector. A correlation check before adding a position shows whether it truly adds a new bet.
Pairs trading candidates
Highly correlated pairs are a starting point for pairs trading, but correlation alone is not enough. Pairs trading needs cointegration, a stable relationship between price levels. See the pairs cointegration tester and the pairs trading guide.
Pitfalls
- Correlations change. A rolling correlation, recalculated each day over a moving window, shows how unstable they can be.
- Correlations rise in crises. In sharp market falls, most stocks drop together, just when diversification is needed most.
- Correlation is not causation. Two stocks can move together because both follow the market, not because they affect each other.
- Outliers distort results. One extreme day, such as a result announcement, can change a correlation a lot over a short window.
- Correlation measures linear relationships and can miss others.
Using correlation in trading rules
- Limit positions so that no two open trades have a correlation above a set level, such as 0.7.
- Size positions by their contribution to portfolio risk rather than equally.
- Re-check correlations regularly, since they drift.
Combine correlation checks with position sizing from the position size calculator and portfolio risk estimates from the VaR calculator.
Start your free trial
Connect your broker, build a strategy and test it on paper before a single live order goes out.
Frequently asked questions
What is a correlation matrix in stocks?
A table showing the correlation of returns between each pair of stocks in a group.
Should I use prices or returns?
Returns. Price levels can show high correlation even when daily moves are unrelated.
What correlation is good for diversification?
Lower is better for diversification. Stocks with correlations below about 0.3 add more diversification than those above 0.7.
Is high correlation enough for pairs trading?
No. Pairs trading needs cointegration, which tests whether the price gap returns to a stable level.
Sources
- Markowitz, H. (1952). Portfolio Selection. Journal of Finance, 7(1), 77–91
- Longin, F. and Solnik, B. (2001). Extreme Correlation of International Equity Markets. Journal of Finance, 56(2), 649–676
