Package com.opengamma.financial.security.swap

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


    final DayCount dayCount = security.getDayCount();
    final BusinessDayConvention businessDayConvention = security.getBusinessDayConvention();
    final boolean immAdjustMaturityDate = security.isImmAdjustMaturityDate();
    final boolean adjustEffectiveDate = security.isAdjustEffectiveDate();
    final boolean adjustMaturityDate = security.isAdjustMaturityDate();
    final InterestRateNotional notional = security.getNotional();
    final Currency currency = notional.getCurrency();
    final DebtSeniority debtSeniority = security.getDebtSeniority();
    final RestructuringClause restructuringClause = security.getRestructuringClause();
    final double amount = notional.getAmount();
    final double recoveryRate = _recoveryRate;
    final boolean includeAccruedPremium = security.isIncludeAccruedPremium();
    final boolean protectionStart = security.isProtectionStart();
    final double quotedSpread = security.getQuotedSpread();
    final StandardCDSCoupon premiumLegCoupon = getCoupon(security.getCoupon());
View Full Code Here


    final DayCount dayCount = security.getDayCount();
    final BusinessDayConvention businessDayConvention = security.getBusinessDayConvention();
    final boolean immAdjustMaturityDate = security.isImmAdjustMaturityDate();
    final boolean adjustEffectiveDate = security.isAdjustEffectiveDate();
    final boolean adjustMaturityDate = security.isAdjustMaturityDate();
    final InterestRateNotional notional = security.getNotional();
    final Currency currency = notional.getCurrency();
    final DebtSeniority debtSeniority = security.getDebtSeniority();
    final RestructuringClause restructuringClause = security.getRestructuringClause();
    final double amount = notional.getAmount();
    final double recoveryRate = _recoveryRate;
    final boolean includeAccruedPremium = security.isIncludeAccruedPremium();
    final boolean protectionStart = security.isProtectionStart();
    final StubType stubType = security.getStubType().toAnalyticsType();
    final double parSpread = security.getParSpread();
View Full Code Here

                                                            ExternalId.of("EXTERNAL_CODE" ,"ProtSeller"), ExternalSchemes.markItRedCode(redcode),
                                                            DebtSeniority.SNRFOR, RestructuringClause.MM, ExternalSchemes.financialRegionId("US"),
                                                            createZdt(2013, 3, 20), createZdt(2013, 3, 21), createZdt(2014,3,20), StubType.SHORT_START,
                                                            SimpleFrequency.SEMI_ANNUAL, DayCountFactory.INSTANCE.getDayCount("Actual/360"),
                                                            BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"),
                                                            true, true, true, new InterestRateNotional(Currency.USD, 10000000), true, true, 500,
                                                            new InterestRateNotional(Currency.USD, 500000), 500, createZdt(2013,3,21), true);
  }
View Full Code Here

                                                                    ExternalId.of("EXTERNAL_CODE" ,"ProtSeller"), ExternalSchemes.markItRedCode("39FF64"),
                                                                    DebtSeniority.SNRFOR, RestructuringClause.MM, ExternalSchemes.financialRegionId("US"),
                                                                    createZdt(2013, 3, 20), createZdt(2013, 3, 21), createZdt(2014,3,20), StubType.SHORT_START,
                                                                    SimpleFrequency.SEMI_ANNUAL, DayCountFactory.INSTANCE.getDayCount("Actual/360"),
                                                                    BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"),
                                                                    true, true, true, new InterestRateNotional(Currency.USD, 10000000), true, true, 500,
                                                                    new InterestRateNotional(Currency.USD, 500000), 500, createZdt(2013,3,21), true);
    ExternalId secId = ExternalId.of("SEC_ID", "12345");
    cds.addExternalId(secId);
    document.setSecurity(cds);
    _securityMaster.add(document);
