class InflationEndInterpolatedRateComputation implements RateComputation, ImmutableBean, Serializable {

  public static InflationEndInterpolatedRateComputation of(
      PriceIndex index,
      double startIndexValue,
      YearMonth referenceEndMonth,
      double weight) {

    return new InflationEndInterpolatedRateComputation(
        startIndexValue,
        PriceIndexObservation.of(index, referenceEndMonth),
        PriceIndexObservation.of(index, referenceEndMonth.plusMonths(1)),
        weight);
  }

  private  InflationEndInterpolatedRateComputation(
      double startIndexValue,
      PriceIndexObservation endObservation,
      PriceIndexObservation endSecondObservation,
      double weight);

}