import math


def calculate_lot(one_lot_risk, balance_risk, min_lot, precision=2):
    """
    Calculates the size of lot by the size of risk.
    Be careful, the risk values must be calculated in one currency.
    
    Arguments
        one_lot_risk (float): Risk when buying a single lot. It can be calculated
            as the absolute difference between the purchase price and the stop loss.
        balance_risk (float): Fixed risk for the current balance.
        min_lot (float): Minimum order size.
    """
    
    if one_lot_risk * min_lot >= balance_risk or one_lot_risk <= 0:
        return min_lot
    elif min_lot == 1:
        return math.floor(balance_risk / one_lot_risk)
    else:
        return round(balance_risk / one_lot_risk - min_lot, precision)
    return -1.0