Example #1
0
 @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;
 }
Example #3
0
 @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;
 }
Example #4
0
 @Override
 public double getDiscountFactor(final double t) {
   return _curve.getYValue(t);
 }
Example #5
0
 /**
  * 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);
 }
Example #6
0
 @Override
 public int getNumberOfParameters() {
   return _curve.size();
 }