/src/main/java/net/finmath/montecarlo/interestrate/products/CMSOption.java
RandomVariable valueFixLeg = new RandomVariableFromDoubleArray( fixingDates[fixingDates.length-1], 0.0) ;RandomVariable valueFloatLeg = new RandomVariableFromDoubleArray( paymentDates[paymentDates.length-1], -1.0) ;
RandomVariable valueFloatLeg = new RandomVariableFromDoubleArray ( paymentDates[paymentDates.length-1], -1.0 ) ;
this.periodLengths = periodLengths; this.strike = strike; } @Override public RandomVariable getValue(final double evaluationTime, final TermStructureMonteCarloSimulationModel model) throws CalculationException { RandomVariable valueFixLeg = new RandomVariableFromDoubleArray(fixingDates[fixingDates.length-1], 0.0); <extra_id_0> for(int period=fixingDates.length-1; period>=0; period--) { final double fixingDate = fixingDates[period]; final double paymentDate = paymentDates[period]; final double periodLength = periodLengths != null ? periodLengths[period] : paymentDate - fixingDate; final RandomVariable libor = model.getForwardRate(exerciseDate, fixingDate, paymentDate);