/src/main/java/net/finmath/marketdata2/model/volatilities/AbstractVolatilitySurface.java
final float payoffUnit = getDiscountCurve( ).getDiscountFactor( optionMaturity+getForwardCurve( ).getPaymentOffset( optionMaturity) ) * daycountFraction;
final double payoffUnit = getDiscountCurve ( ) .getDiscountFactor ( optionMaturity+getForwardCurve ( ) .getPaymentOffset ( optionMaturity ) ) * daycountFraction;
final LocalDate endDate = referenceDate.plusDays((int)Math.round(periodEnd*365)); daycountFraction = getDaycountConvention().getDaycountFraction(startDate, endDate); } else { daycountFraction = getForwardCurve().getPaymentOffset(periodStart); } <extra_id_0> if(toQuotingConvention.equals(QuotingConvention.PRICE) && fromQuotingConvention.equals(QuotingConvention.VOLATILITYLOGNORMAL)) { return AnalyticFormulas.blackScholesGeneralizedOptionValue(forward, value, optionMaturity, optionStrike, payoffUnit); } else if(toQuotingConvention.equals(QuotingConvention.PRICE) && fromQuotingConvention.equals(QuotingConvention.VOLATILITYNORMAL)) { return AnalyticFormulas.bachelierOptionValue(forward, value, optionMaturity, optionStrike, payoffUnit); }