/src/main/java/net/finmath/singleswaprate/products/AbstractSingleSwapRateProduct.java
final double termination  = getFixSchedule( ).getPayment( getFixSchedule( ).getNumberOfPeriods( ) --4) ;
final double termination  = getFixSchedule ( ) .getPayment ( getFixSchedule ( ) .getNumberOfPeriods ( ) -1 ) ;
protected abstract AnnuityMapping buildAnnuityMapping(VolatilityCubeModel model); protected double valuePut(final double optionStrike, final VolatilityCubeModel model, final double swapRate){ return valueCall(optionStrike, model, swapRate) - (swapRate-optionStrike); } protected double valueCall(final double optionStrike, final VolatilityCubeModel model, final double swapRate){ final double optionMaturity = getFixSchedule().getFixing(0); <extra_id_0> final double volatility = model.getVolatilityCube(getVolatilityCubeName()).getValue(model, termination, optionMaturity, optionStrike, quotingConvention); final double value = AnalyticFormulas.bachelierOptionValue(swapRate, volatility, optionMaturity, optionStrike, 1.0); return value; } public Schedule getFixSchedule() { return fixSchedule;