class IssuerProviderIssuerDecoratedSpreadPeriodic implements IssuerProviderInterface {

  @Override
  public double[] parameterSensitivity(final String name, final List<DoublesPair> pointSensitivity) {
    if (name.equals(getName(_issuer))) {
      int nPoints = pointSensitivity.size();
      List<DoublesPair> pointSensitivityNew = new ArrayList<>(nPoints);
      for (int i = 0; i < nPoints; ++i) {
        double time = pointSensitivity.get(i).getFirst();
        double eRovN = Math.pow(_issuerProvider.getDiscountFactor(_issuer, time), -1.0 / _nPeriodsPerYear / time);
        double factor = eRovN / (eRovN + _spread / _nPeriodsPerYear);
        pointSensitivityNew.add(DoublesPair.of(time, factor * pointSensitivity.get(i).getSecond()));
      }
      return _issuerProvider.parameterSensitivity(name, pointSensitivityNew);
    }
    return _issuerProvider.parameterSensitivity(name, pointSensitivity);
  }

  public  IssuerProviderIssuerDecoratedSpreadPeriodic(IssuerProviderInterface issuerProvider, LegalEntity issuer,
      double spread, int nPeriodsPerYear);

}