class BondFuturesSecurityDefinition extends FuturesSecurityDefinition<BondFuturesSecurity> {

  @Override
  public BondFuturesSecurity toDerivative(final ZonedDateTime date) {
    ArgumentChecker.notNull(date, "date");
    ArgumentChecker.isTrue(!date.toLocalDate().isAfter(getNoticeLastDate().toLocalDate()), "Date is after last notice date");
    final double lastTradingTime = TimeCalculator.getTimeBetween(date, getLastTradingDate());
    final double firstNoticeTime = TimeCalculator.getTimeBetween(date, getNoticeFirstDate());
    final double lastNoticeTime = TimeCalculator.getTimeBetween(date, getNoticeLastDate());
    final double firstDeliveryTime = TimeCalculator.getTimeBetween(date, getDeliveryFirstDate());
    final double lastDeliveryTime = TimeCalculator.getTimeBetween(date, getDeliveryLastDate());
    final BondFixedSecurity[] basketAtDeliveryDate = new BondFixedSecurity[_deliveryBasket.length];
    final BondFixedSecurity[] basketAtSpotDate = new BondFixedSecurity[_deliveryBasket.length];
    for (int loopbasket = 0; loopbasket < _deliveryBasket.length; loopbasket++) {
      basketAtDeliveryDate[loopbasket] = _deliveryBasket[loopbasket].toDerivative(date, _deliveryLastDate);
      basketAtSpotDate[loopbasket] = _deliveryBasket[loopbasket].toDerivative(date);
    }
    return new BondFuturesSecurity(lastTradingTime, firstNoticeTime, lastNoticeTime, firstDeliveryTime, lastDeliveryTime, _notional,
        basketAtDeliveryDate, basketAtSpotDate, _conversionFactor);
  }

  public  BondFuturesSecurityDefinition(final ZonedDateTime tradingLastDate, final ZonedDateTime noticeFirstDate, final ZonedDateTime noticeLastDate,
      final ZonedDateTime deliveryFirstDate, final ZonedDateTime deliveryLastDate,
      final double notional, final BondFixedSecurityDefinition[] deliveryBasket, final double[] conversionFactor);
  public  BondFuturesSecurityDefinition(final ZonedDateTime tradingLastDate, final ZonedDateTime noticeFirstDate, final ZonedDateTime noticeLastDate, final double notional,
      final BondFixedSecurityDefinition[] deliveryBasket, final double[] conversionFactor);

}