class BondTotalReturnSwapDefinition extends TotalReturnSwapDefinition {

  @Override
  public BondTotalReturnSwap toDerivative(final ZonedDateTime date, final ZonedDateTimeDoubleTimeSeries data) {
    final double effectiveTime = TimeCalculator.getTimeBetween(date, getEffectiveDate());
    final double terminationTime = TimeCalculator.getTimeBetween(date, getTerminationDate());
    final Annuity<? extends Payment> fundingLeg = getFundingLeg().toDerivative(date, data);
    BondFixedSecurity bond = getAsset().toDerivative(date, getEffectiveDate());
    return new BondTotalReturnSwap(effectiveTime, terminationTime, fundingLeg, bond, _quantity);
  }

  public  BondTotalReturnSwapDefinition(final ZonedDateTime effectiveDate, final ZonedDateTime terminationDate,
      final AnnuityDefinition<? extends PaymentDefinition> annuity,
      final BondFixedSecurityDefinition bond, final double quantity);

}