Examples of SwapNode


Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

      final String curveNodeIdMapperName = message.getString(CURVE_MAPPER_ID_FIELD);
      if (message.hasField(NAME_FIELD)) {
        final String name = message.getString(NAME_FIELD);
        if (message.hasField(USE_FIXINGS_FIELD)) {
          final boolean useFixings = message.getBoolean(USE_FIXINGS_FIELD);
          return new SwapNode(startTenor, maturityTenor, payLegConvention, receiveLegConvention, useFixings, curveNodeIdMapperName, name);
        }
        return new SwapNode(startTenor, maturityTenor, payLegConvention, receiveLegConvention, curveNodeIdMapperName, name);
      }
      if (message.hasField(USE_FIXINGS_FIELD)) {
        final boolean useFixings = message.getBoolean(USE_FIXINGS_FIELD);
        return new SwapNode(startTenor, maturityTenor, payLegConvention, receiveLegConvention, useFixings, curveNodeIdMapperName);
      }
      return new SwapNode(startTenor, maturityTenor, payLegConvention, receiveLegConvention, curveNodeIdMapperName);
    }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

    assertEquals(node, cycleObject(RateFutureNode.class, node));
  }

  @Test
  public void testSwapNodeBuilder() {
    SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, ExternalId.of("convention", "pay"), ExternalId.of("convention", "receive"), "TEST");
    assertEquals(node, cycleObject(SwapNode.class, node));
    node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, ExternalId.of("convention", "pay"), ExternalId.of("convention", "receive"), "TEST", null);
    assertEquals(node, cycleObject(SwapNode.class, node));
    node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, ExternalId.of("convention", "pay"), ExternalId.of("convention", "receive"), "TEST", "Name");
    assertEquals(node, cycleObject(SwapNode.class, node));
    node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, ExternalId.of("convention", "pay"), ExternalId.of("convention", "receive"), false, "TEST");
    assertEquals(node, cycleObject(SwapNode.class, node));
    node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, ExternalId.of("convention", "pay"), ExternalId.of("convention", "receive"), false, "TEST", null);
    assertEquals(node, cycleObject(SwapNode.class, node));
    node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, ExternalId.of("convention", "pay"), ExternalId.of("convention", "receive"), false, "TEST", "Name");
    assertEquals(node, cycleObject(SwapNode.class, node));
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

    node.accept(visitor);
  }

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullSwapPayConvention() {
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, SWAP_3M_IBOR_ID, SCHEME);
    node.accept(EMPTY_CONVENTIONS);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullSwapReceiveConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
    map.put(FIXED_LEG_ID, FIXED_LEG);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, SWAP_3M_IBOR_ID, SCHEME);
    node.accept(visitor);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

  public void testNullIborUnderlyingConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
    map.put(FIXED_LEG_ID, FIXED_LEG);
    map.put(SWAP_3M_IBOR_ID, SWAP_3M_LIBOR);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, SWAP_3M_IBOR_ID, SCHEME);
    node.accept(visitor);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

  public void testNullCMSIndexUnderlyingConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
    map.put(FIXED_LEG_ID, FIXED_LEG);
    map.put(SWAP_INDEX_ID, SWAP_INDEX);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, SWAP_INDEX_ID, SCHEME);
    node.accept(visitor);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

  public void testNullCMSUnderlyingConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
    map.put(FIXED_LEG_ID, FIXED_LEG);
    map.put(CMS_SWAP_ID, CMS);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, CMS_SWAP_ID, SCHEME);
    node.accept(visitor);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

  public void testNullOISUnderlyingConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
    map.put(FIXED_LEG_ID, FIXED_LEG);
    map.put(OIS_ID, OIS);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, OIS_ID, SCHEME);
    node.accept(visitor);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

  @Test(expectedExceptions = OpenGammaRuntimeException.class)
  public void testNullFixedLegConvention() {
    final Map<ExternalId, Convention> map = new HashMap<>();
    map.put(OIS_ID, OIS);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, OIS_ID, SCHEME);
    node.accept(visitor);
  }
View Full Code Here

Examples of com.opengamma.financial.analytics.ircurve.strips.SwapNode

    final CompoundingIborLegConvention compoundingIbor = new CompoundingIborLegConvention("USD Compounding Libor", ExternalIdBundle.of(ExternalId.of(SCHEME, "USD Compounding Libor")),
        LIBOR_3M_ID, Tenor.THREE_MONTHS, CompoundingType.COMPOUNDING, Tenor.ONE_MONTH, StubType.SHORT_START, 2, false, StubType.LONG_START, true, 1);
    map.put(FIXED_LEG_ID, FIXED_LEG);
    map.put(COMPOUNDING_IBOR_ID, compoundingIbor);
    final CurveNodeCurrencyVisitor visitor = new CurveNodeCurrencyVisitor(new TestConventionSource(map));
    final SwapNode node = new SwapNode(Tenor.ONE_DAY, Tenor.TEN_YEARS, FIXED_LEG_ID, COMPOUNDING_IBOR_ID, SCHEME);
    node.accept(visitor);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.