@Test
/**
* Tests the curve sensitivity when the future price is directly provided.
*/
public void priceCurveSensitivityFromFuturesPrice() {
final MulticurveSensitivity pcsCallComputed = METHOD_BLACK_SEC.priceCurveSensitivity(BOND_FUTURE_OPTION_DERIV_CALL, BLACK_PRICE_MULTICURVES).cleaned();
final MulticurveSensitivity pcsCallNoFut = METHOD_BLACK_SEC.priceCurveSensitivity(BOND_FUTURE_OPTION_DERIV_CALL, BLACK_MULTICURVES).cleaned();
AssertSensivityObjects.assertDoesNotEqual("BondFutureOptionPremiumSecurityBlackSurfaceMethod: option price curve sensitivity", pcsCallComputed, pcsCallNoFut, TOLERANCE_PRICE_SENSI);
final MulticurveSensitivity pcsPutComputed = METHOD_BLACK_SEC.priceCurveSensitivity(BOND_FUTURE_OPTION_DERIV_PUT, BLACK_PRICE_MULTICURVES);
final MulticurveSensitivity pcsFuture = METHOD_FUTURES.priceCurveSensitivity(BOND_FUTURE_DERIV, ISSUER_MULTICURVES).cleaned();
final MulticurveSensitivity pcsCallPut = pcsCallComputed.plus(pcsPutComputed.multipliedBy(-1.0)).cleaned();
AssertSensivityObjects.assertEquals("BondFutureOptionPremiumSecurityBlackSurfaceMethod: option price curve sensitivity - put/call parity", pcsFuture, pcsCallPut, TOLERANCE_PRICE_SENSI);
final double delta = METHOD_BLACK_SEC.priceDelta(BOND_FUTURE_OPTION_DERIV_CALL, BLACK_PRICE_MULTICURVES);
final MulticurveSensitivity pcsCallExpected = pcsFuture.multipliedBy(delta);
AssertSensivityObjects.assertEquals("BondFutureOptionPremiumSecurityBlackSurfaceMethod: option price curve sensitivity", pcsCallExpected, pcsCallComputed, TOLERANCE_PRICE_SENSI);
}