Use the grid solver to generate instrument prices via find_present_value and run them through a bisective root search method until a constant volatility matching the provided instrument price has been found.
instrument: Instrument to search for the target price on, passed as the sole instrument to find_present_value
...: Additional arguments to be passed on to find_present_value
starting_volatility_estimate: Bisection method original guess
relative_tolerance: Relative tolerance in instrument price defining the root-finder halting condition
max.iter: Maximum number of root-finder iterations allowed
max_vola: Maximum volatility to try
Returns
A list of present values, with the same names as instruments
Details
Unlike american_implied_volatility, this routine allows for any legal term structures and equity-linked default intensities. For that reason, it eschews the control variate tricks that make american_implied_volatility so much faster.
Note that equity-linked default intensities can result in instrument prices that are not monotonic in volatility. This bisective root finder will find a solution but not necessarily any particular one.
find_present_value for the underlying pricing algorithm, implied_volatility_with_term_struct for European options without equity dependence of default intensity, american_implied_volatility for the same on American options