I receiving the following error when I try to compute a cap price. However, I'm not sure how to solve this error.

" 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:

I've transformed the normal vols into decimals. Below is the code how I set up the optionlet handle.

> 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()

Can someone point me in the right direction? Thanks.


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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.