| | |
| | | # 自由流通股本影响比例 |
| | | zyltgb_rate = cls.get_zylt_rate(zyltgb) |
| | | # 行业涨停影响比例 |
| | | industry_rate=0 |
| | | industry_rate = 0 |
| | | if total_industry_limit_percent is not None: |
| | | industry_rate = cls.get_industry_rate(total_industry_limit_percent) |
| | | # 量影响比例 |
| | | volumn_rate = 0 |
| | | if volumn_day60_max is not None and volumn_yest is not None and volumn_today is not None: |
| | | volumn_rate = cls.get_volumn_rate(volumn_day60_max, volumn_yest, volumn_today) |
| | | volumn_rate = cls.get_volumn_rate(int(volumn_day60_max), int(volumn_yest), int(volumn_today)) |
| | | # 涨停时间影响比例 |
| | | limit_up_time_rate=0 |
| | | limit_up_time_rate = 0 |
| | | if limit_up_time is not None: |
| | | limit_up_time_rate = cls.get_limit_up_time_rate(limit_up_time) |
| | | # 万手哥影响 |
| | | big_money_rate = 0 |
| | | if big_money_num is not None: |
| | | big_money_rate = cls.get_big_money_rate(big_money_num) |
| | | print("zyltgb_rate:{} industry_rate:{} volumn_rate:{} limit_up_time_rate:{} big_money_rate:{}",zyltgb_rate,industry_rate,volumn_rate,limit_up_time_rate,big_money_rate) |
| | | print( |
| | | "zyltgb_rate:{} industry_rate:{} volumn_rate:{} limit_up_time_rate:{} big_money_rate:{}".format(zyltgb_rate, |
| | | industry_rate, |
| | | volumn_rate, |
| | | limit_up_time_rate, |
| | | big_money_rate)) |
| | | |
| | | return 1 - (zyltgb_rate + industry_rate + volumn_rate + limit_up_time_rate + big_money_rate); |
| | | return round(1 - (zyltgb_rate + industry_rate + volumn_rate + limit_up_time_rate + big_money_rate), 4) |
| | | |
| | | @classmethod |
| | | def compute_rate_by_code(cls, code): |
| | |
| | | if zyltgb is None: |
| | | print("没有获取到自由流通市值") |
| | | return 10000000 |
| | | zyltgb = cls.get_base_safe_val(zyltgb) |
| | | rate = cls.compute_rate_by_code(code) |
| | | print("m值获取:",code,round(zyltgb*rate)) |
| | | return round(zyltgb*rate) |
| | | print("m值获取:", code, round(zyltgb * rate)) |
| | | return round(zyltgb * rate) |
| | | |
| | | |
| | | # l2因子归因数据 |