@Test /** Test the option price from the future price. Mid-curve one year option. */ public void priceFromFuturePriceMidCurve() { final double priceFuture = 0.9905; final double priceOption = METHOD.optionPriceFromFuturePrice(OPTION_EDU2, SABR_BUNDLE, priceFuture); final double delay = EDU2.getLastTradingTime() - EXPIRATION_TIME; final double volatility = SABR_PARAMETER.getVolatility(EXPIRATION_TIME, delay, 1 - STRIKE, 1 - priceFuture); final BlackPriceFunction blackFunction = new BlackPriceFunction(); final BlackFunctionData dataBlack = new BlackFunctionData(1 - priceFuture, 1.0, volatility); final EuropeanVanillaOption option = new EuropeanVanillaOption(1 - STRIKE, EXPIRATION_TIME, !IS_CALL); final double priceOptionExpected = blackFunction.getPriceFunction(option).evaluate(dataBlack); assertEquals( "Future option with SABR volatilities: option price from future price", priceOptionExpected, priceOption); }