Examples of MetalForwardSecurity


Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

          return security;
        }

        @Override
        public CommodityForwardSecurity visitMetalForwardType(MetalForwardSecurityBean bean) {
          final MetalForwardSecurity security = new MetalForwardSecurity(
            bean.getUnitName().getName(),
            bean.getUnitNumber(),
            expiryBeanToExpiry(bean.getExpiry()),
            currencyBeanToCurrency(bean.getCurrency()),
            bean.getUnitAmount(),
            bean.getCategory().getName());
          security.setUnitNumber(bean.getUnitNumber());
          if (bean.getUnitName() != null) {
            security.setUnitName(bean.getUnitName().getName());
          }
          security.setUnderlyingId(externalIdBeanToExternalId(bean
            .getUnderlying()));
          return security;
        }

      });
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

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

  @Test
  public void testMetalForwardSecurity() {
    final MetalForwardSecurity security = ExposureFunctionTestHelper.getMetalForwardSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "COMMODITY_FORWARD"), ids.get(0));
  }
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

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

  @Test
  public void testMetalForwardSecurity() {
    final MetalForwardSecurity security = ExposureFunctionTestHelper.getMetalForwardSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "COMMODITY_FORWARD_USD"), ids.get(0));
  }
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

    assertNull(ids);
  }

  @Test
  public void testMetalForwardSecurity() {
    final MetalForwardSecurity security = ExposureFunctionTestHelper.getMetalForwardSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

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

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

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

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

  public static MetalForwardSecurity getMetalForwardSecurity() {
    final MetalForwardSecurity security = new MetalForwardSecurity("Troy oz", 100., new Expiry(DateUtils.getUTCDate(2013, 1, 1)), USD, 10000, "Commodity");
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "841351"));
    return security;
  }
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

    final Double unitNumber = null;
    final Expiry expiry = expiry();
    final Currency currency = currency();
    final double unitAmount = 0;
    final String category = "category";
    final MetalForwardSecurity security = new MetalForwardSecurity(unitName, unitNumber, expiry, currency, unitAmount, category);
    store(security);
    return security;
  }
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

    assertNull(ids);
  }

  @Test
  public void testMetalForwardSecurity() {
    final MetalForwardSecurity security = ExposureFunctionTestHelper.getMetalForwardSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

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

  @Test
  public void testMetalForwardSecurity() {
    final MetalForwardSecurity security = ExposureFunctionTestHelper.getMetalForwardSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here

Examples of com.opengamma.financial.security.forward.MetalForwardSecurity

    assertNull(ids);
  }

  @Test
  public void testMetalForwardSecurity() {
    final MetalForwardSecurity security = ExposureFunctionTestHelper.getMetalForwardSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.