@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _curve.hashCode(); return result; }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _ccyPair.hashCode(); result = prime * result + _forwardPoints.hashCode(); result = prime * result + _multicurveProvider.hashCode(); return result; }
@Override public double[] getInterestRateParameterSensitivity(double time) { Double[] dfSensitivity = _curve.getYValueParameterSensitivity(time); double[] rSensitivity = new double[dfSensitivity.length]; double df = getDiscountFactor(time); for (int loopp = 0; loopp < dfSensitivity.length; loopp++) { rSensitivity[loopp] = -dfSensitivity[loopp] / (time * df); } return rSensitivity; }
@Override public double getDiscountFactor(final double t) { return _curve.getYValue(t); }
/** * Builder from a DoublesCurve using the name of the DoublesCurve as the name of the * DiscountCurve. * * @param discountFactorCurve The underlying curve based on discount factors. * @return The discount curve. */ public static DiscountCurve from(final DoublesCurve discountFactorCurve) { ArgumentChecker.notNull(discountFactorCurve, "Curve"); return new DiscountCurve(discountFactorCurve.getName(), discountFactorCurve); }
@Override public int getNumberOfParameters() { return _curve.size(); }