Package com.opengamma.financial.analytics.ircurve

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


    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


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

  @Test
  public void test() {
    BloombergFutureCurveInstrumentProvider provider = new BloombergFutureCurveInstrumentProvider("AB", "Sector");
    assertEquals(provider, cycleObject(BloombergFutureCurveInstrumentProvider.class, provider));
    provider = new BloombergFutureCurveInstrumentProvider("AB", "Sector", "LAST_CLOSE", DataFieldType.POINTS);
    assertEquals(provider, cycleObject(BloombergFutureCurveInstrumentProvider.class, provider));
  }
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

    final Map<Tenor, CurveInstrumentProvider> fxForwardIds = new HashMap<>();
    fxForwardIds.put(Tenor.ONE_MONTH, new StaticCurveInstrumentProvider(ExternalSchemes.bloombergBuidSecurityId("FX1")));
    fxForwardIds.put(Tenor.TWO_MONTHS, new StaticCurveInstrumentProvider(ExternalSchemes.bloombergBuidSecurityId("FX2")));
    fxForwardIds.put(Tenor.THREE_MONTHS, new StaticCurveInstrumentProvider(ExternalSchemes.bloombergBuidSecurityId("FX3")));
    final Map<Tenor, CurveInstrumentProvider> rateFutureIds = new HashMap<>();
    rateFutureIds.put(Tenor.ONE_YEAR, new BloombergFutureCurveInstrumentProvider("ED", "RATE"));
    rateFutureIds.put(Tenor.TWO_YEARS, new BloombergFutureCurveInstrumentProvider("ED", "RATE"));
    rateFutureIds.put(Tenor.EIGHTEEN_MONTHS, new BloombergFutureCurveInstrumentProvider("ED", "RATE"));
    final Map<Tenor, CurveInstrumentProvider> zeroCouponInflationIds = new HashMap<>();
    zeroCouponInflationIds.put(Tenor.ONE_YEAR, new StaticCurveInstrumentProvider(ExternalSchemes.bloombergTickerSecurityId("CPI1")));
    zeroCouponInflationIds.put(Tenor.TWO_YEARS, new StaticCurveInstrumentProvider(ExternalSchemes.bloombergTickerSecurityId("CPI2")));
    zeroCouponInflationIds.put(Tenor.THREE_YEARS, new StaticCurveInstrumentProvider(ExternalSchemes.bloombergTickerSecurityId("CPI3")));
    zeroCouponInflationIds.put(Tenor.FOUR_YEARS, new StaticCurveInstrumentProvider(ExternalSchemes.bloombergTickerSecurityId("CPI4")));
    final Map<Tenor, CurveInstrumentProvider> deliverableSwapFutureNodeIds = new HashMap<>();
    deliverableSwapFutureNodeIds.put(Tenor.TWO_YEARS, new BloombergFutureCurveInstrumentProvider("SW", "p"));
    deliverableSwapFutureNodeIds.put(Tenor.FIVE_YEARS, new BloombergFutureCurveInstrumentProvider("SW", "e"));
    deliverableSwapFutureNodeIds.put(Tenor.TEN_YEARS, new BloombergFutureCurveInstrumentProvider("SW", "k"));
    final CurveNodeIdMapper mapper = CurveNodeIdMapper.builder().name(name)
        .cashNodeIds(cashIds)
        .continuouslyCompoundedRateNodeIds(continuouslyCompoundedRateIds)
        .creditSpreadNodeIds(creditSpreadIds)
        .deliverableSwapFutureNodeIds(deliverableSwapFutureNodeIds)
View Full Code Here

TOP

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

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.