// -------------------------------------------------------------------------
  @SuppressWarnings({"rawtypes", "unchecked"})
  @Test
  public void testSearchBonds() {
    BondSecurity target =
        new GovernmentBondSecurity(
            "US TREASURY N/B",
            "Government",
            "US",
            "Treasury",
            Currency.USD,
            YieldConventionFactory.INSTANCE.getYieldConvention("US Treasury equivalent"),
            new Expiry(zdt(2011, 2, 1, 12, 0, 0, 0, ZoneOffset.UTC)),
            "",
            200,
            SimpleFrequencyFactory.INSTANCE.getFrequency(SimpleFrequency.SEMI_ANNUAL_NAME),
            DayCountFactory.INSTANCE.getDayCount("Actual/Actual"),
            zdt(2011, 2, 1, 12, 0, 0, 0, ZoneOffset.UTC),
            zdt(2011, 2, 1, 12, 0, 0, 0, ZoneOffset.UTC),
            zdt(2011, 2, 1, 12, 0, 0, 0, ZoneOffset.UTC),
            100d,
            100000000,
            5000,
            1000,
            100,
            100);
    target.setExternalIdBundle(ExternalIdBundle.of(ExternalId.of("A", "B")));
    Collection targetColl = ImmutableList.<Security>of(target);

    when(_underlying.getBondsWithIssuerName(eq("US TREASURY N/B"))).thenReturn(targetColl);

    Response test = _resource.searchBonds("US TREASURY N/B");
    assertEquals(Status.OK.getStatusCode(), test.getStatus());
    assertEquals(FudgeListWrapper.of(targetColl), test.getEntity());
  }
コード例 #2
0
  @BeforeMethod
  public void configureService() {
    MockFinancialSecuritySource securitySource = new MockFinancialSecuritySource();
    ExternalId secId1 = ExternalId.of(ExternalScheme.of("d1"), "v1");
    ExternalId secId2 = ExternalId.of(ExternalScheme.of("d2"), "v2");

    MockSecurity sec1 = new MockSecurity("t1");
    sec1.setExternalIdBundle(ExternalIdBundle.of(secId1));
    sec1.setSecurityType("BOND");
    securitySource.addSecurity(sec1);

    MockSecurity sec2 = new MockSecurity("t2");
    sec2.setExternalIdBundle(ExternalIdBundle.of(secId2));
    securitySource.addSecurity(sec2);

    BondSecurity bondSec =
        new GovernmentBondSecurity(
            "US TREASURY N/B",
            "Government",
            "US",
            "Treasury",
            Currency.USD,
            YieldConventionFactory.INSTANCE.getYieldConvention("US Treasury equivalent"),
            new Expiry(ZonedDateTime.of(2011, 2, 1, 12, 0, 0, 0, TimeZone.UTC)),
            "",
            200,
            SimpleFrequencyFactory.INSTANCE.getFrequency(SimpleFrequency.SEMI_ANNUAL_NAME),
            DayCountFactory.INSTANCE.getDayCount("Actual/Actual"),
            ZonedDateTime.of(2011, 2, 1, 12, 0, 0, 0, TimeZone.UTC),
            ZonedDateTime.of(2011, 2, 1, 12, 0, 0, 0, TimeZone.UTC),
            ZonedDateTime.of(2011, 2, 1, 12, 0, 0, 0, TimeZone.UTC),
            100,
            100000000,
            5000,
            1000,
            100,
            100);
    bondSec.setExternalIdBundle(ExternalIdBundle.of(ExternalId.of("A", "B")));
    securitySource.addSecurity(bondSec);

    getSecuritySourceService().setUnderlying(securitySource);
    _uid1 = sec1.getUniqueId();
    _uid2 = sec2.getUniqueId();
  }
