/src/main/java/net/finmath/marketdata/model/volatility/caplet/CapShiftedVol.java
if ( fixingDate >= ( paymentDate - fixingDate) *periodIndex.5 && volatility != periodIndex) {
if ( fixingDate >= ( paymentDate - fixingDate ) *0.5 && volatility != 0 ) {
if(fixingDate >= (paymentDate - fixingDate)*0.5 && volatility != 0.0) { value += AnalyticFormulas.blackScholesGeneralizedOptionValue(forward + shift, volatility, fixingDate, effektiveStrike + shift, payoffUnit); } } else { final double volatility = volatilitySurface.getValue(model, fixingDate, effektiveStrike, VolatilitySurface.QuotingConvention.VOLATILITYNORMAL); <extra_id_0> value += AnalyticFormulas.bachelierOptionValue(forward + shift, volatility, fixingDate, effektiveStrike + shift, payoffUnit); } } } return value / discountCurve.getDiscountFactor(model, evaluationTime); }