Commit 1541c961 authored by Dr.李's avatar Dr.李

Merge remote-tracking branch 'origin/master'

parents 5b6d2b7c 2f440144
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
"all_styles = risk_styles + industry_styles + macro_styles\n", "all_styles = risk_styles + industry_styles + macro_styles\n",
"\n", "\n",
"risk_exposure_values = total_data[all_styles].values.astype(float)\n", "risk_exposure_values = total_data[all_styles].values.astype(float)\n",
"special_risk_values = total_data['s_srisk'].values.astype(float)\n", "special_risk_values = total_data['srisk'].values.astype(float)\n",
"risk_cov_values = risk_cov[all_styles].values\n", "risk_cov_values = risk_cov[all_styles].values\n",
"\n", "\n",
"sec_cov_values_full = risk_exposure_values @ risk_cov_values @ risk_exposure_values.T / 10000 + np.diag(special_risk_values ** 2) / 10000\n", "sec_cov_values_full = risk_exposure_values @ risk_cov_values @ risk_exposure_values.T / 10000 + np.diag(special_risk_values ** 2) / 10000\n",
...@@ -293,6 +293,20 @@ ...@@ -293,6 +293,20 @@
" print(\"{0:<8}{1:>12.2f}{2:>12.2f}{3:>12.2f}\".format(n, cvxpy_times[i], cvxopt_times[i], ipopt_times[i]))" " print(\"{0:<8}{1:>12.2f}{2:>12.2f}{3:>12.2f}\".format(n, cvxpy_times[i], cvxopt_times[i], ipopt_times[i]))"
] ]
}, },
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": null,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment