Correlation measures how asset returns move together. In portfolio construction, pairwise correlations combine with each asset’s volatility to determine portfolio risk, so a portfolio’s standard deviation is not merely a weighted average of its components’ standard deviations. section 2.2
For assets i and j, correlation enters covariance as Cov(r_i,r_j) = σ_i σ_j Corr(r_i,r_j). This converts a correlation matrix and a volatility vector into a covariance matrix, which supports the general portfolio-risk calculation σp = (wᵀΣw)^(1/2). section 2.2
Use correlation as an input to a repeatable portfolio calculation:
- Specify expected returns, volatilities, and pairwise correlations for candidate assets before selecting portfolio weights. section 2.1
- Scale the correlation matrix by diagonal volatility matrices to produce Cov = diag(σ) @ Corr @ diag(σ). section 2.2
- Estimate a correlation matrix directly from a pandas DataFrame of historical returns with stock_returns.corr(). section 3.2.1
- Treat estimated correlations as assumptions: historical covariance estimation becomes impractical across many securities, where multifactor models can reduce the correlations requiring estimation. section 3.2.1
Three-stock covariance input
A correlation matrix for FE, WMT, and AAPL uses 1.0 on its diagonal and pairwise inputs of 0.10, 0.17, and 0.26. Combined with volatilities of 15%, 20%, and 35%, it produces a covariance matrix used with portfolio weights such as [0.2, 0.3, 0.5] to calculate portfolio standard deviation. section 2.1 section 2.2
Table 3.7 Correlation matrix of three assets
| AAPL | FE | WMT | |
| AAPL | 1.000000 | 0.209247 | 0.261399 |
| FE | 0.209247 | 1.000000 | 0.265760 |
| WMT | 0.261399 | 0.265760 | 1.000000 |
Inspect the historical correlation matrix for AAPL, FE, and WMT before converting estimated relationships into covariance inputs. section 3.2.1















