class CouponIborGearingDefinition extends CouponFloatingDefinition {

  @Override
  public CouponIborGearing toDerivative(final ZonedDateTime dateTime) {
    ArgumentChecker.notNull(dateTime, "date");
    final LocalDate dayConversion = dateTime.toLocalDate();
    ArgumentChecker.isTrue(!dayConversion.isAfter(getFixingDate().toLocalDate()),
        "Do not have any fixing data but are asking for a derivative after the fixing date " + getFixingDate() + " " + dateTime);
    ArgumentChecker.isTrue(!dayConversion.isAfter(getPaymentDate().toLocalDate()), "date is after payment date");
    final double paymentTime = TimeCalculator.getTimeBetween(dateTime, getPaymentDate());
    final double fixingTime = TimeCalculator.getTimeBetween(dateTime, getFixingDate());
    final double fixingPeriodStartTime = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodStartDate());
    final double fixingPeriodEndTime = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodEndDate());
    return new CouponIborGearing(getCurrency(), paymentTime, getPaymentYearFraction(), getNotional(), fixingTime, getIndex(), fixingPeriodStartTime, fixingPeriodEndTime,
        getFixingPeriodAccrualFactor(), _spread, _factor);
  }

  public  CouponIborGearingDefinition(final Currency currency, final ZonedDateTime paymentDate, final ZonedDateTime accrualStartDate, final ZonedDateTime accrualEndDate, final double accrualFactor,
      final double notional, final ZonedDateTime fixingDate, final IborIndex index, final double spread, final double factor, final Calendar calendar);
  public  CouponIborGearingDefinition(
      Currency currency,
      ZonedDateTime paymentDate,
      ZonedDateTime accrualStartDate,
      ZonedDateTime accrualEndDate,
      double accrualFactor,
      double notional,
      ZonedDateTime fixingDate,
      IborIndex index,
      ZonedDateTime fixingPeriodStartDate,
      ZonedDateTime fixingPeriodEndDate,
      double fixingPeriodAccrualFactor,
      double spread,
      double factor);

}