Package com.opengamma.financial.analytics.ircurve.strips

Examples of com.opengamma.financial.analytics.ircurve.strips.DiscountFactorNode$Meta


      final String curveNodeIdMapperName = message.getString(CURVE_MAPPER_ID_FIELD);
      //TODO should just use the period string for Tenor
      final Tenor tenor = deserializer.fieldValueToObject(Tenor.class, message.getByName(TENOR_FIELD));
      if (message.hasField(NAME_FIELD)) {
        final String name = message.getString(NAME_FIELD);
        return new DiscountFactorNode(curveNodeIdMapperName, tenor, name);
      }
      return new DiscountFactorNode(curveNodeIdMapperName, tenor);
    }
View Full Code Here


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

  @Test
  public void testDiscountFactorNodeBuilder() {
    DiscountFactorNode node = new DiscountFactorNode("TEST", Tenor.EIGHT_MONTHS);
    assertEquals(node, cycleObject(DiscountFactorNode.class, node));
    node = new DiscountFactorNode("TEST", Tenor.EIGHT_MONTHS, null);
    assertEquals(node, cycleObject(DiscountFactorNode.class, node));
    node = new DiscountFactorNode("TEST", Tenor.EIGHT_MONTHS, "Name");
    assertEquals(node, cycleObject(DiscountFactorNode.class, node));
  }
View Full Code Here

    assertNull(node.accept(VISITOR));
  }

  @Test
  public void testDiscountFactorNode() {
    final DiscountFactorNode node = new DiscountFactorNode(SCHEME, Tenor.FIVE_YEARS);
    assertNull(node.accept(VISITOR));
  }
View Full Code Here

    assertEquals(new CurveNodeWithIdentifier(creditSpread, ExternalId.of("Test", "Credit spread"), "Credit Data", DataFieldType.OUTRIGHT), creditSpread.accept(BUILDER));
  }

  @Test
  public void testDiscountFactor() {
    final DiscountFactorNode df = new DiscountFactorNode("Test", Tenor.TWO_MONTHS);
    assertEquals(new CurveNodeWithIdentifier(df, ExternalId.of("Test", "DF"), "DF Data", DataFieldType.POINTS), df.accept(BUILDER));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.analytics.ircurve.strips.DiscountFactorNode$Meta

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.