class IborIndexObservation implements IndexObservation, ImmutableBean, Serializable {

  public static IborIndexObservation of(
      IborIndex index,
      LocalDate fixingDate,
      ReferenceData refData) {

    LocalDate effectiveDate = index.calculateEffectiveFromFixing(fixingDate, refData);
    LocalDate maturityDate = index.calculateMaturityFromEffective(effectiveDate, refData);
    double yearFraction = index.getDayCount().yearFraction(effectiveDate, maturityDate);
    return new IborIndexObservation(index, fixingDate, effectiveDate, maturityDate, yearFraction);
  }

    IborIndexObservation(
      IborIndex index,
      LocalDate fixingDate,
      LocalDate effectiveDate,
      LocalDate maturityDate,
      double yearFraction);

}