Kerry Back
\[\text{expected return}-\frac{1}{2}A\times\text{variance}\]
import numpy as np rf = 0.02 mn1, mn2, mn3 = 0.06, 0.08, 0.10 sd1, sd2, sd3 = 0.1, 0.15, 0.12 corr12, corr13, corr23 = 0.5, 0.7, 0.6 raver = 6
S = np.diag([sd1, sd2, sd3]) R = np.identity(3) R[0, 1] = R[1, 0] = corr12 R[0, 2] = R[2, 0] = corr13 R[1, 2] = R[2, 1] = corr23 C = S @ R @ S rprem = np.array([mn1, mn2, mn3]) - rf Cinv = np.linalg.inv(C) w = (1/A) * Cinv @ rprem
w1=-13.3%, w2=1.1%, w3=62.5%