

def get_implied_volatilities(self, Ks, opt_prices):
    impvols = []
    for i in range(len(Ks)):
        f = (lambda sigma: (f._option_valuation_(Ks[i], sigma) - opt_prices[i]))
        impv = bisection(f, 0.01, 0.99, 0.0001, 100)[0]
        impvols.append(impv)
    return impvols

dataset/ETHPy150Open jamesmawm/Mastering-Python-for-Finance-source-codes/B03898_04_codes/ImpliedVolatilityModel.py ImpliedVolatilityModel.get_implied_volatilities/VarMisuse@39/52 `self`->`f`