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

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


  }

  @Test
  public void testCurveNodeWithIdentifiers() {
    final CreditSpreadNode node = new CreditSpreadNode("TEST", Tenor.EIGHT_YEARS);
    final CurveNodeWithIdentifier nodeWithId = new CurveNodeWithIdentifier(node, ExternalSchemes.bloombergTickerSecurityId("AAA"), "Market_Close", DataFieldType.OUTRIGHT);
    assertEquals(nodeWithId, cycleObject(CurveNodeWithIdentifier.class, nodeWithId));
  }
View Full Code Here


  }

  @Test
  public void testCash() {
    final CashNode cash = new CashNode(Tenor.ONE_DAY, Tenor.TWO_MONTHS, ExternalId.of("Test", "Test"), "Test");
    assertEquals(new CurveNodeWithIdentifier(cash, ExternalId.of("Test", "Cash"), "Cash Data", DataFieldType.OUTRIGHT), cash.accept(BUILDER));
  }
View Full Code Here

  }

  @Test
  public void testRate() {
    final ContinuouslyCompoundedRateNode rate = new ContinuouslyCompoundedRateNode("Test", Tenor.TWO_MONTHS);
    assertEquals(new CurveNodeWithIdentifier(rate, ExternalId.of("Test", "Rate"), "CC Rate Data", DataFieldType.POINTS), rate.accept(BUILDER));
  }
View Full Code Here

  }

  @Test
  public void testCreditSpread() {
    final CreditSpreadNode creditSpread = new CreditSpreadNode("Test", Tenor.TWO_MONTHS);
    assertEquals(new CurveNodeWithIdentifier(creditSpread, ExternalId.of("Test", "Credit spread"), "Credit Data", DataFieldType.OUTRIGHT), creditSpread.accept(BUILDER));
  }
View Full Code Here

  }

  @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

  }

  @Test
  public void testFRA() {
    final FRANode fra = new FRANode(Tenor.ONE_DAY, Tenor.TWO_MONTHS, ExternalId.of("Test", "Test"), "Test");
    assertEquals(new CurveNodeWithIdentifier(fra, ExternalId.of("Test", "FRA"), "FRA Data", DataFieldType.OUTRIGHT), fra.accept(BUILDER));
  }
View Full Code Here

  }

  @Test
  public void testFXForward() {
    final FXForwardNode fxForward = new FXForwardNode(Tenor.ONE_DAY, Tenor.TWO_MONTHS, ExternalId.of("Test1", "Test1"), Currency.USD, Currency.JPY, "Test");
    assertEquals(new CurveNodeWithIdentifier(fxForward, ExternalId.of("Test", "FX Forward"), "FX Forward Data", DataFieldType.POINTS), fxForward.accept(BUILDER));
  }
View Full Code Here

  @Test
  public void testRateFuture() {
    final RateFutureNode future = new RateFutureNode(1, Tenor.TWO_MONTHS, Tenor.ONE_MONTH, Tenor.ONE_MONTH, ExternalId.of("Test", "Test"),
        ExternalId.of("Test", "Test"), "Test");
    assertEquals(new CurveNodeWithIdentifier(future, ExternalId.of("Test", "Future"), "Market_Value", DataFieldType.OUTRIGHT), future.accept(BUILDER));
  }
View Full Code Here

  }

  @Test
  public void testSwap() {
    final SwapNode swap = new SwapNode(Tenor.ONE_DAY, Tenor.TWO_MONTHS, ExternalId.of("Test", "Test"), ExternalId.of("Test", "Test"), "Test");
    assertEquals(new CurveNodeWithIdentifier(swap, ExternalId.of("Test", "Swap"), "Swap Data", DataFieldType.POINTS), swap.accept(BUILDER));
  }
View Full Code Here

  }

  @Test
  public void testZeroCouponInflation() {
    final ZeroCouponInflationNode node = new ZeroCouponInflationNode(Tenor.TWO_MONTHS, ExternalId.of("Test", "Test"), ExternalId.of("Test", "Test"), InflationNodeType.MONTHLY, "Test");
    assertEquals(new CurveNodeWithIdentifier(node, ExternalId.of("Test", "ZCI"), "ZC Data", DataFieldType.OUTRIGHT), node.accept(BUILDER));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.analytics.ircurve.strips.CurveNodeWithIdentifier

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.