BlackFormula { public final Double computeStrikeImpliedByForwardDelta(final double fwdDelta, final boolean forCall) { Validate.notNull(_lognormalVol, "Black Volatility parameter, _vol, has not been set."); return BlackFormulaRepository.strikeForDelta(_forward, fwdDelta, _expiry, _lognormalVol, forCall); } @Deprecated  BlackFormula(final double forward, final double strike, final double expiry, final Double lognormalVol, final Double fwdPrice, final boolean isCall); final double computePrice(); final double computeForwardDelta(); final Double computeStrikeImpliedByForwardDelta(final double fwdDelta, final boolean forCall); final double computeStrikeSensitivity(); final double computeImpliedVolatility(); final Double computeStrikeImpliedByDeltaViaRootFinding(final double fwdDelta, final boolean forCall); final double getForward(); final void setForward(final double forward); final double getStrike(); final void setStrike(final double strike); final double getExpiry(); final void setExpiry(final double expiry); final Double getLognormalVol(); final void setLognormalVol(final Double vol); final Double getFwdMtm(); final void setMtm(final Double fwdMtm); final void setIsCall(final boolean bCall); @Override int hashCode(); @Override boolean equals(final Object obj);  }
@Test public void testStrikeImpliedFromFwdDelta() { final double strike50Call = FORMULA.computeStrikeImpliedByForwardDelta(0.5, true); assertEquals(FORWARD * Math.exp(0.5 * SIGMA * SIGMA * T), strike50Call); final double strike50Put = FORMULA.computeStrikeImpliedByForwardDelta(-0.5, false); assertEquals(strike50Call, strike50Put, EPS); final double strike10Call = FORMULA.computeStrikeImpliedByForwardDelta(0.10, true); final double strike25Call = FORMULA.computeStrikeImpliedByForwardDelta(0.25, true); final double strike75Call = FORMULA.computeStrikeImpliedByForwardDelta(0.75, true); final double strike90Call = FORMULA.computeStrikeImpliedByForwardDelta(0.90, true); final double strike90Put = FORMULA.computeStrikeImpliedByForwardDelta(-0.90, false); final double strike75Put = FORMULA.computeStrikeImpliedByForwardDelta(-0.75, false); final double strike25Put = FORMULA.computeStrikeImpliedByForwardDelta(-0.25, false); final double strike10Put = FORMULA.computeStrikeImpliedByForwardDelta(-0.10, false); assertEquals(strike10Call, strike90Put, EPS); assertEquals(strike25Call, strike75Put, EPS); assertEquals(strike75Call, strike25Put, EPS); assertEquals(strike90Call, strike10Put, EPS); assertTrue((strike10Call > strike25Call) && (strike25Call > strike50Call) && (strike50Call > strike75Call) && (strike75Call > strike90Call)); }