Commit 5b121a27 authored by wenwen.tang's avatar wenwen.tang 😕
parent 1f82f2d3
......@@ -109,6 +109,7 @@ class FundDividendSortinoAssetOptimize(SortinoAssetOptimize):
sortino = sortino.T
sortino['score'] = sortino.apply(lambda r: sum([x['weight'] * r[x['name']] for x in self._config]), axis=1)
sortino.sort_values('score', ascending=False, inplace=True)
# todo 将记录入库
# 取得分数高的前optimize_count个
return pct_change.columns[sortino.index[0:self.optimize_count]].values,sortino['score']
......
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