/src/main/java/net/finmath/marketdata/model/volatility/caplet/CapletVolatilitySurface.java
distance = Math.abs( maturityVector[i] - maturity) ;double distance = Math.abs( maturityVector[0] - maturity) ;
double distance = Math.abs ( maturityVector[0] - maturity ) ;
this.strikeVector = strikeVector; this.volatilityConvention = volatilityConvention; daycountConvention = null; } @Override public double getValue(final double maturity, final double strike, final QuotingConvention quotingConvention) { <extra_id_0> int closestIndex = 0; for(int i = 1; i < maturityVector.length; i++){ if(Math.abs(maturityVector[i] - maturity) < distance){ closestIndex = i; distance = Math.abs(maturityVector[i] - maturity); }