View Full Code Here

      final int swaptionYears = 1 + rng.nextInt(9);
      final ZonedDateTime swaptionExpiry = date.plusYears(swaptionYears);
      final int swapYears = 1 + rng.nextInt(28);
      final ZonedDateTime swapMaturity = swaptionExpiry.plusMonths(swapYears);
      final double amount = 100000 * (1 + rng.nextInt(30));
      final InterestRateNotional notional = new InterestRateNotional(currency, amount);
      final double rate = swapYears * rng.nextDouble() / 500;
      final Frequency frequency = currency.equals(Currency.USD) ? PeriodFrequency.QUARTERLY : PeriodFrequency.SEMI_ANNUAL;
      final SwapLeg fixedLeg = new FixedInterestRateLeg(DAY_COUNT, PeriodFrequency.SEMI_ANNUAL, region, BDC, notional, false, rate);
      final SwapLeg floatLeg = new FloatingInterestRateLeg(DAY_COUNT, frequency, region, BDC, notional, false, floatingRate, FloatingRateType.IBOR);
      final SwapLeg payLeg, receiveLeg;
      final String swapName, swaptionName;
      final boolean isLong = rng.nextBoolean();
      final boolean isCashSettled = rng.nextBoolean();
      final boolean payer;
      if (rng.nextBoolean()) {
        payLeg = fixedLeg;
        receiveLeg = floatLeg;
        swapName = swapYears + "Y pay " + currency + " " + notional.getAmount() + " @ " + STRIKE_FORMATTER.format(rate);
        swaptionName = (isLong ? "Long " : "Short ") + swaptionYears + "Y x " + swapYears + "Y pay " + currency + " " + notional.getAmount() + " @ " + STRIKE_FORMATTER.format(rate);
        payer = true;
      } else {
        payLeg = floatLeg;
        receiveLeg = fixedLeg;
        swapName = swapYears + "Y receive " + currency + " " + notional.getAmount() + " @ " + STRIKE_FORMATTER.format(rate);
        swaptionName = (isLong ? "Long " : "Short ") + swaptionYears + "Y x " + swapYears + "Y receive " + currency + " " + notional.getAmount() + " @ " + STRIKE_FORMATTER.format(rate);
        payer = false;
      }
      final SwapSecurity swap = new SwapSecurity(swaptionExpiry, swaptionExpiry.plusDays(2), swapMaturity, COUNTER_PARTY_OPT, payLeg, receiveLeg);
      swap.setName(swapName);
      final SecurityDocument toAddDoc = new SecurityDocument();
