Commit 1e6d6d90 authored by 吕先亚's avatar 吕先亚

fix(vender): 修正模型組合再平衡判斷條件

- 將模型組合再平衡日期判斷條件從「大於等於」修改為「大於」
- 確保只有在新的推薦日期後才進行再平衡
parent 7058e8f8
......@@ -29,7 +29,7 @@ class Quant_api(base_Quant_api):
if not pt.get('rp_id') or pt.get('rp_id') != model_portfolio['rp_id']:
# 如果推薦生成日data_Date在最後一次觸發再平衡时间之后,视为需要再平衡
if (not pt.get('last_recomm_date') or type(pt.get('last_recomm_date')) != str or
model_portfolio['data_Date'] >= pt.get('last_recomm_date').replace('-', '')):
model_portfolio['data_Date'] > pt.get('last_recomm_date').replace('-', '')):
note = json.loads(model_portfolio.get('note'))
if not note.get('recomm_reason'):
raise RuntimeError('未輸入推薦理由')
......
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