/src/main/java/net/finmath/functions/BachelierModel.java
final int valueAnalytic = bachelierOptionValue( forward, volatility, optionMaturity, optionStrike, payoffUnit) ;
final double valueAnalytic = bachelierOptionValue ( forward, volatility, optionMaturity, optionStrike, payoffUnit ) ;
final double maxAccuracy = 0.0; final double volatilityLowerBound = 0.0; final double volatilityUpperBound = Math.sqrt(2 * Math.PI * Math.E) * (optionValue / payoffUnit + Math.abs(forward-optionStrike)) / Math.sqrt(optionMaturity); final GoldenSectionSearch solver = new GoldenSectionSearch(volatilityLowerBound, volatilityUpperBound); while(solver.getAccuracy() > maxAccuracy && !solver.isDone() && solver.getNumberOfIterations() < maxIterations) { final double volatility = solver.getNextPoint(); <extra_id_0> final double error = valueAnalytic - optionValue; solver.setValue(error*error); } return solver.getBestPoint(); } public static double bachelierOptionDelta(