Examples of curveToNodeSensitivity()


Examples of com.opengamma.analytics.financial.interestrate.NodeYieldSensitivityCalculator.curveToNodeSensitivity()

    final double settlement = derivative.accept(SETTLEMENT_CALCULATOR);
    final double sens = calcDiscountRateSensitivity(derivative, market);

    final NodeYieldSensitivityCalculator distributor = PresentValueNodeSensitivityCalculator.getDefaultInstance();
    final List<Double> result = distributor.curveToNodeSensitivity(Arrays.asList(DoublesPair.of(settlement, sens)), discCrv);
    return new DoubleMatrix1D(result.toArray(new Double[result.size()]));
  }

  /**
   * This calculates the sensitivity of the present value (PV) to the lognormal Black implied volatilities at the knot points of the surface. <p>
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.NodeYieldSensitivityCalculator.curveToNodeSensitivity()

    bumpedMarket = new SimpleFutureDataBundle(discCrv.withSingleShift(settlement, -SHIFT), dataBundle.getMarketPrice(),
        dataBundle.getSpotValue(), dataBundle.getDividendYield(), dataBundle.getCostOfCarry());
    final double pvDown = future.accept(_presentValueCalculator, bumpedMarket);
    final double sensitivity = (pvUp - pvDown) / (2.0 * SHIFT);
    final NodeYieldSensitivityCalculator distributor = PresentValueNodeSensitivityCalculator.getDefaultInstance();
    final List<Double> result = distributor.curveToNodeSensitivity(Arrays.asList(DoublesPair.of(settlement, sensitivity)), discCrv);
    return new DoubleMatrix1D(result.toArray(new Double[result.size()]));
  }

  @Override
  public DoubleMatrix1D visit(final InstrumentDerivative derivative) {
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.NodeYieldSensitivityCalculator.curveToNodeSensitivity()

    }
    final double settlement = swap.getTimeToSettlement();
    final double sens = calcDiscountRateSensitivity(swap, market);

    final NodeYieldSensitivityCalculator distributor = PresentValueNodeSensitivityCalculator.getDefaultInstance();
    final List<Double> result = distributor.curveToNodeSensitivity(Arrays.asList(DoublesPair.of(settlement, sens)), (YieldCurve) discCrv);
    return new DoubleMatrix1D(result.toArray(new Double[result.size()]));
  }

  /**
   * This calculates the derivative of the present value (PV) with respect to the level of the fair value of variance
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.NodeYieldSensitivityCalculator.curveToNodeSensitivity()

    final YieldCurve discCrv = (YieldCurve) dataBundle.getFundingCurve();
    final double settlement = future.accept(SETTLEMENT_TIME);
    final double rhoSettle = -1 * settlement * future.accept(_presentValueCalculator, dataBundle);
    //  We use PresentValueNodeSensitivityCalculator to distribute this risk across the curve
    final NodeYieldSensitivityCalculator distributor = PresentValueNodeSensitivityCalculator.getDefaultInstance();
    final List<Double> result = distributor.curveToNodeSensitivity(Arrays.asList(DoublesPair.of(settlement, rhoSettle)), discCrv);
    return new DoubleMatrix1D(result.toArray(new Double[result.size()]));

  }

  @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.