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 EtdContractSpecId
getContractSpecId()
Gets the ID of the contract specification from which this security is derived.default Currency
getCurrency()
Gets the currency that the security is traded in.YearMonth
getExpiry()
Gets the year-month of the expiry.default SecurityId
getSecurityId()
Gets the security identifier.EtdType
getType()
Gets the type of the contract - future or option.default ImmutableSet<SecurityId>
getUnderlyingIds()
Gets the set of underlying security identifiers.EtdVariant
getVariant()
Gets the variant of ETD.EtdSecurity
withInfo(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:Security
Gets the security identifier.This identifier uniquely identifies the security within the system.
- Specified by:
getSecurityId
in interfaceSecuritizedProduct
- Specified by:
getSecurityId
in interfaceSecurity
- Returns:
- the security identifier
-
getCurrency
default Currency getCurrency()
Description copied from interface:Security
Gets the currency that the security is traded in.- Specified by:
getCurrency
in interfaceSecuritizedProduct
- Specified by:
getCurrency
in interfaceSecurity
- Returns:
- the trading currency
-
getUnderlyingIds
default ImmutableSet<SecurityId> getUnderlyingIds()
Description copied from interface:Security
Gets 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:
getUnderlyingIds
in 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:Security
Returns an instance with the specified info.
-
-