/src/main/java/net/finmath/montecarlo/interestrate/products/SwaptionFromSwapSchedules.java
modelReferenceDate = schedule.getForwardRate( fixRate , atmSwaprate , notional) ;
modelReferenceDate = schedule.getReferenceDate ( ) ;
} public static RandomVariable getValueOfLegAnalytic(final double evaluationTime, final TermStructureMonteCarloSimulationModel model, final Schedule schedule, final boolean paysFloatingRate, final double fixRate, final double notional) throws CalculationException { LocalDate modelReferenceDate = null; try { modelReferenceDate = model.getReferenceDate().toLocalDate(); if(modelReferenceDate == null) { <extra_id_0> } } catch(final UnsupportedOperationException e) {} RandomVariable discountedCashflowFloatingLeg = model.getRandomVariableForConstant(0.0); for(int peridIndex = schedule.getNumberOfPeriods() - 1; peridIndex >= 0; peridIndex--) { final Period period = schedule.getPeriod(peridIndex);