Commit b972442a authored by 吕先亚's avatar 吕先亚

update

parent 2b789986
...@@ -96,8 +96,8 @@ async def recommend(): ...@@ -96,8 +96,8 @@ async def recommend():
'risk': risk, 'risk': risk,
'rr': round(sum([id_ticker_map[key]['risk'] * weight for key, weight in funds.items()]), 2), 'cp': cp, 'rr': round(sum([id_ticker_map[key]['risk'] * weight for key, weight in funds.items()]), 2), 'cp': cp,
'roi': roi} 'roi': roi}
note = {'recomm_reason': "recommend reason is ..."} note = {'recomm_reason': "推荐的理由是:"}
data['note'] = json.dumps(note) data['note'] = json.dumps(note, ensure_ascii=False)
# 计算股债比 # 计算股债比
stock_weight = int( stock_weight = int(
sum(weight * 100 for key, weight in funds.items() if id_ticker_map[key]['assetType'] == 'STOCK')) sum(weight * 100 for key, weight in funds.items() if id_ticker_map[key]['assetType'] == 'STOCK'))
......
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