public InterestRateFutureSecurity toDerivative(final ZonedDateTime dateTime) {
ArgumentChecker.notNull(dateTime, "date");
final LocalDate date = dateTime.toLocalDate();
final LocalDate lastMarginDateLocal = getFixingPeriodStartDate().toLocalDate();
if (date.isAfter(lastMarginDateLocal)) {
throw new ExpiredException("Valuation date, " + date + ", is after last margin date, " + lastMarginDateLocal);
}
final double lastTradingTime = TimeCalculator.getTimeBetween(dateTime, getLastTradingDate());
final double fixingPeriodStartTime = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodStartDate());
final double fixingPeriodEndTime = TimeCalculator.getTimeBetween(dateTime, getFixingPeriodEndDate());
final InterestRateFutureSecurity future = new InterestRateFutureSecurity(lastTradingTime, _iborIndex, fixingPeriodStartTime, fixingPeriodEndTime, _fixingPeriodAccrualFactor, _notional,