Package com.opengamma.financial.security.swap

Examples of com.opengamma.financial.security.swap.Notional


  @Override
  public Set<Pair<String, ValueProperties>> visitSwapSecurity(final SwapSecurity security) {
    final ImmutableSet.Builder<Pair<String, ValueProperties>> builder = ImmutableSet.<Pair<String, ValueProperties>>builder();

    // At the moment pay and receive must be the same currency, so any one of them is sufficient
    final Notional payNotional = security.getPayLeg().getNotional();
    final Notional receiveNotional = security.getReceiveLeg().getNotional();
    if (payNotional instanceof InterestRateNotional && receiveNotional instanceof InterestRateNotional) {
      final Currency ccy = ((InterestRateNotional) payNotional).getCurrency();
      builder.add(getYieldCurveNodeSensitivities(getFundingCurve(), ccy));
      builder.add(getYieldCurveNodeSensitivities(getForwardCurve(ccy), ccy));
      final InterestRateInstrumentType type = SwapSecurityUtils.getSwapType(security);
View Full Code Here


    }
  }

  private com.opengamma.financial.security.swap.SwapLeg convertFixedLeg(FixedLeg fixedLeg) {

    Notional notional = extractNotional(fixedLeg);

    DayCount dayCount = DayCountFactory.INSTANCE.getDayCount(fixedLeg.getDayCount());
    Frequency frequency = SimpleFrequencyFactory.INSTANCE.getFrequency(fixedLeg.getFrequency());
    ExternalId region = extractRegion(fixedLeg);
    BusinessDayConvention businessDayConvention =
View Full Code Here

        convertRate(fixedLeg.getRate()));
  }

  private com.opengamma.financial.security.swap.SwapLeg convertFloatingLeg(FloatingLeg floatingLeg) {

    Notional notional = extractNotional(floatingLeg);

    ExternalId region = extractRegion(floatingLeg);
    DayCount dayCount = DayCountFactory.INSTANCE.getDayCount(floatingLeg.getDayCount());
    Frequency frequency = SimpleFrequencyFactory.INSTANCE.getFrequency(floatingLeg.getFrequency());
    BusinessDayConvention businessDayConvention =
View Full Code Here

  private ForwardSwapSecurity createForwardSwapSecurity() {
    final ZonedDateTime tradeDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().plusMonths(23);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(25);
    final String counterparty = "counterparty";
    final Notional notional = interestRateNotional();
    final boolean payLegFixed = bool();
    final SwapLeg payLeg = payLegFixed ? fixedInterestRateLeg(notional) : floatingInterestRateLeg(notional);
    final SwapLeg receiveLeg = payLegFixed ? floatingInterestRateLeg(notional) : fixedInterestRateLeg(notional);
    final ZonedDateTime forwardStartDate = ZonedDateTime.now().plusMonths(12);
    final ForwardSwapSecurity security = new ForwardSwapSecurity(tradeDate, effectiveDate, maturityDate, counterparty, payLeg, receiveLeg, forwardStartDate);
View Full Code Here

  private SwapSecurity createSwapSecurity() {
    final ZonedDateTime tradeDate = ZonedDateTime.now().minusMonths(6);
    final ZonedDateTime effectiveDate = ZonedDateTime.now().plusMonths(23);
    final ZonedDateTime maturityDate = ZonedDateTime.now().plusMonths(25);
    final String counterparty = "counterparty";
    final Notional notional = interestRateNotional();
    final boolean payLegFixed = bool();
    final SwapLeg payLeg = payLegFixed ? fixedInterestRateLeg(notional) : floatingInterestRateLeg(notional);
    final SwapLeg receiveLeg = payLegFixed ? floatingInterestRateLeg(notional) : fixedInterestRateLeg(notional);
    final SwapSecurity security = new SwapSecurity(tradeDate, effectiveDate, maturityDate, counterparty, payLeg, receiveLeg);
    store(security);
View Full Code Here

TOP

Related Classes of com.opengamma.financial.security.swap.Notional

Copyright © 2018 www.massapicom. 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.