def cal_pc(tick:dict) -> int:
    """
    计算tick前后的pc值（可能是判断多空方向）
    :param tick: 当前tick
    :return: pc值
    """
    
    pc = 0
    if tick['trade_ask_spread'] >= 0:
        pc = 1
    elif tick['trade_bid_spread'] >= 0:
        pc = -1
    else:
        if tick['price_diff'] > 0:
            pc = 1
        elif tick['price_diff'] < 0:
            pc = -1
        else:
            pc = 0
    return pc