コード例 #3
0
  /**
   * Adds conventions for deposits, implied deposits and cash.
   *
   * @param conventionMaster The convention master, not null
   */
  public static synchronized void addFixedIncomeInstrumentConventions(
      final ConventionBundleMaster conventionMaster) {
    ArgumentChecker.notNull(conventionMaster, "convention master");
    final BusinessDayConvention following = BusinessDayConventions.FOLLOWING;
    final BusinessDayConvention modified = BusinessDayConventions.MODIFIED_FOLLOWING;
    final DayCount act360 = DayCounts.ACT_360;
    final DayCount act365 = DayCounts.ACT_365;
    final Frequency quarterly =
        SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.QUARTERLY_NAME);
    final ExternalId kr = ExternalSchemes.financialRegionId("KR");

    final ConventionBundleMasterUtils utils = new ConventionBundleMasterUtils(conventionMaster);

    for (int i = 1; i < 3; i++) {
      final String dayDepositName = "KRW DEPOSIT " + i + "d";
      final ExternalId dayBbgDeposit = bloombergTickerSecurityId("KWDR" + i + "T Curncy");
      final ExternalId daySimpleDeposit = simpleNameSecurityId(dayDepositName);
      final String weekDepositName = "KRW DEPOSIT " + i + "w";
      final ExternalId weekBbgDeposit = bloombergTickerSecurityId("KWDR" + i + "Z Curncy");
      final ExternalId weekSimpleDeposit = simpleNameSecurityId(weekDepositName);
      utils.addConventionBundle(
          ExternalIdBundle.of(dayBbgDeposit, daySimpleDeposit),
          dayDepositName,
          act360,
          following,
          Period.ofDays(i),
          0,
          false,
          kr);
      utils.addConventionBundle(
          ExternalIdBundle.of(weekBbgDeposit, weekSimpleDeposit),
          weekDepositName,
          act360,
          following,
          Period.ofDays(i * 7),
          0,
          false,
          kr);
    }

    for (int i = 1; i < 12; i++) {
      final String depositName = "KRW DEPOSIT " + i + "m";
      final ExternalId bbgDeposit =
          bloombergTickerSecurityId("KWDR" + BBG_MONTH_CODES[i - 1] + " Curncy");
      final ExternalId simpleDeposit = simpleNameSecurityId(depositName);
      final String impliedDepositName = "KRW IMPLIED DEPOSIT " + i + "m";
      final ExternalId tullettImpliedDeposit =
          tullettPrebonSecurityId("AMIDPKRWSPT" + (i < 10 ? "0" : "") + i + "M");
      final ExternalId simpleImpliedDeposit = simpleNameSecurityId(impliedDepositName);
      utils.addConventionBundle(
          ExternalIdBundle.of(bbgDeposit, simpleDeposit),
          depositName,
          act360,
          following,
          Period.ofMonths(i),
          0,
          false,
          kr);
      utils.addConventionBundle(
          ExternalIdBundle.of(tullettImpliedDeposit, simpleImpliedDeposit),
          impliedDepositName,
          act360,
          following,
          Period.ofMonths(i),
          0,
          false,
          kr);
    }

    for (int i = 1; i < 5; i++) {
      if (i == 1) {
        final String depositName = "KRW IMPLIED DEPOSIT 1y";
        final ExternalId tullettImpliedDeposit = tullettPrebonSecurityId("AMIDPKRWSPT12M");
        final ExternalId simpleImpliedDeposit = simpleNameSecurityId(depositName);
        utils.addConventionBundle(
            ExternalIdBundle.of(tullettImpliedDeposit, simpleImpliedDeposit),
            depositName,
            act360,
            following,
            Period.ofYears(1),
            0,
            false,
            kr);
      }
      final String depositName = "KRW DEPOSIT " + i + "y";
      final ExternalId bbgDeposit = bloombergTickerSecurityId("KWDR" + i + " Curncy");
      final ExternalId simpleDeposit = simpleNameSecurityId(depositName);
      utils.addConventionBundle(
          ExternalIdBundle.of(bbgDeposit, simpleDeposit),
          depositName,
          act360,
          following,
          Period.ofYears(i),
          0,
          false,
          kr);
    }

    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("KWCDC Curncy"),
            bloombergTickerSecurityId("KWCDC Index"),
            simpleNameSecurityId("KRW SWAP FIXING 3m")),
        "KRW SWAP FIXING 3m",
        act365,
        modified,
        Period.ofMonths(3),
        0,
        false,
        kr);
    utils.addConventionBundle(
        ExternalIdBundle.of(simpleNameSecurityId("KRW_SWAP")),
        "KRW_SWAP",
        act365,
        modified,
        quarterly,
        2,
        kr,
        act365,
        modified,
        quarterly,
        2,
        simpleNameSecurityId("KRW SWAP FIXING 3m"),
        kr,
        true);
  }
