Examples of presentValue()


Examples of com.opengamma.analytics.financial.equity.option.EquityIndexOptionBlackMethod.presentValue()

    final double rhoSettle;
    //FIXME
    if (derivative instanceof EquityIndexOption) {
      settle = ((EquityIndexOption) derivative).getTimeToSettlement();
      final EquityIndexOptionBlackMethod model = EquityIndexOptionBlackMethod.getInstance();
      rhoSettle = -1 * settle * model.presentValue((EquityIndexOption) derivative, market);
    } else {
      settle = ((EquityOption) derivative).getTimeToSettlement();
      final EquityOptionBlackMethod model = EquityOptionBlackMethod.getInstance();
      rhoSettle = -1 * settle * model.presentValue((EquityOption) derivative, market);
    }
View Full Code Here

Examples of com.opengamma.analytics.financial.equity.option.EquityOptionBlackMethod.presentValue()

      final EquityIndexOptionBlackMethod model = EquityIndexOptionBlackMethod.getInstance();
      rhoSettle = -1 * settle * model.presentValue((EquityIndexOption) derivative, market);
    } else {
      settle = ((EquityOption) derivative).getTimeToSettlement();
      final EquityOptionBlackMethod model = EquityOptionBlackMethod.getInstance();
      rhoSettle = -1 * settle * model.presentValue((EquityOption) derivative, market);
    }
    //  We use PresentValueNodeSensitivityCalculator to distribute this risk across the curve
    final NodeYieldSensitivityCalculator distributor = PresentValueNodeSensitivityCalculator.getDefaultInstance();
    // What's left is to package up the inputs to the distributor, a YieldCurveBundle and a Map of Sensitivities
    final Map<String, List<DoublesPair>> curveSensMap = new HashMap<>();
View Full Code Here

Examples of com.opengamma.analytics.financial.equity.variance.pricing.VarianceSwapStaticReplication.presentValue()

  public Double calcDiscountRateSensitivity(final VarianceSwap swap, final StaticReplicationDataBundle market, final double shift) {
    ArgumentChecker.notNull(market, "market");
    ArgumentChecker.notNull(swap, "swap");
    // Sensitivity from the discounting
    final VarianceSwapStaticReplication pricer = new VarianceSwapStaticReplication();
    final double pv = pricer.presentValue(swap, market);
    final double timeToSettlement = swap.getTimeToSettlement();

    // Sensitivity from forward projection
    final double fwdSens = calcForwardSensitivity(swap, market, shift);
    final double fwd = market.getForwardCurve().getForward(timeToSettlement);
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.bond.method.BondSecurityDiscountingMethod.presentValue()

  @Override
  public Double visitBondFixedSecurity(final BondFixedSecurity bond, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
    ArgumentChecker.notNull(bond, "bond");
    final BondSecurityDiscountingMethod method = BondSecurityDiscountingMethod.getInstance();
    return method.presentValue(bond, curves);
  }

  @Override
  public Double visitBondFixedTransaction(final BondFixedTransaction bond, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.bond.method.BondSecurityDiscountingMethod.presentValue()

  @Override
  public Double visitBondIborSecurity(final BondIborSecurity bond, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
    ArgumentChecker.notNull(bond, "bond");
    final BondSecurityDiscountingMethod method = BondSecurityDiscountingMethod.getInstance();
    return method.presentValue(bond, curves);
  }

  @Override
  public Double visitBondIborTransaction(final BondIborTransaction bond, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.bond.method.BondTransactionDiscountingMethod.presentValue()

  @Override
  public Double visitBondFixedTransaction(final BondFixedTransaction bond, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
    ArgumentChecker.notNull(bond, "bond");
    final BondTransactionDiscountingMethod method = BondTransactionDiscountingMethod.getInstance();
    return method.presentValue(bond, curves);
  }

  @Override
  public Double visitBondIborSecurity(final BondIborSecurity bond, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.bond.method.BondTransactionDiscountingMethod.presentValue()

  @Override
  public Double visitBondIborTransaction(final BondIborTransaction bond, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
    ArgumentChecker.notNull(bond, "bond");
    final BondTransactionDiscountingMethod method = BondTransactionDiscountingMethod.getInstance();
    return method.presentValue(bond, curves);
  }

  // -----     Payment/Coupon     ------

  @Override
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.future.method.BondFutureDiscountingMethod.presentValue()

  @Override
  public Double visitBondFuture(final BondFuture bondFuture, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
    ArgumentChecker.notNull(bondFuture, "bond future");
    final BondFutureDiscountingMethod method = BondFutureDiscountingMethod.getInstance();
    return method.presentValue(bondFuture, curves).getAmount();
  }

  @Override
  public Double visitGenericAnnuity(final Annuity<? extends Payment> annuity, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.future.method.InterestRateFutureTransactionDiscountingMethod.presentValue()

  @Override
  public Double visitInterestRateFutureTransaction(final InterestRateFutureTransaction future, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
    ArgumentChecker.notNull(future, "future");
    final InterestRateFutureTransactionDiscountingMethod method = InterestRateFutureTransactionDiscountingMethod.getInstance();
    return method.presentValue(future, curves).getAmount();
  }

  @Override
  public Double visitSwap(final Swap<?, ?> swap, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "curves");
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.method.CapFloorCMSSABRReplicationMethod.presentValue()

    Validate.notNull(curves);
    Validate.notNull(payment);
    if (curves instanceof SABRInterestRateDataBundle) {
      final SABRInterestRateDataBundle sabrBundle = (SABRInterestRateDataBundle) curves;
      final CapFloorCMSSABRReplicationMethod replication = CapFloorCMSSABRReplicationMethod.getDefaultInstance();
      return replication.presentValue(payment, sabrBundle).getAmount();
    }
    throw new UnsupportedOperationException("The PresentValueSABRCalculator visitor visitCapFloorCMS requires a SABRInterestRateDataBundle as data.");
  }

  @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.