Let’s find the formula starting with a small portfolio with number of assets = 2.
\[R_p = \omega_1 R_1 + \omega_2 R_2\] \[\begin{align*} \mathbb{V}[R_p] &= \mathbb{V}[\omega_1 R_1 + \omega_2 R_2] \\ &= \omega_1^2\mathbb{V}[R_1]+\omega_2^2\mathbb{V}[R_2]+2\omega_1\omega_2Cov(R_1,R_2) \quad \quad \quad (*)\\ &= (\omega_1~~\omega_2) \begin{pmatrix} \mathbb{V}[R_1] & Cov(R_1, R_2) \\ Cov(R_1, R_2) & \mathbb{V}[R_2] \end{pmatrix} \begin{pmatrix} \omega_1 \\ \omega_2 \end{pmatrix} \\ \end{align*}\]We can thus generalize the formula:
\[\sigma_p^2= \omega^T \Sigma \omega\]$(*)$ can also be written using the correlation coefficient $\rho$:
$\mathbb{V}[R_p] = \omega_1^2\mathbb{V}[ R_1]+\omega_2^2\mathbb{V}[R_2]+2\omega_1\omega_2 \sqrt{\mathbb{V}[ R_1]} \sqrt{\mathbb{V}[ R_2]} \rho_{1,2}$
From this equation, we can see that the portfolio variance is maximized when $\rho_{ij}=1$ (perfect correlation). It is minimal when $\rho_{ij}=-1$ i.e. when assets are perfectly negatively correlated. We notice than when $\rho_{ij}=1$, we have $\mathbb{V}[R_p] = (\omega_1\sigma_1 + \omega_2\sigma_2)^2$. This result shows that when assets are perfectly correlated, the volatility of a portfolio is the weighted average of the assets’ volatilities.
We could also compute the portfolio volatility using the correlation matrix. This is useful for better interpretation (it’s easier to double check a correlation matrix than a covariance matrix).
\[\sigma^2_p = \omega^T S C S \omega\]where $C$ is the correlation matrix and $S$ the standard deviation (diagonal) matrix:
\[S = \begin{pmatrix} \sigma_1 & \\ & \ddots & \\ & & \sigma_n \end{pmatrix}\]Warning: make sure the standard deviations and not the variances are used in $S$. It’s also important to make sure those standard deviations are of the right unit (e.g. annualized).