Hacker News new | ask | show | jobs
by thomasahle 213 days ago
How would you write this with matrices? It seems like there are many ways you could generalize.
1 comments

Let w be the vector of weights and S be the comformable matrix of covariances. The portfolio variance is given by w’Sw. So just minimize that with whatever constraints you want. If you just asssume weights sum to one, it is a classic quadratic optimization with linear equality constraints. Well known solutions.