Package com.opengamma.financial.analytics.ircurve

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


   */
  public ExternalId getDeliverableSwapFutureNodeId(final LocalDate curveDate, final Tenor tenor, final Tenor swapTenor, final int numberFuturesFromTenor) {
    if (_deliverableSwapFutureNodeIds == null) {
      throw new OpenGammaRuntimeException("Cannot get deliverable swap future node id provider for curve node id mapper called " + _name);
    }
    final CurveInstrumentProvider mapper = _deliverableSwapFutureNodeIds.get(tenor);
    if (mapper != null) {
      return mapper.getInstrument(curveDate, tenor, swapTenor, numberFuturesFromTenor);
    }
    throw new OpenGammaRuntimeException("Can't get instrument mapper definition for deliverable swap future number " + numberFuturesFromTenor +
        " with time to start " + tenor + " and swap tenor " + swapTenor);
  }
View Full Code Here


   */
  public ExternalId getRateFutureNodeId(final LocalDate curveDate, final Tenor tenor, final Tenor rateTenor, final int numberFuturesFromTenor) {
    if (_rateFutureNodeIds == null) {
      throw new OpenGammaRuntimeException("Cannot get rate future node id provider for curve node id mapper called " + _name);
    }
    final CurveInstrumentProvider mapper = _rateFutureNodeIds.get(tenor);
    if (mapper != null) {
      return mapper.getInstrument(curveDate, tenor, rateTenor, numberFuturesFromTenor);
    }
    throw new OpenGammaRuntimeException("Can't get instrument mapper definition for rate future number " + numberFuturesFromTenor +
        " with time to start " + tenor + " and rate tenor " + rateTenor);
  }
View Full Code Here

    }
    return allTenors;
  }

  protected static ExternalId getId(final Map<Tenor, CurveInstrumentProvider> idMapper, final LocalDate curveDate, final Tenor tenor) {
    final CurveInstrumentProvider mapper = idMapper.get(tenor);
    if (mapper != null) {
      return mapper.getInstrument(curveDate, tenor);
    }
    throw new OpenGammaRuntimeException("Cannot get id mapper definition for " + tenor);
  }
View Full Code Here

    }
    throw new OpenGammaRuntimeException("Cannot get id mapper definition for " + tenor);
  }

  protected static String getMarketDataField(final Map<Tenor, CurveInstrumentProvider> idMapper, final Tenor tenor) {
    final CurveInstrumentProvider mapper = idMapper.get(tenor);
    if (mapper != null) {
      return mapper.getMarketDataField();
    }
    throw new OpenGammaRuntimeException("Cannot get id mapper definition for " + tenor);
  }
View Full Code Here

    }
    throw new OpenGammaRuntimeException("Cannot get id mapper definition for " + tenor);
  }

  protected static DataFieldType getDataFieldType(final Map<Tenor, CurveInstrumentProvider> idMapper, final Tenor tenor) {
    final CurveInstrumentProvider mapper = idMapper.get(tenor);
    if (mapper != null) {
      return mapper.getDataFieldType();
    }
    throw new OpenGammaRuntimeException("Cannot get id mapper definition for " + tenor);
  }
View Full Code Here

@Test(groups = TestGroup.UNIT)
public class CurveInstrumentProviderFudgeEncodingTest extends FinancialTestBase {

  @Test
  public void testStaticCurveInstrumentProvider() {
    final CurveInstrumentProvider cip = new StaticCurveInstrumentProvider(ExternalId.of("JIM", "BO"));
    assertEquals(cip, cycleObject(CurveInstrumentProvider.class, cip));
  }
View Full Code Here

    assertEquals(cip, cycleObject(CurveInstrumentProvider.class, cip));
  }

  @Test
  public void testBloombergFutureCurveInstrumentProvider() {
    final CurveInstrumentProvider cip = new BloombergFutureCurveInstrumentProvider("ED", "Curncy");
    assertEquals(cip, cycleObject(CurveInstrumentProvider.class, cip));
  }
View Full Code Here

TOP

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

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.