Package com.opengamma.financial.analytics.ircurve

Examples of com.opengamma.financial.analytics.ircurve.StaticCurvePointsInstrumentProvider


    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


@Test(groups = TestGroup.UNIT)
public class StaticCurvePointsInstrumentProviderFudgeBuilderTest extends AnalyticsTestBase {

  @Test
  public void test() {
    final StaticCurvePointsInstrumentProvider provider = new StaticCurvePointsInstrumentProvider(ExternalSchemes.syntheticSecurityId("ASD"), "Market_Value", DataFieldType.POINTS,
        ExternalSchemes.syntheticSecurityId("QWE"), "Last_Price");
    assertEquals(provider, cycleObject(StaticCurvePointsInstrumentProvider.class, provider));
  }
View Full Code Here

  @Override
  public CurveNodeWithIdentifier visitFXForwardNode(final FXForwardNode node) {
    final Map<Tenor, CurveInstrumentProvider> ids = _nodeIdMapper.getFXForwardNodeIds();
    final Tenor tenor = node.getMaturityTenor();
    if (ids.get(tenor) instanceof StaticCurvePointsInstrumentProvider) {
      final StaticCurvePointsInstrumentProvider provider = (StaticCurvePointsInstrumentProvider) ids.get(tenor);
      final ExternalId identifier = provider.getInstrument(_curveDate, tenor);
      final String dataField = provider.getMarketDataField();
      final DataFieldType fieldType = provider.getDataFieldType();
      final ExternalId underlyingId = provider.getUnderlyingInstrument();
      final String underlyingField = provider.getUnderlyingMarketDataField();
      return new PointsCurveNodeWithIdentifier(node, identifier, dataField, fieldType, underlyingId, underlyingField);
    }
    final ExternalId identifier = _nodeIdMapper.getFXForwardNodeId(_curveDate, tenor);
    final String dataField = _nodeIdMapper.getFXForwardNodeDataField(tenor);
    final DataFieldType fieldType = _nodeIdMapper.getFXForwardNodeDataFieldType(tenor);
View Full Code Here

TOP

Related Classes of com.opengamma.financial.analytics.ircurve.StaticCurvePointsInstrumentProvider

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.