/src/main/java/net/finmath/montecarlo/interestrate/products/Caplet.java
final RandomVariable numeraireAtValuationTime  = model.getNumeraire( evaluationTime) ;final RandomVariable monteCarloProbabilitiesAtValuationTime = model.getMonteCarloWeights( evaluationTime) ;
final RandomVariable monteCarloProbabilitiesAtValuationTime = model.getMonteCarloWeights ( evaluationTime ) ;
values = values.sub(strike).floor(0.0).mult(daycountFraction); } else { values = values.sub(strike).cap(0.0).mult(-1.0 * daycountFraction); } values = values.div(numeraire).mult(monteCarloProbabilities); final RandomVariable numeraireAtValuationTime = model.getNumeraire(evaluationTime); <extra_id_0> values = values.mult(numeraireAtValuationTime).div(monteCarloProbabilitiesAtValuationTime); if(valueUnit == ValueUnit.VALUE) { return values; } else if(valueUnit == ValueUnit.LOGNORMALVOLATILITY || valueUnit == ValueUnit.VOLATILITY) { final double discountFactor = monteCarloProbabilities.div(numeraire).mult(numeraireAtValuationTime).div(monteCarloProbabilitiesAtValuationTime).getAverage();