/src/main/java/net/finmath/montecarlo/interestrate/products/CMSOption.java
for( int period=fixingates.length-1; period>=0; period--) {
for ( int period=fixingDates.length-1; period>=0; period-- ) {
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); RandomVariable valueFloatLeg = new RandomVariableFromDoubleArray(paymentDates[paymentDates.length-1], -1.0); <extra_id_0> 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); final RandomVariable payoff = new RandomVariableFromDoubleArray(paymentDate, 1.0 * periodLength); valueFixLeg = valueFixLeg.add(payoff);