SmileExtrapolationFunctionSABRProvider { abstract Function1D<Double, Double> getExtrapolationFunction(final SABRFormulaData sabrDataLow, final SABRFormulaData sabrDataHigh, final VolatilityFunctionProvider<SABRFormulaData> volatilityFunction, final double forward, final double expiry, final double cutOffStrikeLow, final double cutOffStrikeHigh);    }
@Test(expectedExceptions = IllegalArgumentException.class) public void negativeStrikeBdkTest() { DEFAULT_BDK_PROVIDER.getExtrapolationFunction(SAMPLE_SABR_DATA, SAMPLE_SABR_DATA, new SABRHaganVolatilityFunction(), SAMPLE_FORWARD, SAMPLE_EXPIRY, -0.7 * SAMPLE_FORWARD, 1.5 * SAMPLE_FORWARD); }
@Test(expectedExceptions = IllegalArgumentException.class) public void lowerUpperStrikeBdkTest() { DEFAULT_BDK_PROVIDER.getExtrapolationFunction(SAMPLE_SABR_DATA, SAMPLE_SABR_DATA, new SABRHaganVolatilityFunction(), SAMPLE_FORWARD, SAMPLE_EXPIRY, 0.7 * SAMPLE_FORWARD, -1.5 * SAMPLE_FORWARD); }
@Test(expectedExceptions = IllegalArgumentException.class) public void negativeStrikeSlnTest() { DEFAULT_SLN_PROVIDER_EXC.getExtrapolationFunction(SAMPLE_SABR_DATA, SAMPLE_SABR_DATA, new SABRHaganVolatilityFunction(), SAMPLE_FORWARD, SAMPLE_EXPIRY, -0.5 * SAMPLE_FORWARD, 1.5 * SAMPLE_FORWARD); }
@Test(expectedExceptions = IllegalArgumentException.class) public void largeLowerStrikeSlnTest() { DEFAULT_SLN_PROVIDER_EXC.getExtrapolationFunction(SAMPLE_SABR_DATA, SAMPLE_SABR_DATA, new SABRHaganVolatilityFunction(), SAMPLE_FORWARD, SAMPLE_EXPIRY, 1.01 * SAMPLE_FORWARD, 1.5 * SAMPLE_FORWARD); }
@Test(expectedExceptions = IllegalArgumentException.class) public void smallUpperStrikeSlnTest() { DEFAULT_SLN_PROVIDER_EXC.getExtrapolationFunction(SAMPLE_SABR_DATA, SAMPLE_SABR_DATA, new SABRHaganVolatilityFunction(), SAMPLE_FORWARD, SAMPLE_EXPIRY, 0.5 * SAMPLE_FORWARD, 0.99 * SAMPLE_FORWARD); }
@Test(expectedExceptions = IllegalArgumentException.class) public void nonBehaviourSlmTest() { ShiftedLogNormalExtrapolationFunctionProvider providerFail = new ShiftedLogNormalExtrapolationFunctionProvider( "None"); providerFail.getExtrapolationFunction(SAMPLE_SABR_DATA, SAMPLE_SABR_DATA, new SABRHaganVolatilityFunction(), SAMPLE_FORWARD, SAMPLE_EXPIRY, -0.5 * SAMPLE_FORWARD, 1.5 * SAMPLE_FORWARD); }