コード例 #4
0
  public static synchronized void addFixedIncomeInstrumentConventions(
      final ConventionBundleMaster conventionMaster) {
    Validate.notNull(conventionMaster, "convention master");
    final BusinessDayConvention modified =
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following");
    final BusinessDayConvention following =
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following");
    final DayCount act360 = DayCountFactory.INSTANCE.getDayCount("Actual/360");
    final DayCount act365 = DayCountFactory.INSTANCE.getDayCount("Actual/365");
    final Frequency annual = SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.ANNUAL_NAME);
    final Frequency semiAnnual =
        SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.SEMI_ANNUAL_NAME);
    final Frequency quarterly =
        SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.QUARTERLY_NAME);
    final ExternalId ca = ExternalSchemes.financialRegionId("CA");

    final ConventionBundleMasterUtils utils = new ConventionBundleMasterUtils(conventionMaster);
    // TODO looked at BSYM and the codes seem right but need to check
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD00O/N Index"), simpleNameSecurityId("CAD LIBOR O/N")),
        "CAD LIBOR O/N",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD00S/N Index"), simpleNameSecurityId("CAD LIBOR S/N")),
        "CAD LIBOR S/N",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD00T/N Index"), simpleNameSecurityId("CAD LIBOR T/N")),
        "CAD LIBOR T/N",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0001W Index"), simpleNameSecurityId("CAD LIBOR 1w")),
        "CAD LIBOR 1w",
        act360,
        following,
        Period.ofDays(1),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0002W Index"), simpleNameSecurityId("CAD LIBOR 2w")),
        "CAD LIBOR 2w",
        act360,
        following,
        Period.ofDays(1),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0001M Index"), simpleNameSecurityId("CAD LIBOR 1m")),
        "CAD LIBOR 1m",
        act360,
        following,
        Period.ofMonths(1),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0002M Index"), simpleNameSecurityId("CAD LIBOR 2m")),
        "CAD LIBOR 2m",
        act360,
        following,
        Period.ofMonths(2),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0003M Index"), simpleNameSecurityId("CAD LIBOR 3m")),
        "CAD LIBOR 3m",
        act360,
        following,
        Period.ofMonths(3),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0004M Index"), simpleNameSecurityId("CAD LIBOR 4m")),
        "CAD LIBOR 4m",
        act360,
        following,
        Period.ofMonths(4),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0005M Index"), simpleNameSecurityId("CAD LIBOR 5m")),
        "CAD LIBOR 5m",
        act360,
        following,
        Period.ofMonths(5),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0006M Index"), simpleNameSecurityId("CAD LIBOR 6m")),
        "CAD LIBOR 6m",
        act360,
        following,
        Period.ofMonths(6),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0007M Index"), simpleNameSecurityId("CAD LIBOR 7m")),
        "CAD LIBOR 7m",
        act360,
        following,
        Period.ofMonths(7),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0008M Index"), simpleNameSecurityId("CAD LIBOR 8m")),
        "CAD LIBOR 8m",
        act360,
        following,
        Period.ofMonths(8),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0009M Index"), simpleNameSecurityId("CAD LIBOR 9m")),
        "CAD LIBOR 9m",
        act360,
        following,
        Period.ofMonths(9),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0010M Index"), simpleNameSecurityId("CAD LIBOR 10m")),
        "CAD LIBOR 10m",
        act360,
        following,
        Period.ofMonths(10),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0011M Index"), simpleNameSecurityId("CAD LIBOR 11m")),
        "CAD LIBOR 11m",
        act360,
        following,
        Period.ofMonths(11),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CD0012M Index"), simpleNameSecurityId("CAD LIBOR 12m")),
        "CAD LIBOR 12m",
        act360,
        following,
        Period.ofMonths(12),
        2,
        false,
        ca);

    // TODO need to check that these are right for deposit rates
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR1T Curncy"), simpleNameSecurityId("CAD DEPOSIT 1d")),
        "CAD DEPOSIT 1d",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR2T Curncy"), simpleNameSecurityId("CAD DEPOSIT 2d")),
        "CAD DEPOSIT 2d",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR3T Curncy"), simpleNameSecurityId("CAD DEPOSIT 3d")),
        "CAD DEPOSIT 3d",
        act365,
        following,
        Period.ofDays(1),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR1Z Curncy"), simpleNameSecurityId("CAD DEPOSIT 1w")),
        "CAD DEPOSIT 1w",
        act365,
        following,
        Period.ofDays(7),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR2Z Curncy"), simpleNameSecurityId("CAD DEPOSIT 2w")),
        "CAD DEPOSIT 2w",
        act365,
        following,
        Period.ofDays(14),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR3Z Curncy"), simpleNameSecurityId("CAD DEPOSIT 3w")),
        "CAD DEPOSIT 3w",
        act365,
        following,
        Period.ofDays(21),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRA Curncy"), simpleNameSecurityId("CAD DEPOSIT 1m")),
        "CAD DEPOSIT 1m",
        act365,
        following,
        Period.ofMonths(1),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRB Curncy"), simpleNameSecurityId("CAD DEPOSIT 2m")),
        "CAD DEPOSIT 2m",
        act365,
        following,
        Period.ofMonths(2),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRC Curncy"), simpleNameSecurityId("CAD DEPOSIT 3m")),
        "CAD DEPOSIT 3m",
        act365,
        following,
        Period.ofMonths(3),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRD Curncy"), simpleNameSecurityId("CAD DEPOSIT 4m")),
        "CAD DEPOSIT 4m",
        act365,
        following,
        Period.ofMonths(4),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRE Curncy"), simpleNameSecurityId("CAD DEPOSIT 5m")),
        "CAD DEPOSIT 5m",
        act365,
        following,
        Period.ofMonths(5),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRF Curncy"), simpleNameSecurityId("CAD DEPOSIT 6m")),
        "CAD DEPOSIT 6m",
        act365,
        following,
        Period.ofMonths(6),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRG Curncy"), simpleNameSecurityId("CAD DEPOSIT 7m")),
        "CAD DEPOSIT 7m",
        act365,
        following,
        Period.ofMonths(7),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRH Curncy"), simpleNameSecurityId("CAD DEPOSIT 8m")),
        "CAD DEPOSIT 8m",
        act365,
        following,
        Period.ofMonths(8),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRI Curncy"), simpleNameSecurityId("CAD DEPOSIT 9m")),
        "CAD DEPOSIT 9m",
        act365,
        following,
        Period.ofMonths(9),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRJ Curncy"), simpleNameSecurityId("CAD DEPOSIT 10m")),
        "CAD DEPOSIT 10m",
        act365,
        following,
        Period.ofMonths(10),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDRK Curncy"), simpleNameSecurityId("CAD DEPOSIT 11m")),
        "CAD DEPOSIT 11m",
        act365,
        following,
        Period.ofMonths(11),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR1 Curncy"), simpleNameSecurityId("CAD DEPOSIT 1y")),
        "CAD DEPOSIT 1y",
        act365,
        following,
        Period.ofYears(1),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR2 Curncy"), simpleNameSecurityId("CAD DEPOSIT 2y")),
        "CAD DEPOSIT 2y",
        act365,
        following,
        Period.ofYears(2),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR3 Curncy"), simpleNameSecurityId("CAD DEPOSIT 3y")),
        "CAD DEPOSIT 3y",
        act365,
        following,
        Period.ofYears(3),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR4 Curncy"), simpleNameSecurityId("CAD DEPOSIT 4y")),
        "CAD DEPOSIT 4y",
        act365,
        following,
        Period.ofYears(4),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDDR5 Curncy"), simpleNameSecurityId("CAD DEPOSIT 5y")),
        "CAD DEPOSIT 5y",
        act365,
        following,
        Period.ofYears(5),
        2,
        false,
        ca);
    // TODO check daycount
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDOR01 Index"),
            bloombergTickerSecurityId("CDOR01 RBC Index"),
            simpleNameSecurityId("CDOR 1m")),
        "CDOR 1m",
        act365,
        following,
        Period.ofMonths(1),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDOR02 Index"),
            bloombergTickerSecurityId("CDOR02 RBC Index"),
            simpleNameSecurityId("CDOR 2m")),
        "CDOR 2m",
        act365,
        following,
        Period.ofMonths(2),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDOR03 Index"),
            bloombergTickerSecurityId("CDOR03 RBC Index"),
            simpleNameSecurityId("CDOR 3m")),
        "CDOR 3m",
        act365,
        following,
        Period.ofMonths(3),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDOR06 Index"),
            bloombergTickerSecurityId("CDOR06 RBC Index"),
            simpleNameSecurityId("CDOR 6m")),
        "CDOR 6m",
        act365,
        following,
        Period.ofMonths(6),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CDOR12 Index"),
            bloombergTickerSecurityId("CDOR12 RBC Index"),
            simpleNameSecurityId("CDOR 12m")),
        "CDOR 12m",
        act365,
        following,
        Period.ofMonths(12),
        2,
        false,
        ca);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            bloombergTickerSecurityId("CAONREPO Index"),
            simpleNameSecurityId("RBC OVERNIGHT REPO")),
        "RBC OVERNIGHT REPO",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        ca,
        0);

    utils.addConventionBundle(
        ExternalIdBundle.of(simpleNameSecurityId("CAD_SWAP")),
        "CAD_SWAP",
        act365,
        modified,
        semiAnnual,
        0,
        ca,
        act365,
        modified,
        quarterly,
        0,
        simpleNameSecurityId("CDOR 3m"),
        ca,
        true);
    utils.addConventionBundle(
        ExternalIdBundle.of(simpleNameSecurityId("CAD_1Y_SWAP")),
        "CAD_1Y_SWAP",
        act365,
        modified,
        annual,
        0,
        ca,
        act365,
        modified,
        quarterly,
        0,
        simpleNameSecurityId("CDOR 3m"),
        ca,
        true);

    // Overnight Index Swap Convention have additional flag, publicationLag
    final Integer publicationLag = 1;
    utils.addConventionBundle(
        ExternalIdBundle.of(simpleNameSecurityId("CAD_OIS_SWAP")),
        "CAD_OIS_SWAP",
        act365,
        modified,
        annual,
        0,
        ca,
        act365,
        modified,
        annual,
        0,
        simpleNameSecurityId("RBC OVERNIGHT REPO"),
        ca,
        true,
        publicationLag);

    // TODO check the following details - copied from old CAD_FRA
    utils.addConventionBundle(
        ExternalIdBundle.of(simpleNameSecurityId("CAD_3M_FRA")),
        "CAD_3M_FRA",
        act365,
        following,
        quarterly,
        2,
        ca,
        act365,
        following,
        quarterly,
        2,
        simpleNameSecurityId("CDOR 3m"),
        ca,
        false);
    utils.addConventionBundle(
        ExternalIdBundle.of(simpleNameSecurityId("USD_6M_FRA")),
        "USD_6M_FRA",
        act365,
        following,
        semiAnnual,
        2,
        ca,
        act365,
        following,
        semiAnnual,
        2,
        simpleNameSecurityId("CDOR 6m"),
        ca,
        false);
    utils.addConventionBundle(
        ExternalIdBundle.of(simpleNameSecurityId("CAD_FRA")),
        "CAD_FRA",
        act365,
        following,
        quarterly,
        2,
        ca,
        act365,
        following,
        quarterly,
        2,
        simpleNameSecurityId("CDOR 3m"),
        ca,
        false);

    // TODO according to my information:
    // "Floating leg compounded quarterly at CDOR Flat paid semi-annually or annually for 1y"
    // Don't know how we're going to put that in
  }
