just a small nitpick, you should be able to calculate portfolio variance using simple matrix operations instead of writing a double for loop.
something like.
temp = a* std_dev
var = np.dot(np.dot(temp.T, cor), temp)
something like.
temp = a* std_dev
var = np.dot(np.dot(temp.T, cor), temp)
No comments yet.