}
times[n - 2] = LocalDate.ofEpochDay(n - 2);
data[n - 2] = 0;
times[n - 1] = LocalDate.ofEpochDay(n - 1);
data[n - 1] = RANDOM.nextDouble();
final LocalDateDoubleTimeSeries priceTS = ImmutableLocalDateDoubleTimeSeries.of(times, data);
final LocalDateDoubleTimeSeries returnTS = ImmutableLocalDateDoubleTimeSeries.of(Arrays.copyOfRange(times, 1, n - 2), returns);
final TimeSeriesReturnCalculator strict = new SimpleGrossTimeSeriesReturnCalculator(CalculationMode.STRICT);
final LocalDateDoubleTimeSeries[] tsArray = new LocalDateDoubleTimeSeries[] {priceTS};
try {
strict.evaluate(tsArray);
Assert.fail();