What is correlation
Correlation measures how two things move together. If two values tend to rise and fall at the same time, they are positively correlated. If one rises while the other falls, they are negatively correlated. If there is no predictable pattern, they have little or no correlation.
Think of height and shoe size. Taller people often have larger feet. That is positive correlation. Think of the speed of a car and the time to travel a fixed distance. Faster speed means less time. That is negative correlation.
In finance, we use correlation to see how assets behave relative to each other. It helps with building portfolios and reducing risk.
The range and meaning
Correlation is a number between -1 and 1.
- 1 means a perfect positive linear relationship. One variable moves exactly with the other.
- 0 means no linear relationship.
- -1 means a perfect negative linear relationship. One variable moves exactly opposite the other.
The closer the number is to 1 or -1, the stronger the linear relationship.
How to measure correlation
The most common measure is the Pearson correlation coefficient. It captures linear relationships.
Formula (conceptual): r = covariance(x, y) / (std_dev(x) * std_dev(y))
Steps to compute:
- Calculate each series' mean.
- Subtract the mean from each value to get deviations.
- Multiply paired deviations and average them to get covariance.
- Divide covariance by the product of the two standard deviations.
Simple example: X = [1, 2, 3] Y = [2, 4, 6]
Y is exactly twice X. Pearson r = 1.
Excel: =CORREL(range1, range2) Python (one line): numpy.corrcoef(x, y)[0, 1]
Other correlation types
- Spearman rank correlation. Uses ranks instead of raw values. It finds monotonic relationships. Use it when the relationship is not linear but still ordered.
- Kendall tau. Another rank-based measure useful for small samples or many ties.
Why correlation matters in finance
Correlation helps with diversification. When assets have low or negative correlation, combining them can reduce portfolio volatility.
Example:
- Suppose stocks and bonds have correlation of -0.2. When stocks fall, bonds may not fall as much, or they may rise. That smooths returns.
- Two stocks with correlation 0.9 move similarly. Owning both does little to lower risk.
- Two stocks with correlation -0.5 move opposite. Combining them can cut volatility.
Portfolio managers look at a correlation matrix to see relations across many assets. They often show this as a heat map.
Practical tips for using correlation
- Use returns, not prices. Correlation of raw prices is usually meaningless. Daily or monthly returns are standard.
- Use a rolling window to see how correlation changes over time. Correlations are not fixed.
- Check significance. A correlation from a small sample may be unreliable.
- Watch for crisis periods. Correlations tend to rise in market stress, reducing diversification benefits.
Common pitfalls
- Correlation is not causation. Two variables can move together by coincidence or because a third factor drives both.
- Pearson detects linear links only. Curved relationships can show low Pearson correlation even when closely related.
- Outliers can distort correlation. A single extreme point can raise or lower the coefficient a lot.
- Time horizon matters. Correlations at daily, monthly, or yearly scales may differ.
- Spurious correlations happen. Many listed variables can show correlations by chance.
How to check if a correlation matters
- Look at the magnitude. Above 0.7 is strong, 0.3 to 0.7 is moderate, below 0.3 is weak.
- Check p value or confidence interval when possible.
- Visualize with a scatter plot. See if the relationship looks linear or driven by outliers.
- Test across different windows and market states.
Quick checklist for investors
- Always use returns, not prices.
- Decide the time window for analysis.
- Calculate Pearson and maybe Spearman if nonlinearity is suspected.
- Use rolling correlations to track changes.
- Combine correlation with volatility to assess diversification benefits.
- Remember that correlations can increase in market stress.
Correlation is a simple idea with big consequences. It tells you whether assets move together. Use it well, and you can build portfolios that balance risk and return more effectively.