From f4333824e6fc82eb7e6c0ff536f31baf6c7c8df2 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期四, 26 六月 2025 14:21:47 +0800
Subject: [PATCH] L后自然最大撤单率最大80%
---
code_attribute/code_volumn_manager.py | 37 +++++++++++++++++++++++++++++++------
1 files changed, 31 insertions(+), 6 deletions(-)
diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py
index 0411fb8..d5164f0 100644
--- a/code_attribute/code_volumn_manager.py
+++ b/code_attribute/code_volumn_manager.py
@@ -7,7 +7,7 @@
# yesterday 鏄ㄥぉ鐨勯噺
import json
-from code_attribute import gpcode_manager
+from code_attribute import gpcode_manager, code_nature_analyse
from db.redis_manager_delegate import RedisUtils
from log_module import async_log_util
from utils import global_util, tool
@@ -77,19 +77,44 @@
auto_free=False)
def get_max_volume_in_5days(self, code):
- return self.__max_volume_in_5days.get(code)
-
- def get_volume_rate_refer_in_5days(self, code):
"""
- 鑾峰彇浠婃棩閲忎笌5鏃ユ渶澶ч噺鐨勫弬鑰冨��
+ 5鏃ユ渶澶ч噺
@param code:
@return:
+ """
+ return self.__max_volume_in_5days.get(code)
+
+ def get_radical_buy_refer_volume(self, code, limit_up_price):
+ """
+ 鑾峰彇鎵叆鐨勫弬鑰冮噺:
+ 鍙傝�冮灏忎簬3.14浜垮氨鍙�90澶╁弬鑰冮噺
+ 鍚﹀垯灏卞彇鏈�杩�5澶╃殑鍙傝�冮噺
+ @param code:
+ @param limit_up_price:
+ @return:
+ """
+ # 60涓氦鏄撴棩鏈定鍋滃彇
+ k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code)
+ has_limit_up_in_60 = True
+ if k_format and not k_format[13]:
+ has_limit_up_in_60 = False
+ volume = self.get_max_volume_in_5days(code)
+ if volume * limit_up_price >= 3.14e8 and has_limit_up_in_60:
+ return volume
+ return int(self.get_reference_volume_as_money_y(code) * 1e8 / limit_up_price)
+
+ def get_volume_rate_refer_in_5days(self, code, total_sell_volume=0):
+ """
+ 鑾峰彇浠婃棩閲忎笌5鏃ユ渶澶ч噺鐨勫弬鑰冨��
+ @param total_sell_volume: 褰撳墠鎬诲崠閲�
+ @param code:
+ @return: 5鏃ラ噺姣�
"""
max_volume = self.get_max_volume_in_5days(code)
if not max_volume:
return 0
today_volume = self.get_today_volumn(code)
- return round(today_volume / max_volume, 2)
+ return round((today_volume + total_sell_volume) / max_volume, 2)
# 鑾峰彇鍘嗗彶閲�
def get_histry_volumn(self, code):
--
Gitblit v1.8.0