/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionFromSwapSchedules.java
final RandomVariable discountedCashflowFixLeg = getValueOfLegAnalytic( exerciseTime, model, scheduleFloatLeg, false, swaprate, notional) ;
final RandomVariable discountedCashflowFixLeg = getValueOfLegAnalytic ( exerciseTime, model, scheduleFixedLeg, false, swaprate, notional ) ;
if(modelReferenceDate == null) { modelReferenceDate = referenceDate.toLocalDate(); } } catch(final UnsupportedOperationException e) {} final double exerciseTime = FloatingpointDate.getFloatingPointDateFromDate(modelReferenceDate, exerciseDate); <extra_id_0> final RandomVariable discountedCashflowFloatingLeg = getValueOfLegAnalytic(exerciseTime, model, scheduleFloatLeg, true, 0.0, notional); RandomVariable values; if(swaptionType.equals(SwaptionType.PAYER)){ values = discountedCashflowFloatingLeg.sub(discountedCashflowFixLeg); } else if(swaptionType.equals(SwaptionType.RECEIVER)){