コード例 #5
0
  public static synchronized void addFixedIncomeInstrumentConventions(
      final ConventionBundleMaster conventionMaster) {
    Validate.notNull(conventionMaster, "convention master");
    final BusinessDayConvention modified =
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following");
    final BusinessDayConvention following =
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following");
    final DayCount act360 = DayCountFactory.INSTANCE.getDayCount("Actual/360");
    final DayCount thirty360 = DayCountFactory.INSTANCE.getDayCount("30/360");
    final Frequency quarterly =
        SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.QUARTERLY_NAME);
    final Frequency semiAnnual =
        SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.SEMI_ANNUAL_NAME);
    final Frequency annual = SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.ANNUAL_NAME);
    final ExternalId ch = ExternalSchemes.financialRegionId("CH");

    final ConventionBundleMasterUtils utils = new ConventionBundleMasterUtils(conventionMaster);
    // TODO check that it's actually libor that we need
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF00O/N Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR O/N")),
        "CHF LIBOR O/N",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF00S/N Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR S/N")),
        "CHF LIBOR S/N",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF00T/N Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR T/N")),
        "CHF LIBOR T/N",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0001W Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 1w")),
        "CHF LIBOR 1w",
        act360,
        following,
        Period.ofDays(7),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0002W Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 2w")),
        "CHF LIBOR 2w",
        act360,
        following,
        Period.ofDays(14),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0001M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 1m")),
        "CHF LIBOR 1m",
        act360,
        following,
        Period.ofMonths(1),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0002M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 2m")),
        "CHF LIBOR 2m",
        act360,
        following,
        Period.ofMonths(2),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0003M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 3m")),
        "CHF LIBOR 3m",
        act360,
        following,
        Period.ofMonths(3),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0004M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 4m")),
        "CHF LIBOR 4m",
        act360,
        following,
        Period.ofMonths(4),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0005M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 5m")),
        "CHF LIBOR 5m",
        act360,
        following,
        Period.ofMonths(5),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0006M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 6m"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFLIBORP6M")),
        "CHF LIBOR 6m",
        act360,
        following,
        Period.ofMonths(6),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0007M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 7m")),
        "CHF LIBOR 7m",
        act360,
        following,
        Period.ofMonths(7),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0008M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 8m")),
        "CHF LIBOR 8m",
        act360,
        following,
        Period.ofMonths(8),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0009M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 9m")),
        "CHF LIBOR 9m",
        act360,
        following,
        Period.ofMonths(9),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0010M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 10m")),
        "CHF LIBOR 10m",
        act360,
        following,
        Period.ofMonths(10),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0011M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 11m")),
        "CHF LIBOR 11m",
        act360,
        following,
        Period.ofMonths(11),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SF0012M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 12m")),
        "CHF LIBOR 12m",
        act360,
        following,
        Period.ofMonths(12),
        2,
        false,
        ch);

    // TODO need to check that these are right for deposit rates
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR1T Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 1d")),
        "CHF DEPOSIT 1d",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR2T Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 2d")),
        "CHF DEPOSIT 2d",
        act360,
        following,
        Period.ofDays(1),
        1,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR3T Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 3d")),
        "CHF DEPOSIT 3d",
        act360,
        following,
        Period.ofDays(1),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR1Z Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 1w")),
        "CHF DEPOSIT 1w",
        act360,
        following,
        Period.ofDays(7),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR2Z Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 2w")),
        "CHF DEPOSIT 2w",
        act360,
        following,
        Period.ofDays(14),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR3Z Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 3w")),
        "CHF DEPOSIT 3w",
        act360,
        following,
        Period.ofDays(21),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRA Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 1m")),
        "CHF DEPOSIT 1m",
        act360,
        following,
        Period.ofMonths(1),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRB Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 2m")),
        "CHF DEPOSIT 2m",
        act360,
        following,
        Period.ofMonths(2),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRC Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 3m")),
        "CHF DEPOSIT 3m",
        act360,
        following,
        Period.ofMonths(3),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRD Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 4m")),
        "CHF DEPOSIT 4m",
        act360,
        following,
        Period.ofMonths(4),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRE Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 5m")),
        "CHF DEPOSIT 5m",
        act360,
        following,
        Period.ofMonths(5),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRF Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 6m")),
        "CHF DEPOSIT 6m",
        act360,
        following,
        Period.ofMonths(6),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRG Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 7m")),
        "CHF DEPOSIT 7m",
        act360,
        following,
        Period.ofMonths(7),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRH Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 8m")),
        "CHF DEPOSIT 8m",
        act360,
        following,
        Period.ofMonths(8),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRI Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 9m")),
        "CHF DEPOSIT 9m",
        act360,
        following,
        Period.ofMonths(9),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRJ Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 10m")),
        "CHF DEPOSIT 10m",
        act360,
        following,
        Period.ofMonths(10),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDRK Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 11m")),
        "CHF DEPOSIT 11m",
        act360,
        following,
        Period.ofMonths(11),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR1 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 1y")),
        "CHF DEPOSIT 1y",
        act360,
        following,
        Period.ofYears(1),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR2 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 2y")),
        "CHF DEPOSIT 2y",
        act360,
        following,
        Period.ofYears(2),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR3 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 3y")),
        "CHF DEPOSIT 3y",
        act360,
        following,
        Period.ofYears(3),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR4 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 4y")),
        "CHF DEPOSIT 4y",
        act360,
        following,
        Period.ofYears(4),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("SFDR5 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF DEPOSIT 5y")),
        "CHF DEPOSIT 5y",
        act360,
        following,
        Period.ofYears(5),
        2,
        false,
        ch);

    // TODO check reference rate
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF_SWAP")),
        "CHF_SWAP",
        thirty360,
        modified,
        annual,
        2,
        ch,
        act360,
        modified,
        semiAnnual,
        2,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 6m"),
        ch,
        true);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF_3M_SWAP")),
        "CHF_3M_SWAP",
        thirty360,
        modified,
        annual,
        2,
        ch,
        act360,
        modified,
        quarterly,
        2,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 3m"),
        ch,
        true);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF_6M_SWAP")),
        "CHF_6M_SWAP",
        thirty360,
        modified,
        annual,
        2,
        ch,
        act360,
        modified,
        semiAnnual,
        2,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 6m"),
        ch,
        true);

    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF_3M_FRA")),
        "CHF_3M_FRA",
        thirty360,
        modified,
        annual,
        2,
        ch,
        act360,
        modified,
        quarterly,
        2,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 3m"),
        ch,
        true);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF_6M_FRA")),
        "CHF_6M_FRA",
        thirty360,
        modified,
        annual,
        2,
        ch,
        act360,
        modified,
        semiAnnual,
        2,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF LIBOR 6m"),
        ch,
        true);

    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(
                InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, IndexType.Libor + "_CHF_P3M")),
        IndexType.Libor + "_CHF_P3M",
        thirty360,
        modified,
        null,
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(
                InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, IndexType.Libor + "_CHF_P6M")),
        IndexType.Libor + "_CHF_P6M",
        thirty360,
        modified,
        null,
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(
                InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, IndexType.Euribor + "_CHF_P3M")),
        IndexType.Euribor + "_CHF_P3M",
        thirty360,
        modified,
        null,
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(
                InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, IndexType.Euribor + "_CHF_P6M")),
        IndexType.Euribor + "_CHF_P6M",
        thirty360,
        modified,
        null,
        2,
        false,
        ch);

    // Overnight Index Swap Convention have additional flag, publicationLag
    final Integer publicationLagON = 0; // TODO CASE PublicationLag CHF - Confirm 0
    // CHF Overnight Index
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalSchemes.bloombergTickerSecurityId("TOISTOIS Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF TOISTOIS")),
        "CHF TOIS TOIS",
        act360,
        following,
        Period.ofDays(1),
        2,
        false,
        ch,
        publicationLagON);
    // OIS
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF_OIS_SWAP")),
        "CHF_OIS_SWAP",
        act360,
        modified,
        annual,
        2,
        ch,
        act360,
        modified,
        annual,
        2,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF TOISTOIS"),
        ch,
        true,
        publicationLagON);

    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHF_IBOR_INDEX")),
        "CHF_IBOR_INDEX",
        act360,
        following,
        2,
        false);

    // Identifiers for external data
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP1D"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP1D")),
        "CHFCASHP1D",
        act360,
        following,
        Period.ofDays(1),
        0,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP1M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP1M")),
        "CHFCASHP1M",
        act360,
        modified,
        Period.ofMonths(1),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP2M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP2M")),
        "CHFCASHP2M",
        act360,
        modified,
        Period.ofMonths(2),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP3M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP3M")),
        "CHFCASHP3M",
        act360,
        modified,
        Period.ofMonths(3),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP4M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP4M")),
        "CHFCASHP4M",
        act360,
        modified,
        Period.ofMonths(4),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP5M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP5M")),
        "CHFCASHP5M",
        act360,
        modified,
        Period.ofMonths(5),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP6M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP6M")),
        "CHFCASHP6M",
        act360,
        modified,
        Period.ofMonths(6),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP7M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP7M")),
        "CHFCASHP7M",
        act360,
        modified,
        Period.ofMonths(7),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP8M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP8M")),
        "CHFCASHP8M",
        act360,
        modified,
        Period.ofMonths(8),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP9M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP9M")),
        "CHFCASHP9M",
        act360,
        modified,
        Period.ofMonths(9),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP10M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP10M")),
        "CHFCASHP10M",
        act360,
        modified,
        Period.ofMonths(10),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP11M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP11M")),
        "CHFCASHP11M",
        act360,
        modified,
        Period.ofMonths(11),
        2,
        false,
        ch);
    utils.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "CHFCASHP12M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "CHFCASHP12M")),
        "CHFCASHP12M",
        act360,
        modified,
        Period.ofMonths(12),
        2,
        false,
        ch);
  }
