throw new OpenGammaRuntimeException("Could not find option ticker");
}
private Surface<Double, Double, Double> getVolatilitySurface(final Surface<Double, Double, Double> surface, final double callPrice, final double putPrice, final double futureMarketPrice,
final BondFutureOptionPremiumTransaction futureOption, final YieldCurveBundle data) {
final BondFutureOptionPremiumSecurity underlyingOption = futureOption.getUnderlyingOption();
final double futurePrice = BondFutureDiscountingMethod.getInstance().price(underlyingOption.getUnderlyingFuture(), data);
final double strike = underlyingOption.getStrike();
final double t = underlyingOption.getExpirationTime();
double impliedVolatility;
final boolean isCall = underlyingOption.isCall();
try {
if (isCall) {
impliedVolatility = BlackFormulaRepository.impliedVolatility(callPrice, futurePrice, strike, t, true);
} else {
impliedVolatility = BlackFormulaRepository.impliedVolatility(putPrice, futurePrice, strike, t, false);