From 1e6d6d9087f30ae5cc98c74b4f0321821f10dc22 Mon Sep 17 00:00:00 2001
From: lvxianya <Devil.lv@thizgroup.com>
Date: Wed, 9 Apr 2025 17:01:46 +0800
Subject: [PATCH] =?UTF-8?q?fix(vender):=20=E4=BF=AE=E6=AD=A3=E6=A8=A1?=
 =?UTF-8?q?=E5=9E=8B=E7=B5=84=E5=90=88=E5=86=8D=E5=B9=B3=E8=A1=A1=E5=88=A4?=
 =?UTF-8?q?=E6=96=B7=E6=A2=9D=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

- 將模型組合再平衡日期判斷條件從「大於等於」修改為「大於」
- 確保只有在新的推薦日期後才進行再平衡
---
 vender/sv_quant_api.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vender/sv_quant_api.py b/vender/sv_quant_api.py
index 8c16176..e0c3001 100644
--- a/vender/sv_quant_api.py
+++ b/vender/sv_quant_api.py
@@ -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('未輸入推薦理由')
-- 
2.18.1