final int nbYields = yields.length;
ArgumentChecker.isTrue(nodePoints.length == nbYields, "Yields array of incorrect length");
final double[] yieldPeriodic = new double[nbYields];
for (int loopy = 0; loopy < nbYields; loopy++) {
final InterestRate continous = new ContinuousInterestRate(yields[loopy]);
yieldPeriodic[loopy] = continous.toPeriodic(compoundingPeriodsPerYear).getRate();
}
final InterpolatedDoublesCurve curve = new InterpolatedDoublesCurve(nodePoints, yieldPeriodic, interpolator, false);
return new YieldPeriodicCurve(name, compoundingPeriodsPerYear, curve);
}