private static double AdjustSwaptionImpliedVol(int expiry, int tenor, double volatility, QuarterlyDiscounts discount, QuarterlyShifts shift) { double strike = RateAnalytics.SwapRate(expiry, tenor, discount); double swapShift = RateAnalytics.SwapShift(expiry, tenor, discount, shift); double swaptionPrice = BlackModel.GetValue(expiry / 4.0, strike, strike, volatility, PayStyle.Call); double result = BlackModel.GetImpliedVolatility(expiry / 4.0, strike + swapShift, strike + swapShift, swaptionPrice, volatility, PayStyle.Call); return(result); }