assertEquals(logBlack.getShift(), 0.0, 1e-9);
}
@Test
public void testConstantDoublesSurface() {
final BlackVolatilitySurface<?> constVolSurf = new BlackVolatilitySurfaceDelta(ConstantDoublesSurface.from(0.25), FORWARD_CURVE);
final double forward = FORWARD_CURVE.getForward(expiry1);
final double delta1 = 0.75;
final double vol1 = constVolSurf.getVolatility(expiry1, delta1);
final double strike1 = BlackFormulaRepository.impliedStrike(delta1, true, forward, expiry1, vol1);
final double delta2 = 0.5;
final double vol2 = constVolSurf.getVolatility(expiry1, delta2);
final double strike2 = BlackFormulaRepository.impliedStrike(delta2, true, forward, expiry1, vol2);
final DisplacedDiffusionModel logBlack = new DisplacedDiffusionModel(forward, expiry1, strike1, vol1, strike2, vol2);
assertEquals(logBlack.getVol(), 0.25, 1e-9);
assertEquals(logBlack.getShift(), 0.0, 1e-9);