/src/main/java/net/finmath/marketdata/products/Cap.java
periods.addAll( remainderSchedule.getPeriods( ) ) ;
periods.addAll ( schedule.getPeriods ( ) ) ;
if(!Double.isNaN(cachedATMForward) && cacheStateModel.get() == model && cacheStateIsFirstPeriodIncluded == isFirstPeriodIncluded) { return cachedATMForward; } Schedule remainderSchedule = schedule; if(!isFirstPeriodIncluded) { final ArrayList<Period> periods = new ArrayList<>(); <extra_id_0> if(periods.size() > 1) { periods.remove(0); } remainderSchedule = new ScheduleFromPeriods(schedule.getReferenceDate(), periods, schedule.getDaycountconvention()); } final SwapLeg floatLeg = new SwapLeg(remainderSchedule, forwardCurveName, 0.0, discountCurveName, false);