Stock correlation calculator. Do these two move together?
Over the last year, SPY and GLD had a correlation of 0.39: a weak positive correlation (as of ).
Enter any two stocks or ETFs to get their correlation over 3 months, 1 year and 3 years. Correlation runs from −1 to +1 and shows whether two holdings really diversify each other.
Free · no account needed
Trusted by 141 investors
Two tickers in, one number out.
SPDR S&P 500 ETF (SPY) and SPDR Gold Shares (GLD). They often move in the same direction, but each also goes its own way.
| Period | Trading days | Correlation |
|---|---|---|
| 3 months | 63 trading days | 0.50 |
| 1 year | 252 trading days | 0.39 |
| 3 years | 756 trading days | 0.23 |
| Beta of SPY to GLD | Move of SPY for each 1% move of GLD, last year | 0.20 |
Sector correlation matrix. The S&P 500 and its 11 sectors.
| SPY | XLK | XLF | XLRE | XLV | XLI | XLE | XLC | XLU | XLY | XLP | XLB | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| S&P 500SPY | 1 | 0.88 | 0.55 | 0.28 | 0.23 | 0.74 | −0.17 | 0.57 | 0.13 | 0.77 | −0.05 | 0.54 |
| TechnologyXLK | 0.88 | 1 | 0.23 | −0.01 | −0.09 | 0.61 | −0.14 | 0.27 | −0.02 | 0.49 | −0.37 | 0.33 |
| FinancialsXLF | 0.55 | 0.23 | 1 | 0.50 | 0.44 | 0.49 | −0.11 | 0.50 | 0.15 | 0.57 | 0.25 | 0.48 |
| Real EstateXLRE | 0.28 | −0.01 | 0.50 | 1 | 0.52 | 0.38 | −0.07 | 0.36 | 0.58 | 0.40 | 0.54 | 0.49 |
| HealthcareXLV | 0.23 | −0.09 | 0.44 | 0.52 | 1 | 0.24 | −0.06 | 0.28 | 0.26 | 0.33 | 0.54 | 0.41 |
| IndustrialsXLI | 0.74 | 0.61 | 0.49 | 0.38 | 0.24 | 1 | −0.12 | 0.31 | 0.34 | 0.55 | 0.05 | 0.64 |
| EnergyXLE | −0.17 | −0.14 | −0.11 | −0.07 | −0.06 | −0.12 | 1 | −0.20 | 0.05 | −0.33 | 0.04 | −0.05 |
| Communication ServicesXLC | 0.57 | 0.27 | 0.50 | 0.36 | 0.28 | 0.31 | −0.20 | 1 | 0.04 | 0.66 | 0.20 | 0.31 |
| UtilitiesXLU | 0.13 | −0.02 | 0.15 | 0.58 | 0.26 | 0.34 | 0.05 | 0.04 | 1 | 0.15 | 0.40 | 0.36 |
| Consumer DiscretionaryXLY | 0.77 | 0.49 | 0.57 | 0.40 | 0.33 | 0.55 | −0.33 | 0.66 | 0.15 | 1 | 0.22 | 0.54 |
| Consumer StaplesXLP | −0.05 | −0.37 | 0.25 | 0.54 | 0.54 | 0.05 | 0.04 | 0.20 | 0.40 | 0.22 | 1 | 0.37 |
| MaterialsXLB | 0.54 | 0.33 | 0.48 | 0.49 | 0.41 | 0.64 | −0.05 | 0.31 | 0.36 | 0.54 | 0.37 | 1 |
Daily returns over the last 252 trading days, as of . Each sector is measured through its Select Sector SPDR fund and the S&P 500 through SPY. Brighter cells are more correlated.
What correlation between two stocks is
Correlation measures how closely the returns of two investments move together. It is one number between −1 and +1, called the correlation coefficient.
At +1 the two rise and fall together every day. At −1 one rises whenever the other falls. At 0 the move of one tells you nothing about the move of the other.
It matters because of diversification. Two holdings that are highly correlated are, in practice, one bet. A portfolio becomes steadier only when its parts do not all fall at the same time.
How Zensei builds it
Three steps, from the daily prices of the two tickers. This is the standard Pearson correlation.
Correlation = covariance(returns of A, returns of B) ÷ (standard deviation of A × standard deviation of B)
Turn prices into daily returns
For each ticker we take the daily closing prices, adjusted for splits and dividends, and compute the percentage change from one day to the next. Only days on which both traded are used.
Measure how the returns move together
The covariance of the two return series says whether they tend to be above or below their own average on the same days. Dividing it by the two standard deviations scales the result to between −1 and +1.
Repeat over three windows
The last 3 months (63 trading days), 1 year (252) and 3 years (756). The chart repeats the 3-month calculation for every day, so you can see the correlation change over time.
We use returns, not prices. Two prices that both drift upwards over the years look correlated even when their daily moves have nothing in common. Returns remove that illusion.
Beta is shown next to the result. It is the slope of the first ticker's returns against the second's over the last year: a beta of 1.5 means the first has moved 1.5% for each 1% move of the second, on average.
What it is used for
Investors use correlation in three ways.
To check diversification
Two funds with different names can hold the same kind of company. If their correlation is above 0.9, owning both spreads your money over two tickers, not over two risks.
To find a hedge
An asset with a low or negative correlation to the rest of a portfolio softens its falls. Long government bonds and gold have often played that role against stocks, though not in every period.
To size a position
A new holding that is highly correlated with what you already own adds to the same risk. Many investors hold less of it than they would of something uncorrelated.
How to read the number
Read the sign first, then the size. The sign says whether the two move in the same or in opposite directions. The size says how reliably.
| Coefficient | What it means |
|---|---|
| +0.8 to +1.0 | Very strong. They move almost as one, so holding both adds little diversification. |
| +0.6 to +0.8 | Strong. They usually move in the same direction. A correlation of 0.7 is here: about half of the movement of one is shared with the other. |
| +0.2 to +0.6 | Weak to moderate. They share a direction on many days, but each also goes its own way. |
| −0.2 to +0.2 | Uncorrelated. The move of one says almost nothing about the other. Good for diversification. |
| −0.2 to −1.0 | Negative. They tend to move in opposite directions. The closer to −1, the better one hedges the other. |
Squaring the coefficient gives the share of one investment's movement that is explained by the other. A correlation of 0.7 squared is 0.49, so about half. A correlation of 0.3 squared is 0.09: less than a tenth.
Most stocks are positively correlated with each other, because they share the same market. Among the 11 S&P 500 sectors over the last year, the closest pair is Communication Services and Consumer Discretionary at 0.66 and the most independent is Technology and Consumer Staples at −0.37.
One tool answers one question. The Index reads the whole market.
- Sector rotation map
Which sectors lead the S&P 500 right now, and which are fading.
- Sector directory
Every tracked sector and theme with its current standing against the S&P 500.
- P/E ratio by sector
What investors pay for a dollar of earnings in each S&P 500 sector today.
What it does not tell you
Correlation changes. It is measured on the past and it moves. In sharp sell-offs, the correlations between stocks rise towards 1, which is when diversification is needed most.
It ignores size. A stock that moves 0.1% whenever another moves 3% can still show a correlation near 1. Look at beta for the size of the moves.
The window matters. Three months can show a very different number from three years. A short window is noisy; a long one hides recent changes.
Correlation is not causation. Two tickers can move together because both respond to something else, such as interest rates or the market as a whole.
History here is limited. The tool uses up to three years of daily prices and covers the stocks and funds Zensei tracks.
One number never describes a market. To see how valuation, credit, liquidity, volatility and trend stand together today, open the Zensei Index: it is free to view.
Zensei is an analytics tool, not a registered investment adviser, and nothing on this page is investment advice. Read the full disclaimer.
Where the data comes from
One input per ticker. Zensei does the arithmetic.
| Input | Source | Updated |
|---|---|---|
| Daily closing prices of each ticker, adjusted for splits and dividends | End-of-day prices from the US exchanges where the ticker trades | After each US market close |
Further reading
- FINRA: asset allocation and diversification (opens in a new tab)
- US Securities and Exchange Commission, Investor.gov: asset allocation (opens in a new tab)
- Harry Markowitz, "Portfolio Selection", The Journal of Finance, 1952: the paper that made correlation between holdings the basis of diversification.
Calculation and text by Zensei. Explanation last updated . Data as of . Found an error? Tell us.
Correlation, in plain answers.
Diversification is one question. See the whole market today.
Trusted by 141 investors