Examples of PaymentFixed


Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

  public InterestRateCurveSensitivity presentValueSensitivity(final BondIborTransaction bond, final YieldCurveBundle curves) {
    final InterestRateCurveSensitivity pvsNominal = new InterestRateCurveSensitivity(bond.getBondTransaction().getNominal().accept(PVSC, curves));
    final InterestRateCurveSensitivity pvsCoupon = new InterestRateCurveSensitivity(bond.getBondTransaction().getCoupon().accept(PVSC, curves));
    final double settlementAmount = bond.getTransactionPrice() * bond.getBondTransaction().getCoupon().getNthPayment(0).getNotional(); //FIXME: add accrued.
    LOGGER.error("The FRN settlement amount does not include the accrued interests.");
    final PaymentFixed settlement = new PaymentFixed(bond.getBondTransaction().getCurrency(), bond.getBondTransaction().getSettlementTime(), settlementAmount, bond.getBondTransaction()
        .getRepoCurveName());
    final InterestRateCurveSensitivity pvsSettlement = new InterestRateCurveSensitivity(settlement.accept(PVSC, curves));
    return pvsNominal.plus(pvsCoupon).multipliedBy(bond.getQuantity()).plus(pvsSettlement);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

      addcf(flow, p.getPaymentTime(), p.getAmount());
    }
    final PaymentFixed[] agregatedCfe = new PaymentFixed[flow.size()];
    int loopcf = 0;
    for (final double time : flow.keySet()) {
      agregatedCfe[loopcf++] = new PaymentFixed(ccy, time, flow.get(time), cfeLeg1.getDiscountCurve());
    }
    return new AnnuityPaymentFixed(agregatedCfe);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

      addcf(flow, p.getPaymentTime(), p.getAmount());
    }
    final PaymentFixed[] agregatedCfe = new PaymentFixed[flow.size()];
    int loopcf = 0;
    for (final double time : flow.keySet()) {
      agregatedCfe[loopcf++] = new PaymentFixed(ccy, time, flow.get(time), cfeCpn.getDiscountCurve());
    }
    return new AnnuityPaymentFixed(agregatedCfe);

  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

    ArgumentChecker.notNull(yieldCurveNames, "Curve names");
    ArgumentChecker.isTrue(yieldCurveNames.length > 1, "At least two curves required: credit and discounting");
    final BondFutureOptionPremiumSecurity option = _underlyingOption.toDerivative(date, yieldCurveNames);
    final double premiumTime = TimeCalculator.getTimeBetween(date, _premium.getPaymentDate());
    if (premiumTime < 0) { // Premium payment in the past: it is represented by a 0 payment today.
      return new BondFutureOptionPremiumTransaction(option, _quantity, new PaymentFixed(getCurrency(), 0, 0, yieldCurveNames[1]));
    }
    return new BondFutureOptionPremiumTransaction(option, _quantity, _premium.toDerivative(date, yieldCurveNames[1]));
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

  public BondFutureOptionPremiumTransaction toDerivative(final ZonedDateTime date) {
    ArgumentChecker.notNull(date, "Reference date");
    final BondFutureOptionPremiumSecurity option = _underlyingOption.toDerivative(date);
    final double premiumTime = TimeCalculator.getTimeBetween(date, _premium.getPaymentDate());
    if (premiumTime < 0) { // Premium payment in the past: it is represented by a 0 payment today.
      return new BondFutureOptionPremiumTransaction(option, _quantity, new PaymentFixed(getCurrency(), 0, 0));
    }
    return new BondFutureOptionPremiumTransaction(option, _quantity, _premium.toDerivative(date));
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

  public CurrencyAmount gammaSpot(final ForexOptionSingleBarrier optionForex, final YieldCurveBundle curves, final boolean directQuote) {
    ArgumentChecker.notNull(curves, "Curves");
    ArgumentChecker.isTrue(curves instanceof SmileDeltaTermStructureDataBundle, "Yield curve bundle should contain smile data");
    final SmileDeltaTermStructureDataBundle smile = (SmileDeltaTermStructureDataBundle) curves;
    final ForexOptionVanilla underlyingOption = optionForex.getUnderlyingOption();
    final PaymentFixed paymentCurrency2 = underlyingOption.getUnderlyingForex().getPaymentCurrency2();
    final double sign = (optionForex.getUnderlyingOption().isLong() ? 1.0 : -1.0);
    final double gammaDirect = gammaFd(optionForex, smile).getAmount() * sign;
    final double spot = smile.getFxRates().getFxRate(optionForex.getCurrency1(), optionForex.getCurrency2());
    if (directQuote) {
      return CurrencyAmount.of(paymentCurrency2.getCurrency(), gammaDirect);
    }
    final double deltaDirect = spotDeltaTheoretical(optionForex, curves) * sign;
    final double gamma = (gammaDirect * spot + 2 * deltaDirect) * spot * spot * spot;
    return CurrencyAmount.of(paymentCurrency2.getCurrency(), gamma);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

    _underlyingOption = underlyingOption;
    _quantity = quantity;
    _tradePrice = tradePrice;
    final double premiumAmount = -_tradePrice * _quantity * _underlyingOption.getUnderlyingFuture().getNotional() * _underlyingOption.getUnderlyingFuture().getPaymentAccrualFactor();
    try {
      _premium = new PaymentFixed(underlyingOption.getCurrency(), premiumTime, premiumAmount, underlyingOption.getDiscountingCurveName());
    } catch (final IllegalStateException e) {
      _premium = new PaymentFixed(underlyingOption.getCurrency(), premiumTime, premiumAmount);
    }
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

    final MulticurveProviderInterface multicurvesDecorated = new MulticurveProviderDiscountingDecoratedIssuer(issuerMulticurves, ccy, bond.getBondTransaction().getIssuer());
    final MultipleCurrencyAmount pvNominal = bond.getBondTransaction().getNominal().accept(PVDC, multicurvesDecorated);
    final MultipleCurrencyAmount pvCoupon = bond.getBondTransaction().getCoupon().accept(PVDC, multicurvesDecorated);
    final double settlementAmount = -(bond.getTransactionPrice() * bond.getBondTransaction().getCoupon().getNthPayment(0).getNotional() + bond.getBondTransaction().getAccruedInterest())
        * bond.getQuantity();
    final PaymentFixed settlement = new PaymentFixed(bond.getBondTransaction().getCurrency(), bond.getBondTransaction().getSettlementTime(), settlementAmount);
    final MultipleCurrencyAmount pvSettlement = settlement.accept(PVDC, issuerMulticurves.getMulticurveProvider());
    return pvNominal.plus(pvCoupon).multipliedBy(bond.getQuantity()).plus(pvSettlement);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

    final MulticurveProviderInterface multicurvesDecorated = new MulticurveProviderDiscountingDecoratedIssuer(issuerMulticurves, ccy, bond.getBondTransaction().getIssuer());
    final MultipleCurrencyAmount pvNominal = bond.getBondTransaction().getNominal().accept(PVDC, multicurvesDecorated);
    final MultipleCurrencyAmount pvCoupon = bond.getBondTransaction().getCoupon().accept(PVDC, multicurvesDecorated);
    final double settlementAmount = bond.getTransactionPrice() * bond.getBondTransaction().getCoupon().getNthPayment(0).getNotional(); //FIXME: add accrued.
    LOGGER.error("The FRN settlement amount does not include the accrued interests.");
    final PaymentFixed settlement = new PaymentFixed(bond.getBondTransaction().getCurrency(), bond.getBondTransaction().getSettlementTime(), settlementAmount);
    final MultipleCurrencyAmount pvSettlement = settlement.accept(PVDC, issuerMulticurves.getMulticurveProvider());
    return pvNominal.plus(pvCoupon).multipliedBy(bond.getQuantity()).plus(pvSettlement);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.interestrate.payments.derivative.PaymentFixed

    final MulticurveProviderInterface multicurvesDecorated = new MulticurveProviderDiscountingDecoratedIssuer(issuerMulticurves, ccy, bond.getBondTransaction().getIssuer());
    final MultipleCurrencyMulticurveSensitivity pvcsNominal = bond.getBondTransaction().getNominal().accept(PVSDC, multicurvesDecorated);
    final MultipleCurrencyMulticurveSensitivity pvcsCoupon = bond.getBondTransaction().getCoupon().accept(PVSDC, multicurvesDecorated);
    final double settlementAmount = -(bond.getTransactionPrice() * bond.getBondTransaction().getCoupon().getNthPayment(0).getNotional() + bond.getBondTransaction().getAccruedInterest())
        * bond.getQuantity();
    final PaymentFixed settlement = new PaymentFixed(bond.getBondTransaction().getCurrency(), bond.getBondTransaction().getSettlementTime(), settlementAmount);
    final MultipleCurrencyMulticurveSensitivity pvcsSettlement = settlement.accept(PVSDC, issuerMulticurves.getMulticurveProvider());
    return pvcsNominal.plus(pvcsCoupon).multipliedBy(bond.getQuantity()).plus(pvcsSettlement);
  }
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.