" error: nu (-1.00062) must be >= -1.0 expiry: June 4th, 2020 annuity: 0.0830405 price: -1.25183e-07 atm: 0.255034 % strike: 0.739166 % type: Call RuntimeError: could not bootstrap optionlet:


> cap_floor_vol  = ql.CapFloorTermVolSurface(2, ql.UnitedStates(),ql.ModifiedFollowing, expiries, vol_strikes, vol_surface)
> optionlet_surf = ql.OptionletStripper1(cap_floor_vol, ibor_index, ql.nullDouble(), 1e-6, 100, yts_handle_dis, type = ql.Normal)
> ovs_handle     = ql.OptionletVolatilityStructureHandle(ql.StrippedOptionletAdapter(optionlet_surf))
> ovs_handle.enableExtrapolation()



This error usually means there is an arbitrage in your cap/floor surface and quantlib is unable to strip out caplets/floorlets from the data in your input surface. So for example a same strike longer maturity cap is costing less than a shorter one. The error info has narrowed down where the arb is occurring (strike column 0.739% and maturity looks to be one of the shorter tenors - but you haven't specified the evaluation date in your code so it's not clear). Try adjusting the vols around there. This can be an iterative process as nearby prices on your surface will be impacted.