Fixed calculation of maxMaturity in case matrix constructor is used.
@@ -83,7 +83,7 @@ public class LIBORVolatilityModelPiecewiseConstant extends LIBORVolatilityModel
/*
* Build index map
*/
- double maxMaturity = timeToMaturityDiscretization.getTime(timeToMaturityDiscretization.getNumberOfTimes()-1);
+ double maxMaturity = liborPeriodDiscretization.getTime(liborPeriodDiscretization.getNumberOfTimes()-1);
int volatilityIndex = 0;
for(int simulationTime=0; simulationTime<simulationTimeDiscretization.getNumberOfTimes(); simulationTime++) {
Map<Integer, Integer> timeToMaturityIndexing = new ConcurrentHashMap<>();