コード例 #6
0
  public static synchronized void addFixedIncomeInstrumentConventions(
      final ConventionBundleMaster conventionMaster) {
    Validate.notNull(conventionMaster, "convention master");
    final BusinessDayConvention modified =
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following");
    final BusinessDayConvention following =
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following");
    final DayCount act365 = DayCountFactory.INSTANCE.getDayCount("Actual/365");
    final Frequency annual = SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.ANNUAL_NAME);
    final Frequency semiAnnual =
        SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.SEMI_ANNUAL_NAME);
    final Frequency quarterly =
        SimpleFrequencyFactory.INSTANCE.getFrequency(Frequency.QUARTERLY_NAME);

    final ExternalId gb = RegionUtils.financialRegionId("GB");

    // TODO looked at BSYM and the codes seem right but need to check
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP00O/N Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR O/N")),
        "GBP LIBOR O/N",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP00T/N Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR T/N")),
        "GBP LIBOR T/N",
        act365,
        following,
        Period.ofDays(1),
        1,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0001W Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 1w")),
        "GBP LIBOR 1w",
        act365,
        following,
        Period.ofDays(7),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0002W Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 2w")),
        "GBP LIBOR 2w",
        act365,
        following,
        Period.ofDays(14),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0001M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 1m")),
        "GBP LIBOR 1m",
        act365,
        modified,
        Period.ofMonths(1),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0002M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 2m")),
        "GBP LIBOR 2m",
        act365,
        modified,
        Period.ofMonths(2),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0003M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 3m"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPLIBORP3M")),
        "GBP LIBOR 3m",
        act365,
        modified,
        Period.ofMonths(3),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0004M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 4m")),
        "GBP LIBOR 4m",
        act365,
        modified,
        Period.ofMonths(4),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0005M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 5m")),
        "GBP LIBOR 5m",
        act365,
        modified,
        Period.ofMonths(5),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0006M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 6m"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPLIBORP6M")),
        "GBP LIBOR 6m",
        act365,
        modified,
        Period.ofMonths(6),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0007M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 7m")),
        "GBP LIBOR 7m",
        act365,
        modified,
        Period.ofMonths(7),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0008M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 8m")),
        "GBP LIBOR 8m",
        act365,
        modified,
        Period.ofMonths(8),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0009M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 9m")),
        "GBP LIBOR 9m",
        act365,
        modified,
        Period.ofMonths(9),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0010M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 10m")),
        "GBP LIBOR 10m",
        act365,
        modified,
        Period.ofMonths(10),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0011M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 11m")),
        "GBP LIBOR 11m",
        act365,
        modified,
        Period.ofMonths(11),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BP0012M Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 12m"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPLIBORP12M")),
        "GBP LIBOR 12m",
        act365,
        modified,
        Period.ofMonths(12),
        0,
        false,
        gb);

    // TODO need to check that these are right for deposit rates
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR1T Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 1d")),
        "GBP DEPOSIT 1d",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR2T Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 2d")),
        "GBP DEPOSIT 2d",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR3T Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 3d")),
        "GBP DEPOSIT 3d",
        act365,
        following,
        Period.ofDays(1),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR1Z Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 1w")),
        "GBP DEPOSIT 1w",
        act365,
        following,
        Period.ofDays(7),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR2Z Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 2w")),
        "GBP DEPOSIT 2w",
        act365,
        following,
        Period.ofDays(14),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR3Z Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 3w")),
        "GBP DEPOSIT 3w",
        act365,
        following,
        Period.ofDays(21),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRA Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 1m")),
        "GBP DEPOSIT 1m",
        act365,
        following,
        Period.ofMonths(1),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRB Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 2m")),
        "GBP DEPOSIT 2m",
        act365,
        following,
        Period.ofMonths(2),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRC Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 3m")),
        "GBP DEPOSIT 3m",
        act365,
        following,
        Period.ofMonths(3),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRD Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 4m")),
        "GBP DEPOSIT 4m",
        act365,
        following,
        Period.ofMonths(4),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRE Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 5m")),
        "GBP DEPOSIT 5m",
        act365,
        following,
        Period.ofMonths(5),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRF Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 6m")),
        "GBP DEPOSIT 6m",
        act365,
        following,
        Period.ofMonths(6),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRG Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 7m")),
        "GBP DEPOSIT 7m",
        act365,
        following,
        Period.ofMonths(7),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRH Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 8m")),
        "GBP DEPOSIT 8m",
        act365,
        following,
        Period.ofMonths(8),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRI Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 9m")),
        "GBP DEPOSIT 9m",
        act365,
        following,
        Period.ofMonths(9),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRJ Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 10m")),
        "GBP DEPOSIT 10m",
        act365,
        following,
        Period.ofMonths(10),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDRK Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 11m")),
        "GBP DEPOSIT 11m",
        act365,
        following,
        Period.ofMonths(11),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR1 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 1y")),
        "GBP DEPOSIT 1y",
        act365,
        following,
        Period.ofYears(1),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR2 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 2y")),
        "GBP DEPOSIT 2y",
        act365,
        following,
        Period.ofYears(2),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR3 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 3y")),
        "GBP DEPOSIT 3y",
        act365,
        following,
        Period.ofYears(3),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR4 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 4y")),
        "GBP DEPOSIT 4y",
        act365,
        following,
        Period.ofYears(4),
        2,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("BPDR5 Curncy"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP DEPOSIT 5y")),
        "GBP DEPOSIT 5y",
        act365,
        following,
        Period.ofYears(5),
        2,
        false,
        gb);

    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_SWAP")),
        "GBP_SWAP",
        act365,
        modified,
        semiAnnual,
        0,
        gb,
        act365,
        modified,
        semiAnnual,
        0,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 6m"),
        gb,
        true);

    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_3M_SWAP")),
        "GBP_3M_SWAP",
        act365,
        modified,
        annual,
        0,
        gb,
        act365,
        modified,
        quarterly,
        0,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 3m"),
        gb,
        true);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_6M_SWAP")),
        "GBP_6M_SWAP",
        act365,
        modified,
        semiAnnual,
        0,
        gb,
        act365,
        modified,
        semiAnnual,
        0,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 6m"),
        gb,
        true);

    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_3M_FRA")),
        "GBP_3M_FRA",
        act365,
        modified,
        annual,
        0,
        gb,
        act365,
        modified,
        quarterly,
        0,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 3m"),
        gb,
        true);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_6M_FRA")),
        "GBP_6M_FRA",
        act365,
        modified,
        semiAnnual,
        0,
        gb,
        act365,
        modified,
        semiAnnual,
        0,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 6m"),
        gb,
        true);

    //
    // conventionMaster.addConventionBundle(ExternalIdBundle.of(ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_1Y_SWAP")), "GBP_1Y_SWAP", act365, modified, quarterly, 0, gb,
    //        act365, modified, quarterly, 0,
    // ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP LIBOR 3m"), gb, true);

    // Overnight Index Swap Convention have additional flag, publicationLag
    final Integer publicationLagON = 0;
    // SONIA
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            SecurityUtils.bloombergTickerSecurityId("SONIO/N Index"),
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP SONIO/N")),
        "GBP SONIO/N",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        gb,
        publicationLagON);
    // OIS - SONIA
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_OIS_SWAP")),
        "GBP_OIS_SWAP",
        act365,
        modified,
        annual,
        2,
        gb,
        act365,
        modified,
        annual,
        2,
        ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP SONIO/N"),
        gb,
        true,
        publicationLagON);

    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_OIS_CASH")),
        "GBP_OIS_CASH",
        act365,
        following,
        null,
        0,
        false,
        gb,
        publicationLagON);

    // TODO sort out the swap names so that they are consistent
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBP_IBOR_INDEX")),
        "GBP_IBOR_INDEX",
        act365,
        modified,
        0,
        false);

    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP1D"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP1D")),
        "GBPCASHP1D",
        act365,
        following,
        Period.ofDays(1),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP1M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP1M")),
        "GBPCASHP1M",
        act365,
        modified,
        Period.ofMonths(1),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP2M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP2M")),
        "GBPCASHP2M",
        act365,
        modified,
        Period.ofMonths(2),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP3M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP3M")),
        "GBPCASHP3M",
        act365,
        modified,
        Period.ofMonths(3),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP4M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP4M")),
        "GBPCASHP4M",
        act365,
        modified,
        Period.ofMonths(4),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP5M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP5M")),
        "GBPCASHP5M",
        act365,
        modified,
        Period.ofMonths(5),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP6M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP6M")),
        "GBPCASHP6M",
        act365,
        modified,
        Period.ofMonths(6),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP7M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP7M")),
        "GBPCASHP7M",
        act365,
        modified,
        Period.ofMonths(7),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP8M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP8M")),
        "GBPCASHP8M",
        act365,
        modified,
        Period.ofMonths(8),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP9M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP9M")),
        "GBPCASHP9M",
        act365,
        modified,
        Period.ofMonths(9),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP10M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP10M")),
        "GBPCASHP10M",
        act365,
        modified,
        Period.ofMonths(10),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP11M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP11M")),
        "GBPCASHP11M",
        act365,
        modified,
        Period.ofMonths(11),
        0,
        false,
        gb);
    conventionMaster.addConventionBundle(
        ExternalIdBundle.of(
            ExternalId.of(InMemoryConventionBundleMaster.SIMPLE_NAME_SCHEME, "GBPCASHP12M"),
            ExternalId.of(InMemoryConventionBundleMaster.OG_SYNTHETIC_TICKER, "GBPCASHP12M")),
        "GBPCASHP12M",
        act365,
        modified,
        Period.ofMonths(12),
        0,
        false,
        gb);
  }