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

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


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

  @Test
  public void testDeliverableSwapFutureNodeBuilder() {
    DeliverableSwapFutureNode node = new DeliverableSwapFutureNode(2, Tenor.ONE_DAY, Tenor.THREE_MONTHS, Tenor.ONE_MONTH, ExternalId.of("convention", "future"),
        ExternalId.of("convention", "swap"), "TEST");
    assertEquals(node, cycleObject(DeliverableSwapFutureNode.class, node));
    node = new DeliverableSwapFutureNode(2, Tenor.ONE_DAY, Tenor.THREE_MONTHS, Tenor.ONE_MONTH, ExternalId.of("convention", "future"),
        ExternalId.of("convention", "swap"), "TEST", null);
    assertEquals(node, cycleObject(DeliverableSwapFutureNode.class, node));
    node = new DeliverableSwapFutureNode(2, Tenor.ONE_DAY, Tenor.THREE_MONTHS, Tenor.ONE_MONTH, ExternalId.of("convention", "future"),
        ExternalId.of("convention", "swap"), "TEST", "Name");
    assertEquals(node, cycleObject(DeliverableSwapFutureNode.class, node));
  }
View Full Code Here


    final ExternalId marketDataId = ExternalId.of(SCHEME, "DSF");
    final double rate = 0.02;
    final double price = 0.99;
    final SnapshotDataBundle marketValues = new SnapshotDataBundle();
    marketValues.setDataPoint(marketDataId, rate);
    final DeliverableSwapFutureNode futureNode = new DeliverableSwapFutureNode(1, Tenor.of(Period.ZERO), Tenor.THREE_MONTHS, Tenor.TEN_YEARS, DELIVERABLE_SWAP_FUTURE_ID, FIXED_IBOR_3M_SWAP_ID, "Mapper");
    final CurveNodeVisitor<InstrumentDefinition<?>> converter = new DeliverableSwapFutureNodeConverter(CONVENTION_SOURCE, HOLIDAY_SOURCE, REGION_SOURCE, marketValues, marketDataId, NOW);
    final InstrumentDefinition<?> definition = futureNode.accept(converter);
    final Currency currency = Currency.USD;
    final DayCount dayCount = THIRTY_360;
    final BusinessDayConvention businessDayConvention = MODIFIED_FOLLOWING;
    final boolean eom = false;
    final Period indexTenor = Period.ofMonths(3);
View Full Code Here

      final ExternalId futureConvention = deserializer.fieldValueToObject(ExternalId.class, message.getByName(FUTURE_CONVENTION_FIELD));
      final ExternalId swapConvention = deserializer.fieldValueToObject(ExternalId.class, message.getByName(UNDERLYING_CONVENTION_FIELD));
      final String curveNodeIdMapperName = message.getString(CURVE_MAPPER_ID_FIELD);
      if (message.hasField(NAME_FIELD)) {
        final String name = message.getString(NAME_FIELD);
        return new DeliverableSwapFutureNode(futureNumber, startTenor, futureTenor, underlyingTenor, futureConvention, swapConvention, curveNodeIdMapperName, name);
      }
      return new DeliverableSwapFutureNode(futureNumber, startTenor, futureTenor, underlyingTenor, futureConvention, swapConvention, curveNodeIdMapperName);
    }
View Full Code Here

TOP

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

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.