Function to compute diversification as a constraint
Diversification is defined as 1 minus the sum of the squared weights
diversification = 1 - sum(w^2)
diversification(weights)
weights |
vector of asset weights |
Ross Bennett
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.