| | |
| | | continue |
| | | |
| | | code_info_list = block_codes_dict[b] |
| | | # 取自由市值的前1/3 |
| | | # 取自由市值的前1/3 和涨停次数最多的2个代码 |
| | | code_info_list.sort(key=lambda x: float(limit_up_info_map[x[0]][2]), reverse=True) |
| | | max_count = len(code_info_list) // 3 |
| | | zylt_list = code_info_list[:max_count] |
| | | # 取涨停次数最多的 |
| | | temp_codes = [x[0] for x in zylt_list] |
| | | code_info_list.sort(key=lambda x: x[1], reverse=True) |
| | | limit_up_count_max = code_info_list[:2] |
| | | for d in limit_up_count_max: |
| | | if d[0] not in temp_codes and d[1] >= 6: |
| | | # 涨停次数大于6次 |
| | | zylt_list.append(d) |
| | | # 按照涨停次数排序 |
| | | zylt_list.sort(key=lambda x: x[1], reverse=True) |
| | | zylt_list = [x[0] for x in zylt_list] |