diff --git a/.env b/.env index 9536579..8c0d9f0 100644 --- a/.env +++ b/.env @@ -7,7 +7,7 @@ TUSHARE_TOKEN=725296d48ec74da89422e8be76bd770895a4bf93b4998aca4b898db6 DINGTALK_WEBHOOK_1=https://oapi.dingtalk.com/robot/send?access_token=fb70c1561d8beba94b4f11568f4bb15e3ae07ccbdc8ac19676434a9d1cd17546 DINGTALK_SECRET_1=SEC1ae7cd2f1a6f9da3611af37da3e7d954c1e8533fc073c6c8cc5e5af3b6e5926b -钉钉机器人配置 - 群2 +# 钉钉机器人配置 - 群2 DINGTALK_WEBHOOK_2=https://oapi.dingtalk.com/robot/send?access_token=87c7abfcdd69b699c32da4e4f5981cd2ca6b0445474fc6ffb36f2ed0f6262fbb DINGTALK_SECRET_2=SECf3d6b43f2f8a87ab91feffd052e71ec314fbf57a1842e483fe07af3c0a0e5aa6 diff --git a/rotation/simple_rotation.py b/rotation/simple_rotation.py index 53532db..ad33fb1 100644 --- a/rotation/simple_rotation.py +++ b/rotation/simple_rotation.py @@ -504,6 +504,7 @@ class SimpleRotationStrategy: prices = recent['close'].values[-self.n_days:] if len(prices) >= 4 and is_crash(prices): return 0.0 + # Dispatch based on factor type ft = self.config.factor.type if ft == FactorType.VOL_ADJUSTED_MOMENTUM: @@ -530,6 +531,7 @@ class SimpleRotationStrategy: prices = recent['close'].values[-self.n_days:] if len(prices) >= 4 and is_crash(prices): return 0.0 + if self.config.factor.type == FactorType.VOL_ADJUSTED_MOMENTUM: return weighted_momentum_score(prices) # All other factors: use the same score function as ranking