class NormalSwaptionExpiryStrikeVolatilities implements NormalSwaptionVolatilities, ImmutableBean, Serializable {

  @Override
  public double tenor(LocalDate startDate, LocalDate endDate) {
    // rounded number of months. the rounding is to ensure that an integer number of year even with holidays/leap year
    return Math.round((endDate.toEpochDay() - startDate.toEpochDay()) / 365.25 * 12) / 12;
  }

  @ImmutableConstructor private  NormalSwaptionExpiryStrikeVolatilities(
      FixedIborSwapConvention convention,
      ZonedDateTime valuationDateTime,
      Surface surface);

}