View Full Code Here

  private MySecurityGenerator<ManageableSecurity> getVanillaSwapSecurityGenerator() {
    final ZonedDateTime tradeDate = DateUtils.previousWeekDay().atStartOfDay(ZoneOffset.UTC);
    final ZonedDateTime effectiveDate = tradeDate;
    final SwapSecurity[] securities = new SwapSecurity[N_VANILLA_SWAPS];
    for (int i = 0; i < N_VANILLA_SWAPS; i++) {
      final InterestRateNotional notional = new InterestRateNotional(CURRENCY, 10000000 * (1 + RANDOM.nextInt(9)));
      final int years = 1 + RANDOM.nextInt(30);
      final ZonedDateTime maturityDate = tradeDate.plusYears(years);
      final double rate = years * 0.001 + RANDOM.nextDouble() / 5000;
      final FixedInterestRateLeg fixedLeg = new FixedInterestRateLeg(ACT_360, SEMI_ANNUAL, REGION, MODIFIED_FOLLOWING, notional, false, rate);
      final Frequency frequency;
      final ExternalId euribor;
      final String frequencyLabel;
      if (RANDOM.nextBoolean()) {
        frequency = QUARTERLY;
        euribor = EURIBOR_3M;
        frequencyLabel = "3m Euribor";
      } else {
        frequency = SEMI_ANNUAL;
        euribor = EURIBOR_6M;
        frequencyLabel = "6m Euribor";
      }
      final FloatingInterestRateLeg floatingLeg = new FloatingInterestRateLeg(ACT_360, frequency, REGION, MODIFIED_FOLLOWING, notional, false, euribor, FloatingRateType.IBOR);
      final SwapSecurity swap;
      final String name;
      if (RANDOM.nextBoolean()) {
        swap = new SwapSecurity(tradeDate, effectiveDate, maturityDate, COUNTERPARTY, fixedLeg, floatingLeg);
        name = years + "Y EUR " + FORMATTER.format(notional.getAmount() / 1000000) + "MM, pay " + FORMATTER.format(rate * 100) + "% vs " + frequencyLabel;
      } else {
        swap = new SwapSecurity(tradeDate, effectiveDate, maturityDate, COUNTERPARTY, floatingLeg, fixedLeg);
        name = years + "Y EUR " + FORMATTER.format(notional.getAmount() / 1000000) + "MM, receive " + FORMATTER.format(rate * 100) + "% vs " + frequencyLabel;
      }
      swap.setName(name);
      securities[i] = swap;
    }
    return new MySecurityGenerator<>(securities, tradeDate, "Vanilla swaps");
View Full Code Here

  private MySecurityGenerator<ManageableSecurity> getOISSwapSecurityGenerator() {
    final ZonedDateTime tradeDate = DateUtils.previousWeekDay().atStartOfDay(ZoneOffset.UTC);
    final ZonedDateTime effectiveDate = tradeDate;
    final SwapSecurity[] securities = new SwapSecurity[N_OIS_SWAPS];
    for (int i = 0; i < N_OIS_SWAPS; i++) {
      final InterestRateNotional notional = new InterestRateNotional(CURRENCY, 10000000 * (1 + RANDOM.nextInt(9)));
      final int years = 1 + RANDOM.nextInt(30);
      final ZonedDateTime maturityDate = tradeDate.plusYears(years);
      final double rate = years * 0.001 + RANDOM.nextDouble() / 5000;
      final FixedInterestRateLeg fixedLeg = new FixedInterestRateLeg(ACT_360, SEMI_ANNUAL, REGION, MODIFIED_FOLLOWING, notional, false, rate);
      final Frequency frequency;
      if (RANDOM.nextBoolean()) {
        frequency = QUARTERLY;
      } else {
        frequency = SEMI_ANNUAL;
      }
      final FloatingInterestRateLeg floatingLeg = new FloatingInterestRateLeg(ACT_360, frequency, REGION, MODIFIED_FOLLOWING, notional, false, EONIA, FloatingRateType.OIS);
      final SwapSecurity swap;
      final String name;
      if (RANDOM.nextBoolean()) {
        swap = new SwapSecurity(tradeDate, effectiveDate, maturityDate, COUNTERPARTY, fixedLeg, floatingLeg);
        name = years + "Y EUR " + FORMATTER.format(notional.getAmount() / 1000000) + "MM, pay " + FORMATTER.format(rate * 100) + "% vs EONIA";
      } else {
        swap = new SwapSecurity(tradeDate, effectiveDate, maturityDate, COUNTERPARTY, floatingLeg, fixedLeg);
        name = years + "Y EUR " + FORMATTER.format(notional.getAmount() / 1000000) + "MM, receive " + FORMATTER.format(rate * 100) + "% vs EONIA";
      }
      swap.setName(name);
      securities[i] = swap;
    }
    return new MySecurityGenerator<>(securities, tradeDate, "OIS swaps");
View Full Code Here

  private MySecurityGenerator<ManageableSecurity> getBasisSwapSecurityGenerator() {
    final ZonedDateTime tradeDate = DateUtils.previousWeekDay().atStartOfDay(ZoneOffset.UTC);
    final ZonedDateTime effectiveDate = tradeDate;
    final SwapSecurity[] securities = new SwapSecurity[N_BASIS_SWAPS];
    for (int i = 0; i < N_BASIS_SWAPS; i++) {
      final InterestRateNotional notional = new InterestRateNotional(CURRENCY, 10000000 * (1 + RANDOM.nextInt(9)));
      final int years = 1 + RANDOM.nextInt(30);
      final ZonedDateTime maturityDate = tradeDate.plusYears(years);
      final double spread = years * 0.002 + RANDOM.nextDouble() / 1000.;
      final Frequency payFrequency, receiveFrequency;
      final ExternalId payRate, receiveRate;
      final FloatingInterestRateLeg payLeg, receiveLeg;
      final String frequencyLabel;
      if (RANDOM.nextBoolean()) {
        payFrequency = QUARTERLY;
        receiveFrequency = SEMI_ANNUAL;
        payRate = EURIBOR_3M;
        receiveRate = EURIBOR_6M;
        payLeg = new FloatingSpreadIRLeg(ACT_360, payFrequency, REGION, MODIFIED_FOLLOWING, notional, false, payRate, FloatingRateType.IBOR, spread);
        receiveLeg = new FloatingInterestRateLeg(ACT_360, receiveFrequency, REGION, MODIFIED_FOLLOWING, notional, false, receiveRate, FloatingRateType.IBOR);
        frequencyLabel = "pay 3M Euribor + " + FORMATTER.format((int) (spread * 1000)) + "bp, receive 6M Euribor";
      } else {
        payFrequency = SEMI_ANNUAL;
        receiveFrequency = QUARTERLY;
        payRate = EURIBOR_6M;
        receiveRate = EURIBOR_3M;
        payLeg = new FloatingInterestRateLeg(ACT_360, payFrequency, REGION, MODIFIED_FOLLOWING, notional, false, payRate, FloatingRateType.IBOR);
        receiveLeg = new FloatingSpreadIRLeg(ACT_360, receiveFrequency, REGION, MODIFIED_FOLLOWING, notional, false, receiveRate, FloatingRateType.IBOR, spread);
        frequencyLabel = "receive 3M Euribor + " + FORMATTER.format((int) (spread * 1000)) + "bp, pay 6M Euribor";
      }
      final SwapSecurity swap = new SwapSecurity(tradeDate, effectiveDate, maturityDate, COUNTERPARTY, payLeg, receiveLeg);
      final String name = years + "Y EUR " + FORMATTER.format(notional.getAmount() / 1000000) + "MM, " + frequencyLabel;
      swap.setName(name);
      securities[i] = swap;
    }
    return new MySecurityGenerator<>(securities, tradeDate, "Basis swaps");
  }
View Full Code Here

        "Cpty",
        new FixedInterestRateLeg(DAY_COUNT,
            SimpleFrequency.SEMI_ANNUAL,
            ExternalSchemes.countryRegionId(Country.of("US")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.USD, 15000000),
            true,
            0.05),
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("US")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.USD, 15000000),
            true,
            USDLIBOR3M,
            FloatingRateType.IBOR));
    swap1.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap1.setName("Swap: pay 5% fixed vs 3m Libor, start=" + swap1.getEffectiveDate().toLocalDate() + ", maturity=" + swap1.getMaturityDate().toLocalDate() + ", notional=USD 15MM");
    final SwapSecurity swap2 = new SwapSecurity(
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 30, 5, 1, 11, 0), ZoneOffset.UTC),
        "Cpty",
        new FixedInterestRateLeg(DAY_COUNT,
            SimpleFrequency.SEMI_ANNUAL,
            ExternalSchemes.countryRegionId(Country.of("DE")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.EUR, 20000000),
            true,
            0.04),
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("DE")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.EUR, 20000000),
            true,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER, "USDLIBORP6M"),
            FloatingRateType.IBOR));
    swap2.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap2.setName("Swap: pay 4% fixed vs 6m Euribor, start=" + swap2.getEffectiveDate().toLocalDate() + ", maturity=" + swap2.getMaturityDate().toLocalDate() + ", notional=EUR 20MM");
    final SwapSecurity swap3 = new SwapSecurity(
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 13, 5, 1, 11, 0), ZoneOffset.UTC),
        "Cpty",
        new FixedInterestRateLeg(DAY_COUNT,
            SimpleFrequency.SEMI_ANNUAL,
            ExternalSchemes.countryRegionId(Country.of("GB")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.GBP, 15000000),
            true,
            0.03),
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("GB")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.GBP, 15000000),
            true,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER, "GBPLIBORP6M"),
            FloatingRateType.IBOR));
    swap3.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap3.setName("Swap: pay 3% fixed vs 6m Libor, start=" + swap3.getEffectiveDate().toLocalDate() + ", maturity=" + swap3.getMaturityDate().toLocalDate() + ", notional=GBP 15MM");
    final SwapSecurity swap4 = new SwapSecurity(
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 25, 5, 1, 11, 0), ZoneOffset.UTC),
        "Cpty",
        new FixedInterestRateLeg(DAY_COUNT,
            SimpleFrequency.SEMI_ANNUAL,
            ExternalSchemes.countryRegionId(Country.of("JP")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.JPY, 100000000),
            true,
            0.02),
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("JP")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.JPY, 100000000),
            true,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER, "JPYLIBORP6M"),
            FloatingRateType.IBOR));
    swap4.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap4.setName("Swap: pay 2% fixed vs 6m Libor, start=" + swap4.getEffectiveDate().toLocalDate() + ", maturity=" + swap4.getMaturityDate().toLocalDate() + ", notional=JPY 100MM");
    final SwapSecurity swap5 = new SwapSecurity(
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 40, 5, 1, 11, 0), ZoneOffset.UTC),
        "Cpty",
        new FixedInterestRateLeg(DAY_COUNT,
            SimpleFrequency.SEMI_ANNUAL,
            ExternalSchemes.countryRegionId(Country.of("CH")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.CHF, 5000000),
            true,
            0.07),
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("CH")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.CHF, 5000000),
            true,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER, "CHFLIBORP6M"),
            FloatingRateType.IBOR));
    swap5.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap5.setName("Swap: pay 7% fixed vs 6m Libor, start=" + swap5.getEffectiveDate().toLocalDate() + ", maturity=" + swap5.getMaturityDate().toLocalDate() + ", notional=CHF 50MM");

    final SwapSecurity swap6 = new SwapSecurity(
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 1, 5, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(TODAY.getYear() + 20, 5, 1, 11, 0), ZoneOffset.UTC),
        "Cpty",
        new FixedInterestRateLeg(DAY_COUNT,
            SimpleFrequency.SEMI_ANNUAL,
            ExternalSchemes.countryRegionId(Country.of("DK")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.DKK, 90000000),
            true,
            0.05),
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("DK")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.DKK, 90000000),
            true,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER, "DKKLIBORP6M"),
            FloatingRateType.IBOR));
    swap6.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap6.setName("Swap: pay 5% fixed vs 6m Cibor, start=" + swap6.getEffectiveDate().toLocalDate() + ", maturity=" + swap6.getMaturityDate().toLocalDate() + ", notional=DKK 90MM");
