From b9a8aab5369b51f0d9f8fe91d934822a110acf40 Mon Sep 17 00:00:00 2001
From: admin <admin@example.com>
Date: 星期五, 25 四月 2025 14:50:35 +0800
Subject: [PATCH] 有概念的 过滤列表更新 有强度的 过滤列表更新 解决一个9:15的除以零BUG

---
 strategy/plate_strength_analysis.py   |    7 +++----
 strategy/buying_strategy.py           |    7 ++++---
 strategy/market_sentiment_analysis.py |    2 +-
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/strategy/buying_strategy.py b/strategy/buying_strategy.py
index 0040de4..210e9ea 100644
--- a/strategy/buying_strategy.py
+++ b/strategy/buying_strategy.py
@@ -215,9 +215,10 @@
                 #     # 濡傛灉娌℃湁鎵惧埌锛屾墦鍗版彁绀轰俊鎭�
                 #     print(f"娌℃湁鍦ㄦ蹇电紦瀛樺垪琛ㄤ腑鎵惧埌:{symbol_to_search}銆�")
 
-                # 澹版槑瑕佹鏌ヨ繃婊や笉鍙敤鐨勬蹇垫澘鍧楀悕绉板父閲�
-                check_plate_list = {'ST鎽樺附', '骞惰喘閲嶇粍', '鍥戒紒鏀归潻', '鏃�', '瓒呰穼', '澹宠祫婧�', '鑲℃潈杞', '绉戝垱鏉�',
-                                    '娆℃柊鑲�', '鍖椾氦鎵�', '閫佽浆濉潈', '涓氱哗澧為暱', '涓姤澧為暱', '涓撶敤璁惧'}
+                # 澹版槑瑕佹鏌ヨ繃婊や笉鍙敤鐨勬蹇垫澘鍧楀悕绉板父閲�   銆愪唬琛ㄧ潃 鏄惁鏈夋棤姒傚康鍙婅窡闅忔蹇电殑鍙兘鎬�(鏈夋槑鏄句釜鑲″闀跨壒鎬х殑涓嶅彲璺熼殢)銆�
+                check_plate_list = {'鏃�', 'ST鎽樺附', 'ST鏉垮潡', '瓒呰穼', '娆℃柊鑲�', '鍖椾氦鎵�',  '绉戝垱鏉�',
+                                    '骞存姤澧為暱', '骞存姤棰勫', '骞惰喘閲嶇粍', '鑲℃潈杞', '閫佽浆濉潈', '楂橀�佽浆', '澹宠祫婧�', '璧勪骇绠$悊', '涓剧墝',
+                                    '涓撶敤璁惧'}
 
                 # 鏌ヨ褰撳墠涓偂鐨勪唬鐮佹槸鍚﹀湪鏉垮潡寮哄害涓偂鍒楄〃涓紙浣庡惛浼橀�夌洰鏍囷級
                 strength_list_have_it = False  # 涓烘煡璇㈢粨鏋滆祴鍒濆��
diff --git a/strategy/market_sentiment_analysis.py b/strategy/market_sentiment_analysis.py
index 47eec14..11f0da8 100644
--- a/strategy/market_sentiment_analysis.py
+++ b/strategy/market_sentiment_analysis.py
@@ -549,7 +549,7 @@
         # 璁$畻涓婃定鑲$エ鏁伴噺鐨勫拰
         fall_sum = sum(fall_dirt.values())
 
-        if rise_and_fall_sum != 0 or rise_sum != 0 or fall_sum != 0:
+        if rise_and_fall_sum != 0 and rise_sum != 0 and fall_sum != 0:
             # 璁$畻姣忎釜閿紙姣忎釜骞呮锛夌殑鍊煎崰鎬诲拰鐨勭櫨鍒嗘瘮
             percentages = {key: round((value / rise_and_fall_sum) * 100, 2) for key, value in
                            rise_and_fall_dirt.items()}
diff --git a/strategy/plate_strength_analysis.py b/strategy/plate_strength_analysis.py
index 72fd536..21a20b3 100644
--- a/strategy/plate_strength_analysis.py
+++ b/strategy/plate_strength_analysis.py
@@ -23,9 +23,8 @@
         # now_time_str = tool.get_now_time_str()
         # if data_cache.OPENING_TIME < now_time_str < data_cache.NOON_MARKET_TIME:
         log_data = {plate_name: its_stock['list']}
