Package com.opengamma.financial.security.future

Examples of com.opengamma.financial.security.future.FederalFundsFutureSecurity


          return security;
        }

        @Override
        public FutureSecurity visitFederalFundsFutureType(FederalFundsFutureBean bean) {
          final FederalFundsFutureSecurity security = new FederalFundsFutureSecurity(
              expiryBeanToExpiry(bean.getExpiry()),
              bean.getTradingExchange().getName(),
              bean.getSettlementExchange().getName(),
              currencyBeanToCurrency(bean.getCurrency()),
              bean.getUnitAmount(),
View Full Code Here


    assertEquals(ExternalId.of(SCHEME, "FUTURE"), ids.get(0));
  }

  @Test
  public void testFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity future = ExposureFunctionTestHelper.getFederalFundsFutureSecurity();
    final List<ExternalId> ids = future.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "FUTURE"), ids.get(0));
  }
View Full Code Here

    assertEquals(ExternalId.of(SCHEME, "FUTURE_USD"), ids.get(0));
  }

  @Test
  public void testFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity future = ExposureFunctionTestHelper.getFederalFundsFutureSecurity();
    final List<ExternalId> ids = future.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "FUTURE_USD"), ids.get(0));
  }
View Full Code Here

    assertEquals(ExternalSchemes.syntheticSecurityId("USD 3m Libor"), ids.get(0));
  }

  @Test
  public void testFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity future = ExposureFunctionTestHelper.getFederalFundsFutureSecurity();
    final List<ExternalId> ids = future.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalSchemes.syntheticSecurityId("Fed Funds"), ids.get(0));
  }
View Full Code Here

    assertEquals(ExternalId.of(SCHEME, "USD"), ids.get(0));
  }

  @Test
  public void testFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity future = ExposureFunctionTestHelper.getFederalFundsFutureSecurity();
    final List<ExternalId> ids = future.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "USD"), ids.get(0));
  }
View Full Code Here

    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "4567"));
    return security;
  }

  public static FederalFundsFutureSecurity getFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity security = new FederalFundsFutureSecurity(new Expiry(DateUtils.getUTCDate(2013, 9, 1)), TRADING, SETTLEMENT, USD, 12500,
        ExternalSchemes.syntheticSecurityId("Fed Funds"), "Financial");
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "867"));
    return security;
  }
View Full Code Here

    }
    ExternalId underlyingIdentifier = ExternalId.of(ExternalSchemes.BLOOMBERG_TICKER, id);
   
    ManageableSecurity security;
    if ("FEDL01 Index".equals(id)) {
      security = new FederalFundsFutureSecurity(expiry, micExchangeCode, micExchangeCode, currency, unitAmount, underlyingIdentifier, category);
    } else {
      security = new InterestRateFutureSecurity(expiry, micExchangeCode, micExchangeCode, currency, unitAmount, underlyingIdentifier, category);
    }
    security.setName(name);
    // set identifiers
View Full Code Here

    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "FUTURE_X"), ids.get(0));
  }

  @Test
  public void testFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity future = ExposureFunctionTestHelper.getFederalFundsFutureSecurity();
    final List<ExternalId> ids = future.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "FUTURE_X"), ids.get(0));
  }
View Full Code Here

    assertNull(ids);
  }

  @Test
  public void testFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity future = ExposureFunctionTestHelper.getFederalFundsFutureSecurity();
    final List<ExternalId> ids = future.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here

    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "FUTURE_Y"), ids.get(0));
  }

  @Test
  public void testFederalFundsFutureSecurity() {
    final FederalFundsFutureSecurity future = ExposureFunctionTestHelper.getFederalFundsFutureSecurity();
    final List<ExternalId> ids = future.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(ExposureFunction.SECURITY_IDENTIFIER, "FUTURE_Y"), ids.get(0));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.security.future.FederalFundsFutureSecurity

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.