class OvernightCompoundedAnnualRateComputation implements OvernightRateComputation, ImmutableBean, Serializable {

  public static OvernightCompoundedAnnualRateComputation of(
      OvernightIndex index,
      LocalDate startDate,
      LocalDate endDate,
      ReferenceData refData) {

    return OvernightCompoundedAnnualRateComputation.builder()
        .index(index)
        .fixingCalendar(index.getFixingCalendar().resolve(refData))
        .startDate(index.calculateFixingFromEffective(startDate, refData))
        .endDate(index.calculateFixingFromEffective(endDate, refData))
        .build();
  }

  private  OvernightCompoundedAnnualRateComputation(
      OvernightIndex index,
      HolidayCalendar fixingCalendar,
      LocalDate startDate,
      LocalDate endDate);

}