“对象不是DCP”错误。我该怎么办?
下面是我的代码。
from mlfinlab.portfolio_optimization.mean_variance import MeanVarianceOptimisation
S0_arr01_df = pd.DataFrame(S0_arr01)
S0_arr01_df.rename(
columns={0: "DV EQ", 1: "EM EQ", 2: "KOR EQ", 3: "GLOBAL IG", 4: "GLOBAL HY", 5: "KOR BOND", 6: "Deposit"},
inplace=True)
mu_df = mu.to_frame()
MVO = MeanVarianceOptimisation()
MVO.allocate(covariance_matrix=S0_arr01_df, expected_asset_returns=mu_df, solution='max_diversification')
DCPError:问题不遵循DCP规则。特别: 目标不是DCP。其以下子表达式不是: QuadForm(var134,[[nan nan nan nan nan nan]