Class EtdOptionSecurity.Builder

    • Method Detail

      • info

        public EtdOptionSecurity.Builder info​(SecurityInfo info)
        Sets the standard security information.

        This includes the security identifier.

        Parameters:
        info - the new value, not null
        Returns:
        this, for chaining, not null
      • contractSpecId

        public EtdOptionSecurity.Builder contractSpecId​(EtdContractSpecId contractSpecId)
        Sets the ID of the contract specification from which this security is derived.
        Parameters:
        contractSpecId - the new value, not null
        Returns:
        this, for chaining, not null
      • expiry

        public EtdOptionSecurity.Builder expiry​(java.time.YearMonth expiry)
        Sets the year-month of the expiry.

        Expiry will occur on a date implied by the variant of the ETD.

        Parameters:
        expiry - the new value, not null
        Returns:
        this, for chaining, not null
      • variant

        public EtdOptionSecurity.Builder variant​(EtdVariant variant)
        Sets 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'.

        Parameters:
        variant - the new value, not null
        Returns:
        this, for chaining, not null
      • version

        public EtdOptionSecurity.Builder version​(int version)
        Sets the version of the option, defaulted to zero.

        Some options can have multiple versions, representing some kind of change over time. Version zero is the baseline, version one and later indicates some kind of change occurred.

        Parameters:
        version - the new value
        Returns:
        this, for chaining, not null
      • putCall

        public EtdOptionSecurity.Builder putCall​(PutCall putCall)
        Sets whether the option is a put or call.
        Parameters:
        putCall - the new value, not null
        Returns:
        this, for chaining, not null
      • strikePrice

        public EtdOptionSecurity.Builder strikePrice​(double strikePrice)
        Sets the strike price, in decimal form, may be negative.
        Parameters:
        strikePrice - the new value
        Returns:
        this, for chaining, not null
      • underlyingExpiryMonth

        public EtdOptionSecurity.Builder underlyingExpiryMonth​(java.time.YearMonth underlyingExpiryMonth)
        Sets the expiry year-month of the underlying instrument.

        If an option has an underlying instrument, the expiry of that instrument can be specified here. For example, you can have an option expiring in March on the underlying March future, or on the underlying June future. Not all options have an underlying instrument, thus the property is optional.

        In many cases, the expiry of the underlying instrument is the same as the expiry of the option. In this case, the expiry is often omitted, even though it probably should not be.

        Parameters:
        underlyingExpiryMonth - the new value
        Returns:
        this, for chaining, not null