public Double evaluate(final Double x) {
return (Math.abs(x - t) < 3.0e-6 ? eps : 0.0); //100 second tolerance
}
};
final YieldAndDiscountCurve blipCurve = YieldCurve.from(new FunctionalDoublesCurve(blip));
final YieldAndDiscountCurve originalCurve = curves.getCurve(curveName);
final YieldAndDiscountCurve upCurve = new YieldAndDiscountAddZeroSpreadCurve("UpCurve", false, originalCurve, blipCurve);
final YieldAndDiscountCurve downCurve = new YieldAndDiscountAddZeroSpreadCurve("DownCurve", true, originalCurve, blipCurve);
curves.replaceCurve(curveName, upCurve);
final double up = method.presentValue(ird, curves).getAmount();
curves.replaceCurve(curveName, downCurve);
final double down = method.presentValue(ird, curves).getAmount();