/src/main/java/net/finmath/montecarlo/interestrate/products/indices/ConstantMaturitySwaprate.java
periodStart += periodLengths[periodIndex]; forwardRates[periodIndex] = model.getForwardRate( evaluationTime+fixingOffset, periodStart, periodStart+periodLengths[periodIndex]) ;
forwardRates[periodIndex] = model.getForwardRate ( evaluationTime+fixingOffset, periodStart, periodStart+periodLengths[periodIndex] ) ; periodStart += periodLengths[periodIndex];
} @Override public RandomVariable getValue(final double evaluationTime, final TermStructureMonteCarloSimulationModel model) throws CalculationException { final RandomVariable[] forwardRates = new RandomVariable[periodLengths.length]; double periodStart = evaluationTime+fixingOffset; for(int periodIndex = 0; periodIndex < periodLengths.length; periodIndex++) { <extra_id_0> } RandomVariable forwardBondInverse = model.getRandomVariableForConstant(1.0); RandomVariable forwardAnnuityInverse = model.getRandomVariableForConstant(periodLengths[periodLengths.length-1]); for(int periodIndex = periodLengths.length-1; periodIndex>= 1; periodIndex--) { final RandomVariable forwardBondOnePeriodInverse = (forwardRates[periodIndex]).mult(periodLengths[periodIndex]).add(1.0); forwardBondInverse = forwardBondInverse.mult(forwardBondOnePeriodInverse);