Interface EtdSecurity

    • Method Detail

      • 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 interface Security
        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.
        Specified by:
        withInfo in interface Security
        Parameters:
        info - the new info
        Returns:
        the instance with the specified info