def is_limit_up(row, stock): prev_close = round(row.pre_close, 2) close = round(row.close, 2) # 判断板块类型 if stock.startswith(('688','300')): limit_rate = 0.20 else: limit_rate = 0.10 # 计算涨停价(考虑四舍五入) limit_price = round(prev_close * (1 + limit_rate) + 1e-8, 2) return (close >= limit_price) & (row.high == row.close)
您需要登录后才能查看源码,点击登录
点赞 0