TimeSeriesWeightedVolatilityOperator extends Function1D<DateDoubleTimeSeries<?>, DateDoubleTimeSeries<?>> { public static TimeSeriesWeightedVolatilityOperator relative(double lambda) { return new TimeSeriesWeightedVolatilityOperator(RELATIVE_CHANGE, lambda, DEFAULT_SEED_LENGTH); } TimeSeriesWeightedVolatilityOperator(
      Function1D<DateDoubleTimeSeries<?>, DateDoubleTimeSeries<?>> returnOperator, 
      double lambda,
      int seedLength); @Override DateDoubleTimeSeries<?> evaluate(DateDoubleTimeSeries<?> ts); static TimeSeriesWeightedVolatilityOperator relative(double lambda); static TimeSeriesWeightedVolatilityOperator absolute(double lambda);  }
@Test(expectedExceptions = IllegalArgumentException.class) public void incorrectLambda0Exception() { TimeSeriesWeightedVolatilityOperator.relative(0.0); }
@Test(expectedExceptions = IllegalArgumentException.class) public void incorrectLambda1Exception() { TimeSeriesWeightedVolatilityOperator.relative(1.0); }