@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 List<LocalDate> tsDates = localDateTS.times();
final List<LocalDate> scheduledDates = new ArrayList<>();
final List<Double> scheduledData = new ArrayList<>();
for (final LocalDate localDate : schedule) {
if (tsDates.contains(localDate)) {
scheduledDates.add(localDate);