def sign(value, threshold=0):
    """
    Get sign value based on threshold that defaults to 0.

    :param float value:
    :param float threshold:
    :return: -1, 0 or 1
    """
    if value < threshold:
        return -1

    if value == threshold:
        return 0

    return 1