| | |
| | | # 是否具有辨识度 |
| | | p9 = is_special(record_datas) |
| | | p10 = is_latest_10d_max_volume_at_latest_2d(record_datas) |
| | | p11 = __is_yesterday_open_limit_up(record_datas) |
| | | # 最近5天是否跌停/炸板 |
| | | p11 = __is_latest_open_limit_up_or_limit_down(record_datas, 5) |
| | | # 30天内是否有涨停 |
| | | p12 = __has_limit_up(record_datas, 30) |
| | | |
| | |
| | | return False, '' |
| | | |
| | | |
| | | # 昨天是否炸板 |
| | | def __is_yesterday_open_limit_up(datas): |
| | | # 最近几天是否有炸板或跌停 |
| | | def __is_latest_open_limit_up_or_limit_down(datas, day_count): |
| | | datas = copy.deepcopy(datas) |
| | | datas.sort(key=lambda x: x["bob"]) |
| | | item = datas[-1] |
| | | limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(item["pre_close"])) |
| | | if abs(limit_up_price - item["high"]) < 0.001 and abs(limit_up_price - item["close"]) > 0.001: |
| | | # 炸板 |
| | | return True |
| | | items = datas[0-day_count] |
| | | for item in items: |
| | | limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(item["pre_close"])) |
| | | if abs(limit_up_price - item["high"]) < 0.001 and abs(limit_up_price - item["close"]) > 0.001: |
| | | # 炸板 |
| | | return True |
| | | # 是否有跌停 |
| | | limit_down_price = float(gpcode_manager.get_limit_down_price_by_preprice(item["pre_close"])) |
| | | if abs(limit_down_price - item["close"]) < 0.001: |
| | | # 跌停 |
| | | return True |
| | | return False |
| | | |
| | | |