class TimeSeriesReturnCalculatorFactory {

  public static TimeSeriesReturnCalculator getReturnCalculator(final String calculatorName) {
    if (s_staticLenientInstances.containsKey(calculatorName)) {
      return s_staticLenientInstances.get(calculatorName);
    }
    if (s_staticStrictInstances.containsKey(calculatorName)) {
      return s_staticStrictInstances.get(calculatorName);
    }
    throw new IllegalArgumentException("Do not have calculator for " + calculatorName);
  }

}