SciPy portfolio optimization with industry-level constraints
问题 Trying to optimize a portfolio weight allocation here which maximize my return function by limit risk. I have no problem to find the optimized weight that yields to my return function by simple constraint that the sum of all weight equals to 1, and make the other constraint that my total risk is below target risk. My problem is, how can I add industry weight bounds for each group? My code is below: # -*- coding: utf-8 -*- import pandas as pd import numpy as np import scipy.optimize as sco