@Override
public LocalDateDoubleTimeSeries getSampledTimeSeries(final DateDoubleTimeSeries<?> ts, final LocalDate[] schedule) {
ArgumentChecker.notNull(ts, "time series");
ArgumentChecker.notNull(schedule, "schedule");
final LocalDateDoubleTimeSeries localDateTS = ImmutableLocalDateDoubleTimeSeries.of(ts);
final LocalDate[] tsDates = localDateTS.timesArray();
final double[] values = localDateTS.valuesArrayFast();
final List<LocalDate> scheduledDates = new ArrayList<>();
final List<Double> scheduledData = new ArrayList<>();
int dateIndex = 0;
for (final LocalDate localDate : schedule) {