Package com.opengamma.strata.product.etd
Interface EtdSecurity
-
- All Superinterfaces:
Product,SecuritizedProduct,Security
- All Known Implementing Classes:
EtdFutureSecurity,EtdOptionSecurity
public interface EtdSecurity extends Security, SecuritizedProduct
An instrument representing an exchange traded derivative (ETD).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description EtdContractSpecIdgetContractSpecId()Gets the ID of the contract specification from which this security is derived.default CurrencygetCurrency()Gets the currency that the security is traded in.YearMonthgetExpiry()Gets the year-month of the expiry.default SecurityIdgetSecurityId()Gets the security identifier.EtdTypegetType()Gets the type of the contract - future or option.default ImmutableSet<SecurityId>getUnderlyingIds()Gets the set of underlying security identifiers.EtdVariantgetVariant()Gets the variant of ETD.EtdSecuritywithInfo(SecurityInfo info)Returns an instance with the specified info.-
Methods inherited from interface com.opengamma.strata.product.Product
allPaymentCurrencies, isCrossCurrency
-
Methods inherited from interface com.opengamma.strata.product.SecuritizedProduct
allCurrencies
-
Methods inherited from interface com.opengamma.strata.product.Security
createPosition, createPosition, createProduct, createTrade, getInfo
-
-
-
-
Method Detail
-
getSecurityId
default SecurityId getSecurityId()
Description copied from interface:SecurityGets the security identifier.This identifier uniquely identifies the security within the system.
- Specified by:
getSecurityIdin interfaceSecuritizedProduct- Specified by:
getSecurityIdin interfaceSecurity- Returns:
- the security identifier
-
getCurrency
default Currency getCurrency()
Description copied from interface:SecurityGets the currency that the security is traded in.- Specified by:
getCurrencyin interfaceSecuritizedProduct- Specified by:
getCurrencyin interfaceSecurity- Returns:
- the trading currency
-
getUnderlyingIds
default ImmutableSet<SecurityId> getUnderlyingIds()
Description copied from interface:SecurityGets the set of underlying security identifiers.The set must contain all the security identifiers that this security directly refers to. For example, a bond future will return the identifiers of the underlying basket of bonds, but a bond future option will only return the identifier of the underlying future, not the basket.
- Specified by:
getUnderlyingIdsin interfaceSecurity- Returns:
- the underlying security identifiers
-
getContractSpecId
EtdContractSpecId getContractSpecId()
Gets the ID of the contract specification from which this security is derived.- Returns:
- the ID
-
getType
EtdType getType()
Gets the type of the contract - future or option.- Returns:
- the type, future or option
-
getExpiry
YearMonth getExpiry()
Gets the year-month of the expiry.Expiry will occur on a date implied by the variant of the ETD.
- Returns:
- the year-month
-
getVariant
EtdVariant getVariant()
Gets the variant of ETD.This captures the variant of the ETD. The most common variant is 'Monthly'. Other variants are 'Weekly', 'Daily' and 'Flex'.
When building, this defaults to 'Monthly'.
- Returns:
- the variant
-
withInfo
EtdSecurity withInfo(SecurityInfo info)
Description copied from interface:SecurityReturns an instance with the specified info.
-
-