公告板
版本库
filestore
活动
搜索
登录
main
/
gp-server
概况
操作记录
提交次数
目录
文档
派生
对比
blame
|
历史
|
原始文档
bug修复
Administrator
2023-12-22
9039563a3c2e1349b0f71003f8a3f0b793924e82
[gp-server.git]
/
test
/
test_code_attribute.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from code_attribute import code_nature_analyse
from utils import init_data_util, tool
def is_too_high(datas):
limit_up_price = round(datas[0]["close"] * 1.1, 2)
datas.reverse()
is_new_high = code_nature_analyse.is_up_too_high_from_latest_limit_up(datas)
return is_new_high
if __name__ == "__main__":
# code_str = "002103,002108,002176,002189,002328,002397,002457,002495,002578,002903,002933,003028,003040,600234,600293,600764,603090,603162,603193,603270,603332,603380,603615,603711"
code_str = "002933"
codes = code_str.split(",")
for code in codes:
if not tool.is_shsz_code(code):
continue
try:
# limit_up_price = 16.96
volumes_data = init_data_util.get_volumns_by_code(code, 150)
# volumes_data = volumes_data[1:]
print(code, is_too_high(volumes_data))
except:
print(code, "出错")