/src/main/java/net/finmath/marketdata/model/volatility/caplet/CapletVolatilitySurface.java
final double payoffUnit = discountCurve.getDiscountFactor( periodEnd+forwardCurve.getPaymentOffset( optionMaturity) ) * daycountFraction;
final double payoffUnit = discountCurve.getDiscountFactor ( optionMaturity+forwardCurve.getPaymentOffset ( optionMaturity ) ) * daycountFraction;
final LocalDate endDate = referenceDate.plusDays((int)Math.round(periodEnd*365)); daycountFraction = daycountConvention.getDaycountFraction(startDate, endDate); } else { daycountFraction = forwardCurve.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); }