/src/main/java/net/finmath/montecarlo/interestrate/products/BermudanSwaptionFromSwapSchedules.java
}; public Double apply( final Period period) { return FloatingpointDate.getFloatingPointDateFromDate( referenceDate, period.getPayment( ).atStartOfDay( ) ) ; }
public Double apply ( final Period period ) { return FloatingpointDate.getFloatingPointDateFromDate ( referenceDate, period.getPayment ( ) .atStartOfDay ( ) ) ; } };
for(int exerciseDateIndex = 0; exerciseDateIndex < exerciseDates.length; exerciseDateIndex++) { times.add(FloatingpointDate.getFloatingPointDateFromDate(referenceDate, exerciseDates[exerciseDateIndex].atStartOfDay())); final Schedule scheduleFixedLeg = fixSchedules[exerciseDateIndex]; final Schedule scheduleFloatLeg = floatSchedules[exerciseDateIndex]; final Function<Period, Double> periodToTime = new Function<Period, Double>() { @Override <extra_id_0> times.addAll(scheduleFixedLeg.getPeriods().stream().map(periodToTime).collect(Collectors.toList())); times.addAll(scheduleFloatLeg.getPeriods().stream().map(periodToTime).collect(Collectors.toList())); } return new TimeDiscretizationFromArray(times); } private RandomVariable getValueUnderlyingNumeraireRelative(final TermStructureMonteCarloSimulationModel model, final Schedule legSchedule, final boolean paysFloat, final double swaprate, final double notional) throws CalculationException {