class BondCapitalIndexedSecurityDiscountingMethod {

  public double cleanNominalPriceFromDirtyNominalPrice(final BondCapitalIndexedSecurity<?> bond, final double dirtyPrice) {
    final double notional = bond.getCoupon().getNthPayment(0).getNotional();
    final double indexRatio = bond.getIndexRatio();
    return dirtyPrice - bond.getAccruedInterest() / notional * indexRatio;
  }

}