Specifically, I need to expand this unexpected loss for a portfolio expression in order to calculate:
$$S=\sqrt{(\sum_{i=1}^2\sum_{j=1}^2 w_i w_j u_i u_j ρ_{ij})}$$
I've attempted to expand it on my own, coming up with:
$$\sqrt{(w_i*w_i*u_i*u_i*ρ_{ij} + w_j*w_j*u_j*u_j*ρ_{ij})}$$
Am I expanding this expression correctly?
Thanks!
First of all the variables which do not depend on j can be written in front of the second sigma sign.
$$S=\sqrt{\sum_{i=1}^2 w_iu_i \sum_{j=1}^2 w_j u_j ρ_{ij}}$$
Now you write the summands of the second sigma sign with the different values (1,2) of $j$. The index $i$ remains $i$.
$$S=\sqrt{\sum_{i=1}^2 w_iu_i \left(w_1u_1\rho_{i1}+w_2u_2\rho_{i2}\right)}$$
Multiplying out the brackets
$$S=\sqrt{\sum_{i=1}^2 \left( w_iu_i w_1u_1\rho_{i1}+w_iu_iw_2u_2\rho_{i2}\right)}$$
The variables without the index i can be written in front of the sigma sign again.
$$S=\sqrt{w_1u_1\sum_{i=1}^2 w_iu_i \rho_{i1}+w_2u_2\sum_{i=1}^2w_iu_i\rho_{i2}}$$
$$S=\sqrt{w_1u_1 w_1u_1 \rho_{11}+w_1u_1 w_2u_2 \rho_{21}+w_2u_2w_1u_1\rho_{12}+w_2u_2w_2u_2\rho_{22}}$$
Two some facts about $\rho_{xy}$
1.$\rho_{11}=\rho_{22}=1$
2.$\rho_{12}=\rho_{21}$
Thus finally we get
$$S=\sqrt{w_1^2u_1^2 +2w_1u_1 w_2u_2 \rho_{21}+w_2^2u_2^2}$$