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

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


  public BloombergFutureCurveInstrumentProvider buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
    final String prefix = message.getString(PREFIX_FIELD);
    final String marketSector = message.getString(MARKET_SECTOR_FIELD);
    if (message.hasField(DATA_FIELD) && message.hasField(TYPE_FIELD)) {
      final String dataField = message.getString(DATA_FIELD);
      final DataFieldType fieldType = DataFieldType.valueOf(message.getString(TYPE_FIELD));
      return new BloombergFutureCurveInstrumentProvider(prefix, marketSector, dataField, fieldType);
    }
    return new BloombergFutureCurveInstrumentProvider(prefix, marketSector);
  }
View Full Code Here


  public StaticCurveInstrumentProvider buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
    final FudgeField instrumentIdentifier = message.getByName(INSTRUMENT_FIELD);
    final ExternalId identifier = deserializer.fieldValueToObject(ExternalId.class, instrumentIdentifier);
    if (message.hasField(DATA_FIELD) && message.hasField(TYPE_FIELD)) {
      final String dataField = message.getString(DATA_FIELD);
      final DataFieldType fieldType = DataFieldType.valueOf(message.getString(TYPE_FIELD));
      return new StaticCurveInstrumentProvider(identifier, dataField, fieldType);
    }
    return new StaticCurveInstrumentProvider(identifier);
  }
View Full Code Here

  @Override
  public StaticCurvePointsInstrumentProvider buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
    final FudgeField instrumentIdentifier = message.getByName(INSTRUMENT_FIELD);
    final ExternalId identifier = deserializer.fieldValueToObject(ExternalId.class, instrumentIdentifier);
    final String dataField = message.getString(DATA_FIELD);
    final DataFieldType fieldType = DataFieldType.valueOf(message.getString(TYPE_FIELD));
    final FudgeField underlyingInstrumentIdentifier = message.getByName(UNDERLYING_INSTRUMENT_FIELD);
    final ExternalId underlyingIdentifier = deserializer.fieldValueToObject(ExternalId.class, underlyingInstrumentIdentifier);
    final String underlyingDataField = message.getString(UNDERLYING_DATA_FIELD);
    return new StaticCurvePointsInstrumentProvider(identifier, dataField, fieldType, underlyingIdentifier, underlyingDataField);
  }
View Full Code Here

    final Currency ccy = Currency.of(message.getString(CURRENCY_FIELD));
    final StripInstrumentType stripType = StripInstrumentType.valueOf(message.getString(STRIP_TYPE_FIELD));
    final ExternalScheme scheme = ExternalScheme.of(message.getString(SCHEME_FIELD));
    if (message.hasField(DATA_FIELD) && message.hasField(TYPE_FIELD)) {
      final String dataField = message.getString(DATA_FIELD);
      final DataFieldType fieldType = DataFieldType.valueOf(message.getString(TYPE_FIELD));
      return new SyntheticIdentifierCurveInstrumentProvider(ccy, stripType, scheme, dataField, fieldType);
    }
    return new SyntheticIdentifierCurveInstrumentProvider(ccy, stripType, scheme);
  }
View Full Code Here

    @Override
    public CurveNodeWithIdentifier buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
      final CurveNode curveStrip = (CurveNode) deserializer.fieldValueToObject(message.getByName(CURVE_STRIP_FIELD));
      final ExternalId id = deserializer.fieldValueToObject(ExternalId.class, message.getByName(ID_FIELD));
      final String dataField = message.getString(DATA_FIELD);
      final DataFieldType fieldType = DataFieldType.valueOf(message.getString(TYPE_FIELD));
      return new CurveNodeWithIdentifier(curveStrip, id, dataField, fieldType);
    }
View Full Code Here

  @Override
  public CurveNodeWithIdentifier visitCashNode(final CashNode node) {
    final Tenor tenor = node.getMaturityTenor();
    final ExternalId identifier = _nodeIdMapper.getCashNodeId(_curveDate, tenor);
    final String dataField = _nodeIdMapper.getCashNodeDataField(tenor);
    final DataFieldType fieldType = _nodeIdMapper.getCashNodeDataFieldType(tenor);
    return new CurveNodeWithIdentifier(node, identifier, dataField, fieldType);
  }
View Full Code Here

  @Override
  public CurveNodeWithIdentifier visitContinuouslyCompoundedRateNode(final ContinuouslyCompoundedRateNode node) {
    final Tenor tenor = node.getTenor();
    final ExternalId identifier = _nodeIdMapper.getContinuouslyCompoundedRateNodeId(_curveDate, tenor);
    final String dataField = _nodeIdMapper.getContinuouslyCompoundedRateNodeDataField(tenor);
    final DataFieldType fieldType = _nodeIdMapper.getContinuouslyCompoundedRateDataFieldType(tenor);
    return new CurveNodeWithIdentifier(node, identifier, dataField, fieldType);
  }
View Full Code Here

  @Override
  public CurveNodeWithIdentifier visitCreditSpreadNode(final CreditSpreadNode node) {
    final Tenor tenor = node.getTenor();
    final ExternalId identifier = _nodeIdMapper.getCreditSpreadNodeId(_curveDate, tenor);
    final String dataField = _nodeIdMapper.getCreditSpreadNodeDataField(tenor);
    final DataFieldType fieldType = _nodeIdMapper.getCreditSpreadNodeDataFieldType(tenor);
    return new CurveNodeWithIdentifier(node, identifier, dataField, fieldType);
  }
View Full Code Here

  public CurveNodeWithIdentifier visitDeliverableSwapFutureNode(final DeliverableSwapFutureNode node) {
    final Tenor startTenor = node.getStartTenor();
    final ExternalId identifier = _nodeIdMapper.getDeliverableSwapFutureNodeId(_curveDate, startTenor,
        node.getFutureTenor(), node.getFutureNumber());
    final String dataField = _nodeIdMapper.getDeliverableSwapFutureNodeDataField(startTenor);
    final DataFieldType fieldType = _nodeIdMapper.getDeliverableSwapFutureNodeDataFieldType(startTenor);
    return new CurveNodeWithIdentifier(node, identifier, dataField, fieldType);
  }
View Full Code Here

  @Override
  public CurveNodeWithIdentifier visitDiscountFactorNode(final DiscountFactorNode node) {
    final Tenor tenor = node.getTenor();
    final ExternalId identifier = _nodeIdMapper.getDiscountFactorNodeId(_curveDate, tenor);
    final String dataField = _nodeIdMapper.getDiscountFactorNodeDataField(tenor);
    final DataFieldType fieldType = _nodeIdMapper.getDiscountFactorNodeDataFieldType(tenor);
    return new CurveNodeWithIdentifier(node, identifier, dataField, fieldType);
  }
View Full Code Here

TOP

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

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.