-        # 灏濊瘯杩囨护鎺夋棤鎰忎箟鐨勬蹇垫澘鍧�(plate_name not in ['绉戝垱鏉�', '鍖椾氦鎵�', '娆℃柊鑲�', '鏃�', 'ST鏉垮潡', 'ST鎽樺附', '骞惰喘閲嶇粍', '鍥戒紒鏀归潻','瓒呰穼', '澹宠祫婧�', '鑲℃潈杞', '閫佽浆濉潈']) and '澧為暱' in plate_name
-        if (plate_name not in ['绉戝垱鏉�', '鍖椾氦鎵�', '娆℃柊鑲�', '鏃�', 'ST鏉垮潡', 'ST鎽樺附', '骞惰喘閲嶇粍', '鍥戒紒鏀归潻', '瓒呰穼',
-                               '澹宠祫婧�', '鑲℃潈杞', '閫佽浆濉潈']) or ('澧為暱' in plate_name):
+        # 灏濊瘯杩囨护鎺夋棤鎰忎箟鐨勬蹇垫澘鍧� 銆愪唬琛ㄧ潃鏈夋棤寮哄害鍙兘銆�
+        if (plate_name not in ['绉戝垱鏉�', '鍖椾氦鎵�', '鏃�', '骞惰喘閲嶇粍', '鍥戒紒鏀归潻', '瓒呰穼', '澹宠祫婧�', '鑲℃潈杞', '閫佽浆濉潈']) or ('娆℃柊' in plate_name or 'ST' in plate_name or '鐮村噣鑲�' in plate_name):
 
             # print(f"{i[1]} 寮哄害:{i[2]}")
             # 閫氳繃鏉垮潡ID鑾峰彇鍏朵笅闈㈢殑涓偂寮哄害鍒楄〃
@@ -52,7 +51,7 @@
             # 鍒濆鍖栬偂绁ㄥ己搴﹀垪琛�
             stock_power_list = []
             for s in its_stock['list']:
-                # 杩囨护鎺夋定骞呭ぇ浜�  and s[6] < 6.5 涓斿皬浜�0%鐨� 鍜� 鍚嶇О涓寘鍚玈T鐨� 鍜� 娑ㄩ�熷皬浜庣瓑浜�0%鐨� 鍜� 鍙鏄ㄦ棩鏈定鍋� 鍜� 涓婅瘉鎴栨繁璇佺殑姝h偂    and s[9] > 0.0025  涓婂搴︽満鏋勬寔浠� >0
+                # 杩囨护鎺夋定骞呭ぇ浜�  褰撴棩娑ㄥ箙s[6] < 0% 鐨� 鍜� 鍚嶇О涓寘鍚玈T鐨� 鍜� 娑ㄩ�熷皬浜庣瓑浜�0%鐨� 鍜� 鍙鏄ㄦ棩鏈定鍋� 鍜� 涓婅瘉鎴栨繁璇佺殑姝h偂    and s[9] > 0.0025  涓婂搴︽満鏋勬寔浠� >0
                 if s[6] > 0 and s[1].find("ST") < 0 and s[1].find("XD") < 0 and s[23].find("鏉�") < 0 and s[24].find("鏉�") < 0 and (s[0].startswith('60') or s[0].startswith('00')) and s[9] > 1 and int(s[42]) > 0:
                     # print(f"{s[1]}锛屼釜鑲′唬鐮侊細{s[0]}锛�   娑ㄥ箙锛歿s[6]}%   娑ㄩ�燂細{s[9]}%   姒傚康锛歿s[4]}   涓诲姏璧勯噾鎺ㄦ祴锛歿s[2]}   棰嗘定娆℃暟锛歿s[40]}  浠婃棩绗嚑鏉匡細{s[23]} 鏄惁鐮寸増{s[24]}")
                     # 瀵逛釜鑲″己搴� 涓昏 灞炴�у垪琛ㄨ繘琛岃濉�

--
Gitblit v1.8.0