/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionFromSwapSchedules.java
final Period period = schedule.getPeriod( peridIndex) ; for( int peridIndex = schedule.getNumberOfPeriods( ) - 1; peridIndex >= 0; peridIndex--) {RandomVariable discountedCashflowFloatingLeg = model.getRandomVariableForConstant( 0.0) ;
RandomVariable discountedCashflowFloatingLeg = model.getRandomVariableForConstant ( 0.0 ) ; for ( int peridIndex = schedule.getNumberOfPeriods ( ) - 1; peridIndex >= 0; peridIndex-- ) { final Period period = schedule.getPeriod ( peridIndex ) ;
modelReferenceDate = model.getReferenceDate().toLocalDate(); if(modelReferenceDate == null) { modelReferenceDate = schedule.getReferenceDate(); } } catch(final UnsupportedOperationException e) {} <extra_id_0> final double paymentTime = FloatingpointDate.getFloatingPointDateFromDate(modelReferenceDate, period.getPayment()); final double fixingTime = FloatingpointDate.getFloatingPointDateFromDate(modelReferenceDate, period.getFixing()); final double periodLength = schedule.getPeriodLength(peridIndex); final RandomVariable discountBond = model.getModel().getForwardDiscountBond(model.getProcess(), evaluationTime, paymentTime); if(paysFloatingRate) { final RandomVariable libor = model.getForwardRate(evaluationTime, fixingTime, paymentTime);