View Full Code Here

        "Cpty",
        new FixedInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("US")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.USD, 21000000),
            true,
            0.035),
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("US")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.USD, 21000000),
            true,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER, "USDISDA10P10Y"),
            FloatingRateType.CMS));
    swap1.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap1.setName("CMSwap: pay 5Y fixed @ 3.5% vs USDISDA10P10Y, start=" + swap1.getEffectiveDate().toLocalDate() + ", maturity=" + swap1.getMaturityDate().toLocalDate() + ", notional=USD 21MM");
    final SwapSecurity swap2 = new SwapSecurity(
        ZonedDateTime.of(LocalDateTime.of(year + 1, 4, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(year + 1, 4, 1, 11, 0), ZoneOffset.UTC),
        ZonedDateTime.of(LocalDateTime.of(year + 7, 4, 1, 11, 0), ZoneOffset.UTC),
        "Cpty",
        new FloatingInterestRateLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("US")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.USD, 123000000),
            true,
            ExternalId.of(ExternalSchemes.OG_SYNTHETIC_TICKER, "USDISDA10P1Y"),
            FloatingRateType.CMS),
        new FloatingSpreadIRLeg(DAY_COUNT,
            SimpleFrequency.QUARTERLY,
            ExternalSchemes.countryRegionId(Country.of("US")),
            BUSINESS_DAY,
            new InterestRateNotional(Currency.USD, 123000000),
            true,
            USDLIBOR3M,
            FloatingRateType.IBOR, 0.005));
    swap2.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
    swap2.setName("CMSwap: pay USDISDA10P1Y vs 3m Libor, start=" + swap2.getEffectiveDate().toLocalDate() + ", maturity=" + swap2.getMaturityDate().toLocalDate() + ", notional=USD 123MM");
View Full Code Here

TOP

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

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.