final ZonedDateTime startDate = security.getStartDate();
final ZonedDateTime endDate = security.getMaturityDate();
final ConventionBundle convention = _conventionSource.getConventionBundle(ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, currency.getCode() + "_ZERO_DEPOSIT"));
final DayCount daycount = convention.getDayCount();
final InterestRate rate = new PeriodicInterestRate(security.getRate(), (int) security.getCompoundingPeriodsPerYear());
final Calendar calendar = new HolidaySourceCalendarAdapter(_holidaySource, currency);
return DepositZeroDefinition.from(currency, startDate, endDate, daycount, rate, calendar);
}