def get_ntm_strike(price, atm, intervals):
    """ATMの次に近い権利行使価格を算出

    ATMのIVを算出するための権利行使価格

    Parameters
    ----------
    price: int, float
        原資産価格
    atm: int
        ATMの権利行使価格
    intervals: int
        権利行使価格の刻み幅

    Returns
    -------
    int
        ATMの次に近い権利行使価格
    """
    if price == atm:
        return atm
    lower = atm - intervals
    upper = atm + intervals
    diff_lower = abs(price - lower)
    diff_upper = abs(price - upper)
    return {diff_lower: lower, diff_upper: upper}[min(diff_lower, diff_upper)]
