/src/main/java/net/finmath/marketdata/model/volatilities/SwaptionDataLattice.java
final double payoffUnit = SwapAnnuity.getSwapAnnuity ( fixSchedule.getFixing ( 0 ) , fixSchedule, model.getDiscountCurve ( discountCurveName ) , model ) ;
final Schedule floatSchedule = floatMetaSchedule.generateSchedule(getReferenceDate(), key.maturity, key.tenor); final Schedule fixSchedule = fixMetaSchedule.generateSchedule(getReferenceDate(), key.maturity, key.tenor); final double forward = Swap.getForwardSwapRate(fixSchedule, floatSchedule, model.getForwardCurve(forwardCurveName), model); final double optionMaturity = floatSchedule.getFixing(0); final double offset = key.moneyness /10000.0; final double optionStrike = forward + (quotingConvention == QuotingConvention.RECEIVERPRICE ? -offset : offset); <extra_id_0> if(toConvention.equals(QuotingConvention.PAYERPRICE) && fromConvention.equals(QuotingConvention.PAYERVOLATILITYLOGNORMAL)) { return AnalyticFormulas.blackScholesGeneralizedOptionValue(forward + fromDisplacement, value, optionMaturity, optionStrike + fromDisplacement, payoffUnit); } else if(toConvention.equals(QuotingConvention.PAYERPRICE) && fromConvention.equals(QuotingConvention.PAYERVOLATILITYNORMAL)) { return AnalyticFormulas.bachelierOptionValue(forward, value, optionMaturity, optionStrike, payoffUnit); }